Arduino power issue !!?

hi friends, here comes another issue...

i finished part of my setup for my ardugarden.. however im having a problem... the appartment im in is pretty old but refurbished ... whenever the printer goes on, my lights flicker...(fyi)

the arduino is plugged into the wall (9v) its running 2 ralays at 3.3v. an lcd a potentiometer for user input 2 buttons.

now... when i plug something in in the same room it SOMETIMES happens that the lcd outputs a whole lot of junk... most of the times i cant even understand where its coming from sometimes its just an addition character ...

first i thought it was my code.. but before going to the computer i tried hooking the arduino up to a 9v battery pacl... same problem. then i removed the digital pins going to the relay. same problem those pins back in place i removed the power from the relay bread board, same problem. that got me thinking... the problem is not in my code its from something plugging into one of my power outlets.

only way i can remove the error is to press reset - wouldnt be a problem, except the plants need their light in regular intervals...

any ideas?

any questions ... let me know.

THANKS!

i found this but i am not sure how i can use these ideas to my advantage... http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1267191695/9

What comes to mind is some OLD wiring, some 110 ARCING that causing your AC wiring to act like the original Spark Radios. I would guess that you are picking up a radio spike with your wiring the same way a receiver does... but that;s just my guess. I had this happen with a circuit that drive solenoids once... they would cause a spike that reset my circuit till I got it under control (AKA redesigned it)

only way i can get it to work without error is to completely detach the relay circuit AND attach a 9v block instead of a wall unit.

if i only detach the relay but leave the arduino hooled up to the wall outlet the problem persists. [edit]which is odd because the coil in the relay does not touch the power wire right? so how would that be noticed? if i leave my digital output pins connected to the relays but remove the power source from arduino to relay i can eliminate the problem too. (with 9v block, off grid…)[/edit]

this leads me to believe the problem is coming from 2 directions:

1 the relays hooked up to light and pump which are in turn hooked up to the wall
2 the power unit that gets juice to the arduino from the wall…

what can i do about this ?? please help :D!!!

bump,

When you say you are controlling the relay with a digital pin, you -are- doing so thru a transistor (or mosfet), right? Its not directly connected, right?

If not - you need to do this -first- (also, remember your flyback diode across the relay coil).

Finally - if you have all that set up, and are still running into an issue, pwillard could be right; in that case, you want to isolate the Arduino from the control of the relay via an optocoupler. The output of the optocoupler would then drive the transistor, which would drive the relay.

yes of course. I am using transistors and diods for both my relays. what sort of optocoupler? Do you have a specific solution in mind?

would this work? http://www.instructables.com/id/Make-a-simple-optocoupler/

that would take care of the relay side,... what about the power for the arduino?

thank you!

only way i can get it to work without error is to completely detach the relay circuit AND attach a 9v block instead of a wall unit.

It looks like a severe case of lack of decoupling made worse by poor mains. See:- http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html Because of the poor mains you will probably have to put a very large capacitor across the 9V. See what you can get but I would have thought 220uF at a minimum and perhaps even more.

What is the current capacity rating of your 9 volt wall wart? And it is a DC and not AC wart, right?

Lefty

What is the current capacity rating of your 9 volt wall wart? And it is a DC and not AC wart, right?

It looks like a severe case of lack of decoupling made worse by poor mains.

I am not sure what to make of this, I am decent with electronics but no where near your skill level. thanks for the link tho…

i figured out that the error i am getting affects the lcd only! the code still runs fine. so i ran a few tests with my multimeter and found out that the breadboard that holds both relays (3,3v from arduino) does not cause the error through the digital pins(output) but through the 3.3V and gnd wires from the arduino… so decoupling the digital output wires wont have much of an effect right?

Im rather new to the whole thing so go easy :wink:

Which Arduino board are you using. The 3.3vdc from older Arduino boards is very limited (50ma or less) but the newer ones have more capacity as I understand. Knowing how much current the relay coils requires would also be helpful to know.

Lefty

well its a duemilanove, are the uno boards the newer ones you are referring to?

the relays are rw-ss-103d hrere is the datasheet http://www.rapidonline.com/netalogue/specs/60-4660e.pdf

i tried using a voltage spliter (two resistors) and a 5V power supply from a cellphone charger. However the power is defenetly enough to turn the relay on(tried it), but my breadboard is set up to use this method: http://www.arduino.cc/playground/uploads/Learning/relays.pdf

and for some reason i cannot make it work using the phone charger instead of the 3.3v supply off the arduino .. :-/....

Well that relay has a 25 ohm coil, so powered from 3.3vdc will draw 132ma of current, much too much for the 3.3vdc pin on your model Arduino. You could power the relay with +5vdc pin on your Arduino if you wired a series voltage dropping resistor of around 10 ohms between one of the coil terminals and going to the +5vdc pin. That would drop 2 volts leaving 3 volts for the relay.

Lefty

I’m wondering why choose 3V relays when the 5V or 9V ones would have been more suitable to your power supply (and draw less current, be more efficient)?

i had 3v relays on hand and did not want to order/buy any...

circuit diagram coming soon..

circuit diagram coming soon..

And hopefully some 10 ohms resistor also? circuit diagram coming soon..

Instead of a single voltage dropping resistor per relay you might be able to wire 2 or 3 diodes in series from the +5vdc to both the relays in case you happen to have 1N4001-4007 type diodes hanging around. each diode will drop about .6vdc.

Lefty

Instead of a single voltage dropping resistor per relay you might be able to wire 2 or 3 diodes in series from the +5vdc to both the relays in case you happen to have 1N4001-4007 type diodes hanging around. each diode will drop about .6vdc.

why would my voltage splitter not work (2 resistors..)? my multimter does show 3v output but it does not activate the relay ...

i didnt bother with uploading images. maybe you guys can recomend me a good site for that via pm.

here is the fritzing file... http://fritzing.org/media/fritzing-repo/projects/g/garduino/fritzing/garduino.fz

i drew most of it by heart but it should be correct.. if you notice anything off, post please!!! thanks!

[edit]here i just created a mediafire account heres my pdf of the fritzing file.. http://www.mediafire.com/file/cl8fz917k69cn52/garduino_bb.pdf[/edit]

To be honest... you really should not consider using that 3.3V source for much of anything. (especially not a relay) It's really sort of a side effect of having the FTDI chip there.

To be honest… you really should not consider using that 3.3V source for much of anything. (especially not a relay) It’s really sort of a side effect of having the FTDI chip there.

I agree.

It could be said that it has created more problems and damage then benefits and probably a poor design choice. However the newest boards, not having FTDI chips have utilized a real 3.3volt regulator. That should result in less damaged boards as a regulator will automatically shutdown if too much current is attempted to be drawn from it.

Lefty

what do you think of my design?

would this work? http://www.sparkfun.com/products/114 i got all the parts for 1.20 today here in phoenix all new :D (found the most awesome electronics place in phoenix ahaha)