Searching \ for '[EE:] Interfacing an Active Low signal from a USB' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=interfacing+active
Search entire site for: 'Interfacing an Active Low signal from a USB'.

Exact match. Not showing close matches.
PICList Thread
'[EE:] Interfacing an Active Low signal from a USB '
2004\04\30@172014 by James Tu

flavicon
face
I'm using a premade I/O board  (Hagstrom USB
board  http://www.hagstromelectronics.com/keusb36.html)

This board draws power from the USB port.

The board has 3 pairs of pins that is meant to be hooked up to external LEDs.
For each pair, one pin of the pair goes to the Anode and the other the
Cathode of the LED.

The Anode pin is held at 5V.  The Anode pin is connected right after a
current limited resistor (the resistor is ~350 Ohm).
The Cathode pin is connected to their microcontroller.

When we send a command to the board to light the LED, it brings the Cathode
pin LOW.


OK.  So I want to use the active low signal to simply control a low voltage
motor (1.5V to 3V probably)

There are a couple of ways that I'm thinking about doing this.  I'll be
using an external power supply to do this.  I guess I _can_ tap into the
USB port's power, but I'm not sure how that will affect the I/O board.

(1) Using an opto-isolator (because I can essentially hook up a pair of
pins to the input of the opto-isolator) and have the opto-isolator's output
transistor control another transistor that turn the motor on/off.

(2) Using a relay.  I guess I can use a solid state one...because I want to
make sure that switching speed won't be an issue.  These are quite expensive.

(3) Using an NPN transitor...I'm not sure if this circuit will damage the
microcontroller or not.  Here's my guess, please tell me if this is correct
or not.

