ground loop issue

hi everyone
i've built myself a sequencer for my synth (little phatty) using an arduino mega.
it's an analog (sort of) sequencer that outputs voltage from 0 to 5 v.
everything works perfectly exept for when i hook up the seq to the synth. The phattys leds start flickering and moving by them selves and weird stuff happens. but this only happens when the mega is powered by a transformer, because if i power it using a usb cable everything works perfectly.
googling i found out that the synth behaves weird due to a ground loop. (i had to google what a ground loop was)
anyways i can't find a way to power the arduino using the ac to dc transformer . i thought of hacking a usb cable into a power cable but i'm not completely sure it is a good idea, plus i think i've read somewhere that the usb port on the arduino can only feed the board 5 volts or so, thus not enough for the arduinos needs (7-12 volts), and the last thing i would need is an arduino running low on electricity (it has 36 outputs to feed!).
can anyone please help me? it is only my first project so i might even be missing something very obvious..and it is also the first time i use the forum, so please tell me if i'm doing something wrong.

thks

You'd better post the circuit diagram, the setup sounds complicated and a picture is worth a thousand words. I'm particularly interested in how much power your circuit consumes and how much decoupling you have.

I would be surprised if it is ground loops but not if it were lack of decoupling:-
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

ok here are some schematics of the gate and voltage output section of the sequencer...
notice that each arduino pin goes high and low before going on to the next pin, so you'll never have two pins on the voltage or gate section high at the same time.

schematic gate.PNG

schematic voltage.PNG

Sorry but that is not much of a schematic. You are having trouble powering it but there is no part of the schematic that shows this.
I assume there is something wrong with your power supply setup but this dosn't make it into the schematic.

my poor english must have lead to some misunderstandings, i apologize. :~
i'll try to explain myself better:
i haven't built myself yet a power section for the sequencer. i just use the mega's built in power jack or the built in usb port.
when i power the arduino from my computer using the usb cable, i have no problems at all and everything works perfectly.
instead when i power the arduino using it's power jack, the sequencer works fine, but when a connect it to my synth, the synth start's behaving strangely (this obviously should not happen, and does not happen if i power my arduino from my computer)...
i hope this clears out the problem i'm having.

MarkT:
a picture is worth a thousand words.

i'll also post a picture so i'm extra sure everybody will understand XD

Just to get things straight:-
when powered from the USB and connected to your synth it works
when powered from an external supply through the jack and connected to your synth it doesn't work

If that is the case then it is your external power supply that is faulty or in some way not right.
What voltage output is it?
Does it have a DC output or an AC one?
An AC output is wrong and might cause the problems you are seeing.

We are concerned that you are driving a lot of outputs and the 12V power supply isn't providing enough current. I'm also concerned that you might be switching lots of LEDs without enough decoupling, but I'm guessing from some of the comments - I haven't seen the diagram of these output loads.

The USB supply provides 0.5A normally, what is the rating of the 12V supply you are using?

i'm going to make this as clear as i can, starting from the beginning:
i have made a sequencer using an arduino mega, that outputs 0-3 volts.
the sequencer on it's own works fine powered either from the USB or from an external supply.
obviously a sequencer on it's own isn't very useful, and so i connect it to my synth.

here's where the problems begin: when i power the arduino sequencer from USB, the synth and the sequencer both work fine. :slight_smile:

instead when i power the arduino sequencer from an external output, the SYNTH starts behaving in a strange way (leds flickering, parameter values changing...), while instead the arduino sequencer itself looks fine and does what it's supposed to do.

i know for sure that the problem lies in my project because as soon as i disconnect the sequencer from the synth, the synth stops acting weird, and if i connect the sequencer back to the synth, the problems start again.

MarkT:
The USB supply provides 0.5A normally, what is the rating of the 12V supply you are using?

input: AC100-240V 50/60Hz 180mA
output: DC 12V 330mA

