Controling Voltage of Components
I have a (another) newbie question. If this is the wrong forum please correct me. I have a BOEBOT that I want to hook a fan up to (it is to blow out a candle - dumb I know but it has a purpose
). The problem is that all of my components to date have been compatible with the 5 volt source load coming through. But the fan I got has the following ratings:
![attachment.php?attachmentid=73798](http://forums.parallax.com/attachment.php?attachmentid=73798)
Can I use this fan? Can I modify the circuit to get the correct voltage, current and power values to the fan? Or do I need a different fan? Thanks a lot.
![tongue.gif](http://forums.parallax.com/images/smilies/tongue.gif)
Can I use this fan? Can I modify the circuit to get the correct voltage, current and power values to the fan? Or do I need a different fan? Thanks a lot.
Comments
·· Firefighting robot competitions I have seen do this very thing.· The bots mostly have a fan that blows out a candle that the bot tracks, usually based on heat and light.· Anyway, to answer your question, you would need to have a 12V power source on the bot for the fan.· You would have a common ground with the 5V supply and you could switch the 12V fan using a 2N3904 NPN transistor.· Use a 1K resistor between the Stamp I/O pin and the base, connect the transistor Emitter to ground, and the collector to the black wire from the fan.· The red wire from the fan will connect to the 12V positive supply.· Making the Stamp I/O pin HIGH will turn the fan on.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
without access to the experts. [noparse]:)[/noparse]
This is the stuff I am trying so desp-er-atley trying to learn. Thanks a lot.
I put a copy of the data sheet of the 2n3904.
Ricardo Amaral
·· Without getting too overly complicated, the 1K values comes from 2 sources.· First of all you need a resistor on the base of the transistor to limit current draw.· Usually a value of 220 ohms to 1K will work great for most 2N2222/2N3904 NPN transistors.· When switching voltages over 5 volts though, I apply another formula to the equation for the resistor.· Basically I want one that, if the transistor shorts out (Collector to base, which I have had happen) that the current on the Stamp pin will be within limits to keep the pin from burning.
·· Now, when you consider the minimal voltage required to actually turn the transistor on, then a 1K will work in 99% of all 5V through 15V circuits perfectly, while protecting the Stamp pins.· So I always use a 1K regardless of the voltage of the load being switched.
·· Theoretically you could use one 12V power supply for the entire system, bot and fan.· After all, the BOE-Bot will regulate the voltage it requires internally.· The you can connect the fan to Vin, and switch the negative lead directly without having to worry about multiple supplies.· I would suggest putting 2 caps across the fan power leads though.· Probably a .1uF and a 10uF should be good.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
In your last post you said the following-
" Theoretically you could use one 12V power supply for the entire system, bot and fan. After all, the BOE-Bot will regulate the voltage it requires internally. The you can connect the fan to Vin, and switch the negative lead directly without having to worry about multiple supplies. "
Do you mean controlling the negative lead thru one of the pins on the BOE ? Will this not be to much for the Stamp? The fan specs that were posted at the first said it used 0.13 A. Did I just not understand what you mean by "controlling the negative directly" ?
Joe Fishback
bugg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Boe-bot: $229
Toddler: $249
Learning Google is your friend: priceless
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I'm having a problem here , 2n2222 does not let pass more than 5v between the collector and emmisor (thous are between 12V , same everything same ground ) ! I don't know what is wrong ??
does anybody know ..?
thanks in advance
Ricardo Amaral
·· Please confirm your wiring...What's connected where?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken
thanks by the draw KenM
I've tried other values of resistors and I tried without transistor also. the output to the load does not get over 5V .
Ricardo Amaral
Tried without the transistor......the stamp probably says OUCH if indeed the fan pulls over 100 mA.
You mention the output to the load does not get over 5V. Exactly how was that measurement taken?
If indeed the fan wants to use approximately 130 mA, the collector should measure less than 1 volt, which should put close to 12 volts across the fan.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken
·· If you've tried it without the Resistor, perhaps you have burned the pin?· No resistor would cause too much current from the Stamp I/O pin.· Ken's schematic is exactly what you'd need at those ratings.· A 2N2222 would work the same way, but provide slightly more current capability.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I made a substitution, in place of the BS2 I put a potentiometer so it is safe to play , the potentiometer is between +5v and ground, center pin to the base of the transistor.
The voltage was mesured with a voltmeter in parallel to the LOAD ( the load in my case is a dc motor , runs with 200 mA ), I tried another transistors also , like the 2n3055, Same results.
I don´t know what else to try .
Ricardo Amaral
The Base current was mesured , and it was about 1/10 of the mesured current between the 12V and the colector of the transistor . I still did not burn my BS2 pin.
That is a good sign
I don´t know what else to try .
Ricardo, please do the following:
1)Connect the circuit exactly as show in·a previous post ( http://forums.parallax.com/attachment.php?attachmentid=38374·)
2)Completely remove the Stamp from the circuit
3)Energize the 12 volt portion of the circuit
4)Jump·5 volts directly to the 1k ohm·base resistor (the side not attached to anything now that the Stamp is removed)
5)Measure the DC voltage between the 2n3904 emitter and the following:
(be carefull when making the measurements the clip lead is not also accidentally touching the base lead of the transistor)
6) The positive side of the motor
7) The negative side of the motor
8) The collector lead of the 2n3904
9) The base lead of the 2n3904
10) The side of the 1k resistor where you jumped 5 volts to
Write back with those results and somebody here should be able to continue to assist you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken
Post Edited (KenM) : 7/26/2005 3:32:09 AM GMT
·· Also note that a 2N3055 power transistor would likely not work correctly in the same circuit due to base current requirements, but I would have to verify that.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I thought I knew a little electronics before this issue, now I know that I really don’t know anything.
My load was always after the Transistor, that is between the emmissor lead and the ground, not between the power source and the collector lead as every draw I’ve seen . I though that the circuit would close on itself on that part anyway so, I always made it the same way, never occurs to me that it would matter !
Ok problem fixed, but I do have another question :
WHY ? ??? Why does the point of the load matters for this kind of circuit ?? For me it’s clear that the current would flow from the power source, use the transistor as a “ key” ( just switching ) , and continues to the ground ! it’s a simple circuit !
Now I ask if someone could explain that to me, it’s really important to keep understanding every single circuit, could give a good base ! (I’m mechanical Eng. )
I thank you all a lot about it !
Ricardo Amaral
I will try to give a brief answer now and maybe a more detailed answer later.
Brief answer:
For now, assume the only thing the·transistor needs to act like a switch is for the voltage feeding the base ciruit·must be 0.7 or more volts than the emitter voltage.
With the circuit correctly wired, the emitter is at 0 volts (ground) and the voltage·feeding the·base circuit is indeed more than the 0.7 volts needed, and the fan runs.
When you connected the fan between the emitter and ground, The positive side of the fan (emitter of transistor) wants to be at 12 volts. But the voltage·feeding the base circuit is only 5 volts.
5 volts is not 0.7 volts greater than the emitter voltage, so the transistor will not work properly.
I will try to provide a more technical answer later this week.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken
Post Edited (KenM) : 7/27/2005 2:33:06 PM GMT
it's already making perfect sense .
if you have time, please post a more detailed answear , I think I'm not the only one that does not undesrtand that completely.
Ricardo Amaral.
····· Wow, this thread has been awesome, I've gone from not knowing what a transistor is, to having a pretty good grasp on it, in a matter of minutes (with the help of this website if anyone is interested : http://www.kpsec.freeuk.com/trancirc.htm·. Anyhow, I'm looking into controlling a 12v solenoid switch with the BS2. I've found an 8 cell AA battery holder with wire leads and am now looking for a 2.1mm power jack ( Does anyone know what length I need·or can recommend the same jack that comes with the boebot battery holder). On the BOE PCB it's marked 6-9VDC at the input jack however earlier in this thread it states that the BS2 can handle 12V. So is it ok to plug in 12V here? On the schematic for the BOE it shows an input voltage range of 6-30 VDC. Just a bit confused between what’s marked on the PCB and what it states in the schematic.
Cheers!
R.K.