Connect the active low pin to the Emitter of the transistor.
Connect the motor power supply to the Collector.  (I'll probably use 5V
here...if I use let's say 1.5V will this still work?)
Connect 5V to the base...with a 4.7K resistor.

The microcontroller will keep the Emitter at 5V.  When it pulls it low, the
transistor will turn on?   The microcontroller will then be sinking the
current that goes through the motor.  Is this OK?  Will the microcontroller
be damaged?  The motors we're looking at range from 1.3 - 3.0 VDC and draw
between 65 to 95 mA.

Another related question (this is probably a silly question) what is the
best way to step down a voltage (let's say 5V here) to the operating
voltage of a motor  (the resistance of the motor is ~10 ohms)?

If I use a 10 Ohm resistor in series, the motor will get 2.5 V right?  But
the current will be (2.5V/10 Ohm) which is 250mA...higher than the rating
for the motor.  And the power through the 10 Ohm resistor will be .250(2.5)
= .625 W...that's a lot, no?  When designing for the motor, should we just
make sure that it gets the right voltage?  The motor will try to draw as
much current it needs to maintain its rpm's right?  So a current limiting
resistor won't do anything?

Sorry for such novice questions.



-James

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu

2004\04\30@175957 by Paul James E.

picon face
{Quote hidden}

< the USB port's power, but I'm not sure how that will affect the I/O
> board.
>
>>>>>>>>> I'm not sure how it would affect the I/O board, but it might
         tax the USB's output current capability and/or add noise to
         the USB port.   In a word, I wouldn't do it.

> (1) Using an opto-isolator (because I can essentially hook up a pair of
> pins to the input of the opto-isolator) and have the opto-isolator's
> output transistor control another transistor that turn the motor
> on/off.
>
> (2) Using a relay.  I guess I can use a solid state one...because I
> want to make sure that switching speed won't be an issue.  These are
> quite expensive.
>>>>>>>>>>  Either # 1 or #2 above would work okay.  It depends on how
           much complexity and/or cost you want to encounter.




>
> (3) Using an NPN transitor...I'm not sure if this circuit will damage
> the microcontroller or not.  Here's my guess, please tell me if this is
> correct or not.
>
>>>>>>>>>>   This method too would work, but not the way you describe.
            See below.


> Connect the active low pin to the Emitter of the transistor.
> Connect the motor power supply to the Collector.  (I'll probably use 5V
> here...if I use let's say 1.5V will this still work?)
> Connect 5V to the base...with a 4.7K resistor.

>>>>>>>>>>   I would use a PNP transistor with the emitter connected to
            +v on the external power supply.  Connect one end of the
            motor to the collector of the transistor, and the other end
            of the motor to ground.  Connect the active low pin to the
            base of the transistor through a 500 ohms or so resistor.
            The way this works is when the unit is powered up, the active
            low output will come up high.  The motor will be off.
            When the active low pin goes low (active), the transistor
            turns on and supplies power to the motor.
>
> The microcontroller will keep the Emitter at 5V.  When it pulls it low,
> the transistor will turn on?   The microcontroller will then be sinking
> the current that goes through the motor.  Is this OK?  Will the
> microcontroller be damaged?  The motors we're looking at range from 1.3
> - 3.0 VDC and draw between 65 to 95 mA.

>>>>>>>>>  I really doubt if the microcontroller can handle having 65 or
          more milliamps of current passing through it without letting
          the smoke out of the part.   I would advise against it.
          Use a pass transistor as stated above.




> Another related question (this is probably a silly question) what is
> the best way to step down a voltage (let's say 5V here) to the
> operating voltage of a motor  (the resistance of the motor is ~10
> ohms)?

>>>>>>>>>>>>>   I would use a linear voltage regulator because they're
               cheap, easy to use, and in this case, not using a lot of
               current. Or you could put 3 or 4 diodes in series with the
               motor.  The forward voltage drop of say a 1N400x diode is
               between .6 and .7 volts, depending on the current through
               it.  So with this in mind, you would drop between 2.4 and
               2.8 volts with 4 in series, or 1.8 and 2.1 with 3 in series.
{Quote hidden}

              make a more informed decision.



                                            Regards and Good Luck,

                                                     Jim
>
> -James
>
> --
> http://www.piclist.com hint: To leave the PICList
> .....piclist-unsubscribe-requestKILLspamspam@spam@mitvma.mit.edu

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu


'[EE:] Interfacing an Active Low signal from a USB '
2004\05\01@145252 by James
flavicon
face
Thanks for all the useful information!

To turn "on" the PNP transistor, the base has to be at least 0.6V less
than the emitter (and also a small current needs to flow) right?

So if my active low signal goes between 0 and 5V...and my motor power,
which is connected to the emitter is 5V, then I'm set.
What if my motor power was let's say 9V?  Does that mean, even though
the microcontroller is holding the pin at 5V, the transistor would
still turn on, because the emitter is at 9V and the base is at 5V?

-James

On Apr 30, 2004, at 7:59 AM, Paul James E. wrote:

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\05\01@153120 by Byron A Jeff

face picon face
On Sat, May 01, 2004 at 02:52:35PM -0400, James wrote:
> Thanks for all the useful information!
>
> To turn "on" the PNP transistor, the base has to be at least 0.6V less
> than the emitter (and also a small current needs to flow) right?

Right.

>
> So if my active low signal goes between 0 and 5V...and my motor power,
> which is connected to the emitter is 5V, then I'm set.

Presuming that you've taken care of the power and back EMF issues.

> What if my motor power was let's say 9V?  Does that mean, even though
> the microcontroller is holding the pin at 5V, the transistor would
> still turn on, because the emitter is at 9V and the base is at 5V?

That's right. Most times folks use a Darlington (or the complimentary pair
whose name starts with a SZ, szuliki?) config where the PIC drives the 1st
transistor base, which then drives the second base. Allows for higher voltage
and stiffer current for the main driver.

BAJ

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\05\01@154120 by David VanHorn

flavicon
face
>
>That's right. Most times folks use a Darlington (or the complimentary pair
>whose name starts with a SZ, szuliki?) config where the PIC drives the 1st
>transistor base, which then drives the second base. Allows for higher voltage
>and stiffer current for the main driver.

Sziklai pair.

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\05\02@123141 by John N. Power

flavicon
face
> From:         James[SMTP:.....jamesKILLspamspam.....2-BIT-TOYS.COM]
> Sent:         Saturday, May 01, 2004 2:52 PM
> To:   EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU
> Subject:      Re: [EE:] Interfacing an Active Low signal from a USB device with a Transistor for controlling a motor

> Thanks for all the useful information!

> To turn "on" the PNP transistor, the base has to be at least 0.6V less
> than the emitter (and also a small current needs to flow) right?

> So if my active low signal goes between 0 and 5V...and my motor power,
> which is connected to the emitter is 5V, then I'm set.
> What if my motor power was let's say 9V?  Does that mean, even though
> the microcontroller is holding the pin at 5V, the transistor would
> still turn on, because the emitter is at 9V and the base is at 5V?

> -James

The emitter cannot be at +9V with the base at +5V unless the transistor
is defective. Your first statement should read " . . the base can be no more than
0.6V less than the emitter . . .". You must use a resistor from the base
of the PNP to a circuit which sinks current to ground. Typically an NPN
transistor is used for this. The emitter of the NPN is grounded, and the
resistor referred to above goes to the collector. A resistor from the base of
the NPN is connected to the signal which turns on the NPN, and therefore,
the PNP. This source would be the microcontroller output pin.

When the I/O pin goes high, it sources current into the base of the NPN.
This current is limited by the NPN's base resistor. That current is multiplied
by the beta (current gain) of the NPN to produce an amplified collector
current, which becomes the base current of the PNP. The current is
amplified again by the beta of the PNP, giving a collector current which
drives the load. The current from the I/O pin is multiplied by the product
of the two betas, giving a result similar to that of a Darlington configuration,
but the arrangement of the transistors provides for limiting the currents
to reasonable limits.

The NPN bipolar transistor can be replaced by an N channel MOSFET. In
this case, the resistor from the I./O pin can be left out, but the first
resistor, from the PNP's base to the MOSFET is essential.

John Power

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

More... (looser matching)
- Last day of these posts
- In 2004 , 2005 only
- Today
- New search...