Maker Pro
Maker Pro

I need help on how to use LEDs on this project

Joe0311

Apr 28, 2017
1
Joined
Apr 28, 2017
Messages
1
Hi, I'm kind of a newbie on this stuff and well basically I was following a tutorial on youtube on how to control a DC Motor with Labview VI, this is the VI to be used with this project http://www.mediafire.com/file/p96ey18wikixyil/pwm.zip and I will leave the diagram at the bottom of the post.

I wanted to know if there is anyway that I could place 1 or 2 leds somewhere in the breadboard so when the motor starts the leds lighten up and turn off when the motor is not on. I tried placing the leds with their respective polarity to the + and - of the motor but still no luck, would I need resistors? and how can I place the components in order to get it to work?

Thank you very much in advance.

upload_2017-5-3_21-34-7.png
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Hi, I'm kind of a newbie on this stuff and well basically I was following a tutorial on youtube on how to control a DC Motor with Labview VI, this is the VI to be used with this project http://www.mediafire.com/file/p96ey18wikixyil/pwm.zip and I will leave the diagram at the bottom of the post.

I wanted to know if there is anyway that I could place 1 or 2 leds somewhere in the breadboard so when the motor starts the leds lighten up and turn off when the motor is not on. I tried placing the leds with their respective polarity to the + and - of the motor but still no luck, would I need resistors? and how can I place the components in order to get it to work?

Thank you very much in advance.

View attachment 33776
The problem with connecting different devices in parallel is that they have different electrical characteristics.
If I were you, I'd double up the circuit. Build another one of these, but remove the diode and motor. Replace it with a resistor daisy-chained to an LED.
The type of LED you choose will dictate what voltage is required... you may be able to get two to light up, but I can't say for sure.
Anyway, once it's built. connect the inputs of both the motor circuit and LED circuit together to control both from the same pin!
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
If you use a common 20mA Red LED you should be able to connect one end of a 220Ω resistor to +5V. Then connect the other end of the resistor to the Anode of the LED. Then connect the LED's Cathode to the Collector of the Transistor.

Chris
 

Audioguru

Sep 24, 2016
3,656
Joined
Sep 24, 2016
Messages
3,656
A red LED is about 1.8V and a white or blue LED is about 3.2V. Then since the supply is 5V an LED connected directly parallel with the motor will instantly burn out.

For 20mA use a resistor (5V - 1.8V)/20mA= 160 ohms in series with a red LED or a resistor (5V - 3.2V)/20mA= 90 ohms (use 91 ohms) in series with a white or blue LED.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
May 8, 2012
4,960
Joined
May 8, 2012
Messages
4,960
Since you haven't responded to any of the replies I'm going to assume that you might require a visual aid. Check out the attached schematic and see if it helps you. I chose 220Ω for R2 because it's common value that you may have in abundance. In reality you can use any value from 160Ω to 10KΩ. At 10KΩ the LED will still light but you may have to view it in the dark. The higher the value of R2 the less current the LED will draw. As the current through the LED goes down the dimmer it will be. Conversely the lower R2 is the more current will flow through the LED and the brighter the LED will be. ;)
Edit: AG gave you the formula to calculate the value of R2 vs LED current. The value of R2 should be calculated to never exceed 30mA!

Chris
upload_2017-5-5_8-57-57.png
 
Last edited:
Top