i hope this clears things up.
and thanks for helping anyways XD

So its possible that 330mA is not enough?

MarkT:
So its possible that 330mA is not enough?

no probably not.
i just found out that when i power the arduino sequencer using usb from my pc, if the computer is charging (attached to an external power supply) the synth starts going crazy, the same way it would if the arduino itself were powered from an external power supply.
simply disconnecting the laptop from it's external source solves the issue.

i seriously have no idea of why it behaves like this

So its possible that 330mA is not enough?

Yes it is totally possible.
Try a power supply with at least a 500mA capacity.

Grumpy_Mike:

So its possible that 330mA is not enough?

Yes it is totally possible.
Try a power supply with at least a 500mA capacity.

well ok, as soon as i can i'll give it a try

Sounds like its deffo the Power adapter not having 'nuff juice.
As USB ports deliver between 500mA and 900mA(depending on the version) you'd need a power adapter that conforms within those values.As you seems to be drawing a lot out of it with leds and all, go for the top values given !!

tommyrosa:

MarkT:
So its possible that 330mA is not enough?

no probably not.
i just found out that when i power the arduino sequencer using usb from my pc, if the computer is charging (attached to an external power supply) the synth starts going crazy, the same way it would if the arduino itself were powered from an external power supply.
simply disconnecting the laptop from it's external source solves the issue.

i seriously have no idea of why it behaves like this

You might have some (input) pins floating (not connected or grounded). Check all your connections carefully, it seems that an input is acting like an antenna.

iyahdub:
Sounds like its deffo the Power adapter not having 'nuff juice.
As USB ports deliver between 500mA and 900mA(depending on the version) you'd need a power adapter that conforms within those values.As you seems to be drawing a lot out of it with leds and all, go for the top values given !!

so i've bought an adapter that gives out 12V & 1A, i've tried it out but the problem still remains... =(

why is this happening?!

fro the arduino website

USB Overcurrent Protection
The Arduino Mega has a resettable polyfuse that protects your computer's USB ports from shorts and overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse will automatically break the connection until the short or overload is removed.

source: http://arduino.cc/en/Main/ArduinoBoardMega

so (if i've got this right) the usb won't ever deliver more than 500mA.

Backfeed to the USB port at the PC, not the supply from the PC to the 'duino..?

Check the true current consumption by getting a multimeter set to mA between the supply and arduino (put it between VIN pin and the supply).

Ok lets clear a couple things.
I was right in what i said that depending on the version will vary from 500mA to 900mA.
USB power is quite clean compared to a cheap power adaptor kind we find on the shops built in china ( ill give u an example- same as you built something, all sounded top, with a wall adapter, noise comes).
As said before you need a good decoupling, the cleanest psu u can get, and preferably a metal enclosure to avoid emf interference ).
Look for hot to filter hum and ground noise, as theres los of tutorials on how to, and decoupling of course !

tommyrosa:
i just found out that when i power the arduino sequencer using usb from my pc, if the computer is charging (attached to an external power supply) the synth starts going crazy, the same way it would if the arduino itself were powered from an external power supply.
simply disconnecting the laptop from it's external source solves the issue.

That suggests to me that the problem IS a ground loop. Laptop power supplies normally have a connection between the ground pin of the socket and the negative side of the output.

To verify this, try plugging the laptop power supply into a switched power socket. If the problem is caused by a ground loop, then it will occur whenever the laptop power supply is plugged into the mains power socket, whether or not the socket is switched on. But the problem will go away when you unplug the laptop power supply from the mains power socket.

Once you confirm that the problem is a ground loop, here are some things you can try:

  1. Run the synth and the Arduino from the same mains power socket, by using a 2-way adapter or a socket strip.

  2. Instead of connecting Arduino ground directly to synth ground through the cable that connects them, put a 100 ohm resistor in series with this ground connection. This will prevent large currents flowing through the ground loop.