Rozalija
Posts: 6
Joined: Sun Nov 22, 2015 3:47 pm

ULN2803 Problem: LED and Motor (series)

Tue Jan 12, 2016 11:55 pm

Hi ,

This is the schematic of what I have built. The +5 volt of the GPIO is connect to a motor and LED (series). The problem is that only the LED is turned on and the motor vibrates VERY slow. Hard to notice the vibration even. If the LED is bypassed, the motor works quite strong. Any Idea for this problem? Is it coming from ULN2803?
Any help is highly appreciated.

Best,
Attachments
Untitled.jpg
Untitled.jpg (50.36 KiB) Viewed 2156 times

rzusman
Posts: 346
Joined: Fri Jan 01, 2016 10:27 pm

Re: ULN2803 Problem: LED and Motor (series)

Wed Jan 13, 2016 1:03 am

You don't want the LED in series with your motor!

User avatar
Tage
Posts: 287
Joined: Fri May 24, 2013 2:29 am
Location: St Thomas, Ontario Canada

Re: ULN2803 Problem: LED and Motor (series)

Wed Jan 13, 2016 2:06 am

yugi_oh wrote:Hi ,

This is the schematic of what I have built. The +5 volt of the GPIO is connect to a motor and LED (series). The problem is that only the LED is turned on and the motor vibrates VERY slow. Hard to notice the vibration even. If the LED is bypassed, the motor works quite strong. Any Idea for this problem? Is it coming from ULN2803?
Any help is highly appreciated.

Best,
What is the voltage drop of the ULN2803 and the LED? How much voltage is left for the motor?

Rozalija
Posts: 6
Joined: Sun Nov 22, 2015 3:47 pm

Re: ULN2803 Problem: LED and Motor (series)

Wed Jan 13, 2016 7:54 am

rzusman wrote:You don't want the LED in series with your motor!
Actually I want. What kind of answer is that ?!
Tage wrote:What is the voltage drop of the ULN2803 and the LED? How much voltage is left for the motor?
I haven't checked the ULN2803 voltage drop, but the voltage drop of the LED is not that much I checked it as follows:
I connected a single Motor/Led hooked up in series with a separate power supply, both of them worked correctly even with 4.4 volt. and the output of the raspberry pi is 5V. So I believe the ULN2803 is the culprit but I don't know why. I am going to test another buffer today. But if that one also doesn't work, I am really out of idea :oops:

rzusman
Posts: 346
Joined: Fri Jan 01, 2016 10:27 pm

Re: ULN2803 Problem: LED and Motor (series)

Wed Jan 13, 2016 3:03 pm

No, you don't want the LED in series with your motor!
That just shows you don't understand what you are doing.

Put the LED in parallel with the motor and remember to use a dropping resistor.

Ask yourself - how much current does it take to run the motor?
Then, ask yourself - how much current can an LED handle?

Rozalija
Posts: 6
Joined: Sun Nov 22, 2015 3:47 pm

Re: ULN2803 Problem: LED and Motor (series)

Wed Jan 13, 2016 7:47 pm

rzusman wrote:No, you don't want the LED in series with your motor!
That just shows you don't understand what you are doing.

Put the LED in parallel with the motor and remember to use a dropping resistor.

Ask yourself - how much current does it take to run the motor?
Then, ask yourself - how much current can an LED handle?
I appreciate your answer, but I still can't understand why does a single motor/LED pair with that configuration works when a separate power supply is being used. Having this question in my mind, I finally used them in parallel (with a 300 ohm resistor hooked up series with the LED). Do you have any answer for that ?

Mithrandir
Posts: 16
Joined: Sat Jan 09, 2016 4:44 pm
Location: Poole, Dorset

Re: ULN2803 Problem: LED and Motor (series)

Wed Jan 13, 2016 7:53 pm

An LED in series will drop 1.7v approx across it, so your motor is only getting 3.3v across it and this is probably insufficient to drive it correctly.

put the led in parallel ( with a series resistor) if you want light up on run, or a 1n4001 in series if you need blocking ( that will handle 1 Amp and only drop 0.6V across it).

User avatar
Tage
Posts: 287
Joined: Fri May 24, 2013 2:29 am
Location: St Thomas, Ontario Canada

Re: ULN2803 Problem: LED and Motor (series)

Thu Jan 14, 2016 2:56 am

