Shop OBEX P1 Docs P2 Docs Learn Events
Controling Voltage of Components — Parallax Forums

Controling Voltage of Components

Jonathan MorrisonJonathan Morrison Posts: 23
edited 2005-08-03 04:43 in Robotics
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 tongue.gif). 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

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

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-07-18 22:08
    Jonathan,

    ·· 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
  • Jonathan MorrisonJonathan Morrison Posts: 23
    edited 2005-07-18 22:27
    Ok - I am with you most of the way - my knowledge is still very limited though so let me make sure I understand. So there will basically need to be 2 sets of batteries - maybe 4 AA's for the BOE and 8 AA's for the fan. How would I have figured out to use 1k resistor between the stamp and the base
    without access to the experts. [noparse]:)[/noparse]

    This is the stuff I am trying so desp-er-atley trying to learn. Thanks a lot.
  • AmaralAmaral Posts: 176
    edited 2005-07-18 22:42
    Well,·put the 1k resistor in series with the·PIN OUT of the BS2 and the center pin of the 2N3904 that's the base pin. If you are going to use two Battery packs as you suggested be sure that the ground of both are connected together. this way you can feed the Transistor base, letting the current pass from the collector to the emitter.

    I put a copy of the data sheet of the 2n3904.

    Ricardo Amaral
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-07-19 15:03
    Jonathan,

    ·· 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
  • Joe FishbackJoe Fishback Posts: 99
    edited 2005-07-20 02:36
    Chris,

    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
  • MacGeek117MacGeek117 Posts: 747
    edited 2005-07-20 03:23
    What he means is put the 2N3904 on the GND lead of the fan.
    bugg

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Boe-bot: $229


    Toddler: $249

    Learning Google is your friend: priceless
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-07-20 05:11
    Bugg is actually correct, with the addition of the 1K resistor as in my previous post.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • AmaralAmaral Posts: 176
    edited 2005-07-25 02:53
    Have you got to do this ? this worked ?

    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
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-07-25 03:12
    Amaral,

    ·· Please confirm your wiring...What's connected where?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • KenMKenM Posts: 657
    edited 2005-07-25 03:22
    Like this

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ken
    690 x 532 - 35K
  • AmaralAmaral Posts: 176
    edited 2005-07-25 04:09
    that's exactly like kenM draw, ( regardless that his draw shows a pnp transistor ) but that's the way I'm connecting .

    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
  • AmaralAmaral Posts: 176
    edited 2005-07-25 04:11
    I tried without resistor not transistor
  • KenMKenM Posts: 657
    edited 2005-07-25 15:09
    The drawing shows a npn trasnsistor.

    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.
    Amaral said...
    that's exactly like kenM draw, ( regardless that his draw shows a pnp transistor ) but that's the way I'm connecting .

    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
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ken
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-07-25 17:05
    Amaral,

    ·· 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
  • AmaralAmaral Posts: 176
    edited 2005-07-25 21:26
    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.

    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
  • KenMKenM Posts: 657
    edited 2005-07-26 03:28
    Amaral said...
    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
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-07-26 05:00
    ·· One more thing to consider is that you may be using the wrong pins on your transistor.· In the past I have noted a few people had the legs incorrect based on a drawing or datasheet that showed the device from the top, but they thought it was from the bottom.· On a TO-92 package 2N3904/2N2222 transistor, if you're looking at the device with the legs aiming down, and the flat side facing you, the legs from left to right are Emitter, Base, Collector.· Is this how you are wiring the device?

    ·· 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
  • AmaralAmaral Posts: 176
    edited 2005-07-27 01:07
    I finally made it !

    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
  • KenMKenM Posts: 657
    edited 2005-07-27 04:11
    Amaral said...
    Ok problem fixed, but I do have another question :

    WHY ? ??? Why does the point of the load matters for this kind of circuit ??
    Ricardo,
    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
  • AmaralAmaral Posts: 176
    edited 2005-07-27 04:26
    Thanks Ken.

    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.
  • Rusty78Rusty78 Posts: 33
    edited 2005-08-03 04:43
    Hey,

    ····· 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.
Sign In or Register to comment.