Go Down

Topic: Relay and LCD Issue (Read 7196 times) previous topic - next topic

Peri

Dear Friends,
I am in the process of designing a Aquarium Controller.

All the circuits were working properly Individually.

This is how it is done:
1. used the 8 Addresses of I2C to IO Expander in using PCF 8574 to get 8x8 = 64 outs, made a distribution board for this expansion.
2. Used one set of the 8's for LCD I2C Display a 20X4 Display. Which works perfectly.
3. Used one set of the 8's for Keyboard inputs, that also works perfectly.
4. used two sets of the 8's (16 outs) to control 16 Relays for turning on and off lights and motors. the OUT's of the 8574 is given to ULN 2003 (Relay Drivers) and from the ULN 2003 taken to the relays to drive them. I have not used any resistors or transistors in this circuit. the Relays are all 5V coils, and the power for the coils are taken from the distribution board. NO SEPARATE POWER SUPPLY FOR THE RELAY CIRCUIT.

These are the following issues:
1. Adjustment of the pot in Pin 3 (Variable) of the LCD does not change any thing in the LCD. The Backlight Voltage is 2.8V instead of the 4.2 V as required but still there is good backlight in the display.

2.The main issue is when the relay's are not connected to the Distribution board, the LCD display is bright, but the moment the Relays are connected, the Brightness of the LCD (White text) is reduced proportionately. i.e., when there are more relays are ON the Brightness reduces drastically, when the ON relays are less the reduction in brightness is less.

Dont know what to  do in this scenario.

Is there something that i am doing wrong? or adding a transistor / Capacitor will help? Just an amateur in electronics.

Kindly help.

regards
Peri

mikericeTGA

The Arduino can only provide about 500 mA running off USB.
Even using an external supply, it can only provide about 800 mA.


MikMo

#2
Oct 26, 2009, 10:14 pm Last Edit: Oct 26, 2009, 10:20 pm by MikMo Reason: 1
800 mA would in my opinion require a very serious heatsink on the voltage regulator on the Arduino board.

And a USB port can deliver a max. of 500 mA, but you are not guaranteed that.

You need an external powersupply. It's a little unclear if you are already using one for the distribution board, if you are, it's should probably be exchanged with one with a higher current rating.

Peri

I am not currently using an external power supply. I am using the USB on the Aduino.

I will link up the external power supply to the Distribution board, but the power supply i have is rated for 1A only. is that alright? or should i need an higher rating one?

Regards
Peri

retrolefty

Quote
i have is rated for 1A only. is that alright? or should i need an higher rating one?


One amp input into the external power connector is about all the board can handle due to it's polarity protection diode and +5vdc regulator current rating.

Lefty

Peri

No, i am not planning to put that 1A power into the Ardunio supply and take the +5/gnd from Ardunio to Distrubition Board...

I am going to put the 1A power into the Distribution Board directly. will that work?

but then how do i power my ardunio? if i am not connected to the USB?

mikericeTGA

The relays are where the bulk of the power is being used.
Even a 'sensitive' type relay can consume 40 ~ 50 mA.
With 16 of them on simultaneously, you're drawing 640 mA.

I would modify your design to power just the relays from the external supply, and everything else from the Arduino supply. This can be done safely since the ULN2003 is an open collector design, and is probably an easy modification. As a side effect this will inhibit any switching noise from the relays from getting into the rest of the system.


    Isolate the relay bank positive supply from the rest of the distribution board. BE SURE to include the ULNs diode COMMON pin!

    Connect the ground of the distribution board, the ground of the external supply, and the Arduino ground together, at one AND ONLY one point.

    Connect the external supplies positive terminal to the relay bank positive supply.


Everything should work OK at that point.

Peri

thanks for the input.

