Go Down

Topic: 2x Arduino: One as a power supply, One actioning 4 relays (Read 13853 times) previous topic - next topic

3AgL3_DeeJay


With that many LEDs you have to drive them with external drivers and use an external power supply.
example: ULN2803 (8 drivers in one I.C.).
Relays must have snubbing diodes across their coils to prevent Arduino damage.
Relay should be driven with drivers also, ULN2803 will do this.

I think i know what are you saying.
I searched google for some examples and I have an idea...
I have to start all over again with the scheme.
I will come back though (thanks for your patience)!


Good for you for learning Fritzing.

Its actually very easy to use. Is good for me. Thanks!
3AgL3 DJ Soft
We Make IT Happen

3AgL3_DeeJay

Oh. One lase thing before i go and buy all the parts and make the scheme...
I saw this picture (the one from attachments) on the web an i have this question:
Do i have to connect pins 1 to 8 from ULN2803 only to PWM pins on Arduino? Or it will work the same with any other digital pins?
Because even if i use the MEGA, i only have 12 PWM pins.  :~
3AgL3 DJ Soft
We Make IT Happen

larryd

Quote
Do i have to connect pins 1 to 8 from ULN2803 only to PWM pins on Arduino? Or it will work the same with any other digital pins?
Because even if i use the MEGA, i only have 12 PWM pins.

Unused pins on the ULN2803 can be left floating.
The 2803 can be used on any Arduino O/P not just PWM.

By some extra 2803s for future projects.
No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

3AgL3_DeeJay

#18
Jul 26, 2013, 05:47 am Last Edit: Jul 26, 2013, 05:49 am by 3AgL3_DeeJay Reason: 1

Unused pins on the ULN2803 can be left floating.
The 2803 can be used on any Arduino O/P not just PWM.

Ok. Awesome!
And i don't need to use any resistors between Arduino's Digital pins and pins 1 to 8 from ULN2803, right?
Only between ULN2803's output pins and the LEDs.

Quote
Buy some extra 2803s for future projects.

That's my plan... :)
3AgL3 DJ Soft
We Make IT Happen

larryd

Quote
And i don't need to use any resistors between Arduino's Digital pins and pins 1 to 8 from ULN2803, right?
Only between ULN2803's output pins and the LEDs.

Resistors between Arduino and 2803 are not needed, they are already exist in the 2803.
LEDs need the resistors.
No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

3AgL3_DeeJay

Done!
I hope this scheme is the one... :D
I'm waiting for your advice. :)
3AgL3 DJ Soft
We Make IT Happen

larryd

#21
Jul 27, 2013, 03:14 am Last Edit: Jul 27, 2013, 03:18 am by LarryD Reason: 1
You have GND going to the Anodes of the LEDS, you want +5V to the Anodes.
Your 2803 to the relays should be turned 180'  EDIT:  PINS    1,2,3,4,5,6,7,8 are the inputs to the 2803   9 is GND and 10 connects to +V
No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

3AgL3_DeeJay


You have GND going to the Anodes of the LEDS, you want +5V to the Anodes.

I know that. I will put the LEDs the right way on the board. In Fritzing i don't have the option to mirror the LED. Only Turn them around...


Your 2803 to the relays should be turned 180'

Yeah. I can see that now. Thanks! I'm changing it now...

But, the rest of the circuit is ok? I can go on and install all the parts according to the scheme? :D
3AgL3 DJ Soft
We Make IT Happen

larryd

#23
Jul 27, 2013, 03:30 am Last Edit: Jul 27, 2013, 03:37 am by LarryD Reason: 1
You are showing the Black wire (GND) of the external power supply going to the LEDs, you should have the Red wire (+5V) going to them.

+5V(red wire)----LEDs----Resistors----2803 o/p----2803 pin 9----GND
No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

3AgL3_DeeJay

#24
Jul 27, 2013, 03:37 am Last Edit: Jul 27, 2013, 03:50 am by 3AgL3_DeeJay Reason: 1

You are showing the Black wire (GND) of the external power supply going to the LEDs, you should have the Red wire (+5V) going to them.
+5V(red wire)----LEDs----Resistors----2803 o/p


I'm confused. Why the +5V wire?
Isn't supposed to go like this: I send the "HIGH" signal from the Arduino digital pin, then it goes to the ULN2803 pin (1 to 8 ), then the 2803 opens the current flow from the 5V (External Power Supply) to the LEDs (through the resistors), and finally the GND wire closes the circuit?  :smiley-roll-sweat:

Like this example: http://arduino.cc/en/uploads/Tutorial/Unipolar_bb.png
or this: http://www.betasix.net/wp-content/uploads/2011/02/unipolar_stepper_bb.jpg
3AgL3 DJ Soft
We Make IT Happen

larryd

Quote
Isn't supposed to go like this: I send the "HIGH" signal from the Arduino digital pin, then it goes to the ULN2803 pin (1 to 8 ), then the 2803 opens the current flow from the 5V (External Power Supply) to the LEDs (through the resistors), and finally the GND wire closes the circuit?


The o/p of the Arduino goes HIGH (+5v) this goes to 2803 pin 1, the 2803 o/p pin 18 goes LOW (0V) to the 220R resistor  to the cathode of the LED to the anode of the to external power supply +5V.

So current flows from external power supply: +5V through the LED through the resistor through the 2803 o/p to common GND.
No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

3AgL3_DeeJay

Now its all messed up in my head... :(
Can you make a quick scheme so i can go on from there? :D
3AgL3 DJ Soft
We Make IT Happen

larryd

Quote
Can you make a quick scheme so i can go on from there?

Go for it.
No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

3AgL3_DeeJay


So current flows from external power supply: +5V through the LED through the resistor through the 2803 o/p to common GND.


Ooowww.. Now i get it!
After viewing this:
http://api.ning.com/files/lyZJ4sHCUXfT1vzV*S**kFRxKW8uNstSoiAb834uSei5yEodIY-oXjQ25RJCyiwVgRF1MafYX7BHsraproJ3og__/LEDs.jpg

This is how is supposed to be right?
3AgL3 DJ Soft
We Make IT Happen

larryd

Quote
http://api.ning.com/files/lyZJ4sHCUXfT1vzV*S**kFRxKW8uNstSoiAb834uSei5yEodIY-oXjQ25RJCyiwVgRF1MafYX7BHsraproJ3og__/LEDs.jpg


Cannot get at this

See attached drawing:
No technical PMs.
If you are asked a question, please respond with an answer.
If you are asked for more information, please supply it.
If you need clarification, ask for help.

Go Up