It took a lot of on the breadboard experimenting to get it to work just right. Turns out it takes 3 transistors and a voltage trigger to allow all of the different things to happen. Here is the final schematic:
So you see, now the switch does not directly power the arm motor (far right).To the left is the vibrating motor controls, to the right is the relay arm control, and in the center is the heart of it all: a Big 'ol resistor capacitor RC "thing", that does all of the slowly building up voltages that the rest of the circuits works off of.
I learned a lot about RC style systems, mostly from a ration of failures in trying to get this to work. See; the resistor slows the charge up of the capacitor (to about 3-5 seconds), meaning that that 4 way intersection in the center will go from 0 to 9 volts in a slow climb. At first, I just tried to have the vibrating motor powered directly at that intersection- it didn't work; the motor was a "path of least resistance" for the power to escape through after passing the resistor. similarly, the intersection would not turn on the relay at around 5v as I planned, because its coil acted the same way as the coil in the motor... so a RC wont ramp up a charge with a 'load' present, and in the end, Neither will do anything. Check! If I had gone to some electronics class or something, I might have been told that at some point... and not known what it meant, exactly. BUT with this practical experience, now I get it!
So both the vibrator motor and the relay needed a "buffer" in between. Like a transistor base. The rising voltage will turn on a transistor more and more as it climbs, meaning the thing the transistor is powering (from another route of power)- so, in dumbdum terms: the RC intersection cannot power a thing directly, but can power a knob to adjust the power.
The vibrator motor worked with the intersection powering the base of a single NPN.. but the motor peter'ed out (poor Peter.. what did he ever do to get that term named after him?!) at around 4v.. oscillating the circuit.. like the transistor was "floored" already, and couldn't push any more power. So I doubled it up- a "darlington transistor pair" apparently- two NPN's stacked up. At first I thought they would both just drive the motor "in parallel", but apparently this "in series" arrangement works better- not sure why if the first NPN was floored in the first place...? But anyway, 2 NPNs and the motor will power itself right up to 9v and self destruction... if need be.
That's where the relay comes in. I had to add a special little hard to find chip: a 1381U voltage trigger (salvaged from some solar engine parts I bought- the U was unusable for those, as it triggers around 4.5v) to keep the NPN from just turning on the relay as soon as possible (which turned out to be MUCH too soon!) So now, with the voltage trigger waiting until it reaches its trigger levels before enabling the NPN, the vibrating motor gets more time to ramp up to a really alarming level. The diode was a little trick I learned to stall the trigger even longer; as the diode "keeps" about .7v as power goes through it, meaning the voltage reaching the trigger is lower than the actual voltage in the capacitor: an extra little delay.
I drew this sketch AFTER I had moved this here and there all over the breadboard to get it right, so lets look at the breadboard, wired to control the box externally:
What you see is the relay, the NPN by the relay, and the trigger in the foreground, powering the NPN. The Black and Red jumpers leading to the box went to the motor, the red and green in the background came from the battery/switch. The RC and vibrating motor NPNs are tucked under the Cap (built up previously), and the pager motor is the white blob tucked behind. Lets see if it works!
Looks good from here! (the diode was missing, so the shutoff is rather quick at this stage)
Well, with that all said, all that's left to talk about is the neat little arrangement of the relay and motor wiring. You may note that there is no polarity reversing taps, nor a back stop switch to pull the arm back.. yet it pulls back anyway! This is where I start getting DEEP:
Its all about Back EMF. Or, more specifically, "Motor Kickback". As a motor is spun, it is also generating its own little power, because the coils are spinning near a magnet. This is the Back EMF (electromagnetic force) that is normally found in all running motors. If the power to the motor is suddenly severed, the Back EMF, which was generating power in the opposite polarity discharges as the motor coasts to a stop. Motor Kickback is a BAD thing in normal electrical engineering (causing belts and such to snap, or motors to lurch in their mounts with the violence), and is usually eliminated with a shunting diode to let the back emf drain away to ground (its just a reversed spike of power that lasts only a moment), found as a diode reverse wired between the motor leads.
So Motor Kickback = BAD. Unless you want the motor to kickback! And that's what the motor does in my Leave me ALONE! box. This is why the relay uses both contacts to connect and sever both the ground and the power of the motor simultaneously; with both wires suddenly disconnected, the back EMF has no where to go.. but to drive the motor backwards for as long as it lasts. Which turns out to be just enough! I learned all about this in some other experimental research I was doing, involving scavenging back EMF for usable power... but that's for another time. Whew! {/break DeepMoment;}
So, how to pack all of this circuitry in this little 4" x 6" box? printed circuit board? Psh! the Junkbots book taught me about "freeforming" components together.. and I really LIKE the way it looks!
So, there it is: all the stuff that was on the breadboard. just SEEING that makes me go "oh, cooool!". If it was going to essentially be the brains of this little box, it might as well look like some brains.. robot brains, of course!
Go ahead! zoom in on the intricate interweavings of all those prongs, each doing its own little thing. To the left is the original RC/vibrating motor driver, in the middle is the newer Trigger/NPN driver for the relay, and the relay itself. The little bits of salvaged wire insulation over some of the prongs helped me remember which ones were switched power and ground. but in the end, I thinks its a bit of a work of art, if I do say so myself.
It was Freeformed into this particular shape to sit neatly in an open spot within the box, as seen here. And thats the neat thing about freeforming: no way a printed circuitboard would fit in there! Plus, it leaves all the stuff inside out of sight from the peeking door, AND leaves me more room for more goodies if I decide to add them later.
All that was left was to wire the power and the two motors in... hmm looks Like I've reached the end of my photo uploads for one post. To be continued!
No comments:
Post a Comment