I tried the following:
1. Supplied +5v 1A power supply to the relay board. Ardunio was powered by the USB.
2. the Ground pin of the External Power Supply and Distribution board were connected together to have a common ground.
3. Send the Ardunio outs to the ULN 2003, the out of the ULN to the Relay coil pin the other relay coil pin to the + of the 5v External Supply.
4. When i turned one after another of the relays, it worked till the 14th turned on and then it was continuously clicking noise i.e., ON/OFF/ON/OFF... and i had to turn the system off... have got no DIODES on the coil side of the Relay. But have a resistor and LED for display side.


is this because the 1A is not enough? or is there something wrong i am doing?

also have a few queries in your reply:
"Isolate the relay bank positive supply from the rest of the distribution board. BE SURE to include the ULNs diode COMMON pin!",  the COMMON Pin of ULN is the ground pin of ULN that you are referring to right?

"Connect the ground of the distribution board, the ground of the external supply, and the Arduino ground together, at one AND ONLY one point", Here is what i have done: taken the GND of External and put it on the Relay Board, then taken a wire from the relay GND to the Distribution Board GND. This Distribution Board GND is connected to the ARdunio GND. Is this alright?

Grumpy_Mike

Quote
have got no DIODES on the coil side of the Relay.


You need diodes here.
You need diodes here.
You need diodes here.

Quote
it worked till the 14th turned on and then it was continuously clicking noise i.e., ON/OFF/ON/OFF.

Was that just the 14th?
It could be lack of current with 14 relays at 1A you only have 70mA per relay and that is a bit light (what does the relay data sheet say).

You could also do with some supply decoupling across each of the relays.
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Peri

#9
Oct 30, 2009, 05:59 pm Last Edit: Oct 30, 2009, 06:01 pm by Peri Reason: 1
Thanks Mike for the inputs. The rating is for 70ma Max for the relay, and i guess it is due to the 1A input.  Acutally anything beyond 14 relays it goes into oscillation... so thinking of using a 2A power to check it out..

also now since i have already done the PCB.. i am thinking of removing the display LED and getting in the diode and capacitor (de-coupler) ...



kindly give your suggestions. I am also sourcing for a 2A power supply to run the relays.

retrolefty

Your modified drawing looks wrong. The protection diode wires right across the two relay coil terminals with the didoe cathode lead wired to the terminal you have marked +. The bypass cap wires from that same + terminal to ground.

Lefty

Peri

#11
Oct 30, 2009, 06:39 pm Last Edit: Oct 30, 2009, 06:41 pm by Peri Reason: 1
is this correct?


mikericeTGA

BE SURE to include the ULNs diode COMMON pin!

The ULN driver chip has a 'free-wheeling' diode for each transistor. The purpose of these diodes are to protect the transistor from high voltage spikes when switching inductive loads... such as relays. All these diodes are connected together at pin 9, which is supposed to be connected to, in this case, the relay positive supply.

As for the grounds, it sounds like you have 'daisy chained' grounds. It might be OK, or you might get strange, intermittent problems.

Better would be to run 3 separate ground leads...

    from the Arduino to the external supply ground,
    from the distribution board to the external supply ground,
    and from the relay board to the external supply ground.

Use 22 awg wire or bigger (bigger is better).

retrolefty

#13
Oct 31, 2009, 02:06 am Last Edit: Oct 31, 2009, 02:07 am by retrolefty Reason: 1
Quote
is this correct?


Yes, better. However what you are calling ground is really a switched source to ground through the ULN array, correct? The cap should really wire to a true full time ground connection.

Lefty

Peri

mike - i have connected pin 9 of ULN to GND of the +5 Power for the Relay Board.

this is what i shall be doing:
1. There are two power supplies from the transformer of +5V/3A. one (+ and GND)goes to the Ardunio and other (+ and GND) goes to the RELAY circuit. Here both the GND's are connected together in the Transformer circuit itself.
2. Then, from Ardunio to the Distribution board - +5v/Gnd from Ardunio .
3. Distribution Board GND and Relay Board GND are connected together to complete the loop.

is this alright?

Lefty, what do you mean by "CAP to true Ground"?


Go Up