yugi_oh wrote:
rzusman wrote:You don't want the LED in series with your motor!
Actually I want. What kind of answer is that ?!
Tage wrote:What is the voltage drop of the ULN2803 and the LED? How much voltage is left for the motor?
I haven't checked the ULN2803 voltage drop, but the voltage drop of the LED is not that much I checked it as follows:
I connected a single Motor/Led hooked up in series with a separate power supply, both of them worked correctly even with 4.4 volt. and the output of the raspberry pi is 5V. So I believe the ULN2803 is the culprit but I don't know why. I am going to test another buffer today. But if that one also doesn't work, I am really out of idea :oops:
The Darlington array probably drops about 1.3V, and the LED voltage drop depends on what type of LED it is. If we assume the LED voltage drop is 1.7V then the motor only has 2V if the supply is 5V.

daniel6610
Posts: 4
Joined: Fri Apr 19, 2013 5:10 am

Re: ULN2803 Problem: LED and Motor (series)

Fri Jan 15, 2016 6:08 pm

I hope this helps with the hook up at least.
Hooked up the way you want it, the following picture shows the correct wiring for the ULN2803.
This is only showing one motor/led, but more could be hooked up on the other pins.
Ideally, I would suggest using a separate power supply for the led/motors though. Drawing too much power from the RPi can cause failure of the RPi.
To add secondary power supply, just remove wire from 5v pin on RPi and connect power to the power rail. make sure you keep the ground to the RPi or it won't work.

Feel free to ask if you have any more questions.
Attachments
ULN2803Led-Motor.jpg
ULN2803Led-Motor.jpg (51.26 KiB) Viewed 1880 times

User avatar
davidcoton
Posts: 4139
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: ULN2803 Problem: LED and Motor (series)

Fri Jan 15, 2016 8:24 pm

daniel6610 wrote:I hope this helps with the hook up at least.
Hooked up the way you want it, the following picture shows the correct wiring for the ULN2803.
Hook up wasn't the issue. The circuit is wrong. LED and motor in series will not work well.
daniel6610 wrote:Ideally, I would suggest using a separate power supply for the led/motors though. Drawing too much power from the RPi can cause failure of the RPi.
To add secondary power supply, just remove wire from 5v pin on RPi and connect power to the power rail. make sure you keep the ground to the RPi or it won't work.
Ideally, yes. Every time, yes. It's not just the motor current draw through the Pi which could cause problems. Motors generate all sorts of rubbish back down the power connections, which could damage the Pi even if it is not overloaded. USE A SEPARATE POWER SUPPLY EVERY TIME.
Signature retired

eagleman
Posts: 45
Joined: Fri Jan 01, 2016 7:43 pm

Re: ULN2803 Problem: LED and Motor (series)

Sun Jan 17, 2016 8:35 pm

Remember, the ULN28003 only has so much current it can handle to feed a motor. any additional draw can be hazardous to it's health. You might try using 2 separate ULN28003 in parallel ( not 2 channels from the same chip) AND a separate power source to avoid damage to your PI. As stated above, the motors kick back all sorts of (possibly dangerous) spikes and junk from collapsing magnetic fields when they switch poles. You might also consider using the ULN28003 output to control a another semiconductor with a much greater capacity. They are readily available and fairly inexpensive considering what you would have to pay for a new PI and new ULN28003s. just saying...
eagleman
Virginia Beach, VA. USA

User avatar
Burngate
Posts: 6005
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: ULN2803 Problem: LED and Motor (series)

Mon Jan 18, 2016 10:06 am

... though the 2803a can handle 500mA, but a led can only handle about 20mA, so the led will probably die before the 2803

User avatar
davidcoton
Posts: 4139
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: ULN2803 Problem: LED and Motor (series)

Mon Jan 18, 2016 11:29 am

Burngate wrote:... though the 2803a can handle 500mA, but a led can only handle about 20mA, so the led will probably die before the 2803
While they are in series, yes. When put in parallel, the motor current (unspecified here) is the critical factor and may or may not be within the 2308a's limits.
Signature retired

User avatar
Burngate
Posts: 6005
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: ULN2803 Problem: LED and Motor (series)

Tue Jan 19, 2016 5:09 pm

davidcoton wrote:
Burngate wrote:... though the 2803a can handle 500mA, but a led can only handle about 20mA, so the led will probably die before the 2803
While they are in series, yes. When put in parallel, the motor current (unspecified here) is the critical factor and may or may not be within the 2308a's limits.
Very true.
Effectively, with his series connection, the LED will act as a fuse protecting the chip.

Since he's not told us anything about the motor, or his "separate power supply" on which it "worked correctly even with 4.4 volt", most of the posts here are working in the dark.

He should put the LED plus resistor in parrallel with the motor.
He should find out what current at what voltage the motor is designed for.
He should look at the data sheet for the ULN2803
With that information he should decide whether that chip is suitable, and find a suitable power supply.

As regards his claim that "I connected a single Motor/Led hooked up in series with a separate power supply, both of them worked correctly even with 4.4 volt" I'm dubious.

Return to “Advanced users”