decoupling capacitors

Hi everybody, I'am having problems to get stable behavior of my electronic assembly. I am using : 1 switched-mode 5V power supply 1 arduino uno 1 shift register 1 uln2803 transistor array (1) 8 channel relay card

i am controling 220v bulbs and it is not stable at all: arduino crashes relay card keep restting from time to time

I think i need to add those decoupling capacitors. please how to? 1. shift reg 2. uln2803 3. and the most confusing how to add it to the power supply 4. the values of those capacitors?

i have some D104K 0,1µf capacitors ... can i use them? thank you for reading this :)

Show your wiring.

|500x307

Sorry, what I was looking for was a photo of your wiring.

And yes you must have decoupling on your proto board I.C.s (try what you have before buy anything else).

Add 0.1uF cap from HC595 pin 16 to Gnd. Relay board looks like it has parts to drive the relay coils - why do you need the ULN2803 at all? 5V relay coils often need higher current - you don't show them being powered.

LarryD: Sorry, what I was looking for was a photo of your wiring.

And yes you must have decoupling on your proto board I.C.s (try what you have before buy anything else).

OK i know this but how to do this? where to put those capacitors?

CrossRoads: Add 0.1uF cap from HC595 pin 16 to Gnd. Relay board looks like it has parts to drive the relay coils - why do you need the ULN2803 at all? 5V relay coils often need higher current - you don't show them being powered.

Which pin of the HC595 ... vcc pin i suppose? ULN2803 is used to give enough current to relays since the output of HC959 is low

i'am powering everything from my switched-mode 5V-5A Power supply

Pin 16 to ground.

For your reference: http://www.analog.com/media/en/training-seminars/tutorials/MT-101.pdf

Between power and ground as close to the part as possible.

bilald: Which pin of the HC595 ... vcc pin i suppose? ULN2803 is used to give enough current to relays since the output of HC959 is low

i'am powering everything from my switched-mode 5V-5A Power supply

The relay board contains no transistor or optoisolator to drive the relay? The relay is driven directly from the inputs on that board? That's not a very good board. Do you have a link to it? Most borads being sold are like this one:

http://www.ebay.com/itm/8-Channel-5V-Relay-Interface-Module-Board-w-Optocoupler-Isolation-by-PIC-Arduino-/271738487715

There is an optoisolator on the input. You don't need to supply a lot of current because all it does is turn that isolator on or off and the isolator supplies the current to the relay. That is what Crossroads was getting at. Does your board really contain no isolation? That is not common anymore. If it does contain isolators to drive the relays then Crossroads is right, there is no need for a transistor array.

Hey, you show no ground between Arduino and the rest of the circuit. Is the Arduino powered off the power 5V power supply or a different power supply? If something else, you have to combine grounds to make a common ground for the entire circuit.

Just as a warning (Had an issue with it before, so I wanted to share it!)

What kind of power supply are you using? A lot of power supplies have a minimum current requirement, sometimes exceeding 0.5A... So if less current is drawn from it, the 5V becomes unstable.

I'm powering everything from the switched-mode power supply (5V 5A). I added two 100nf capacitors to the register and the transistor array ... better results but still not perfect the relays card contain tinny transistors.

I tried 220v 5W led bulbs and the result is better too

FYI, decoupling or bypass capacitors almost always go between your power supply and ground, you want is as close to the pin as reasonable to solve noise issues. If they are not close to the pins then the bypass caps will be seen as bulk capacitance by the devices that provide the switching noise which is a good thing too....a good system uses both

bypasses are generally chosen according to speeds, it looks like your system is probably on the slower side of things so you may want to stay in the 0.1 to 1uF range.

You also may want to consider using a common mode choke because it looks like you are using a 1RU Switching Power supply. A common mode choke has both power and ground running through it so the net current is zero so you don't have to worry about saturation.

Do you have access to an oscope?

If your issues are related to noise those two should quite your system down nicely, if not then look at your wiring connections and code.

Oh just saw your last post 0.1uF are good but you may want a couple 1 and 4.7uF, I'd be worried more about your lower frequency noise that the higher end where you would use .1 and .01uF

The ULN2803 needs lots of decoupling on its supply as its driving high currents. Start with 100uF or thereabouts from common to ground. Its a slow chip so 0.1uF ceramic won't do anything, but the '595 shift register must have that sort of value in ceramic - all logic chips need decoupling, because of the extreme high speed of switching (measured in nanoseconds).