My sketch simply toggles the state of any one of the mosfets. When I hooked it all up, sent my command, all 4 amps turned on rather than just one. I apparently had an unintended path to ground. I started removing potential paths. All 4 amps have a common audio input, connected to an RCA jack which was connected screwed to the chassis. When I removed the RCA connectors from the chassis, there was a bit of a spark. I thought I had removed my ground path. That's when things started to go bad. First my USB to RS232 adapter which was sending the commands, stopped working, then the Arduino followed. The adapter is still recognized by my computer but Windows says that a device has malfunctioned and is not recognized. The arduino is no longer recognized by my computer at all. Device manager does not refresh when I plug it in. On light comes on along with the pin13 LED. Pin 0 and 12 are stuck high. Pins 1 and 13 both show a couple volts. Reset does absolutely nothingI'm assuming that there was somehow another path to ground or something.
Now I have two questions.
If I change the mosfet board for something that switches the positive rather than the negative, do you think that is a solution? I don't wanna blow any more stuff up.
Can I put a new ATmega328 in my UNO to bring it back to life?
You must have mucked something up pretty badly to blow the Arduino because the
schematic shows the MOSFET inputs are "supposedly" isolated from the outputs through
optoisolators.
I say "supposedly" because both input and output side grounds on the schematic are
labeled EXACTLY the same = "GND". Doesn't give me any faith at all in using this board,
since either the designers were morons, and both side grounds are the same, or else
they just plain screwed up writing a trivial schematic. Duh.
You also did not say exactly how you connected the MOSFET outputs to the amps.
Doesn't matter, however, AFAIAC. I would toss the board and get one with 4 relays
on it, and use them to switch the high-side power.
Then, hopefully you could have the amp supply gorunded on its end, and also the
Arduino grounded on its end [ie, via the PC USB port], and you shouldn't be blowing
up too much.
You probably need a new Arudino chip, but you don't know if anything else is blown on
the Arduino board until the chip is replaced.
I attached this schematic. I also checked the grounds on the input and output side, and they are indeed connected. Another revelation I had is that on the amp, the ground on the audio input, is connected to the ground of the voltage input. Since all 4 amps share a common audio in, an N-type mosfet will never work because if you turn on one, they will all turn on, which is what I was seeing before everything broke down. Is there any way to check the Arduino to see if I ruined the USB to serial chip?
I attached this schematic. I also checked the grounds on the input and output side, and they are indeed connected.
So much for having an optoisolator.
Another revelation I had is that on the amp, the ground on the audio input, is connected to the ground of the voltage input.
That's to be expected.
Is there any way to check the Arduino to see if I ruined the USB to serial chip?
Remove the Arduino chip, and jumper the RX,TX pins at the header. Then run a terminal
emulator on the PC, Serial Monitor should work, and then any keypresses on the PC should
be echoed back.
However, it's conceivable the faulty grounding burned some traces on the I/O pins that were
connected to, etc.
Thanks. Appears the board is dead. Last question.. Has anyone seen a P-type fet board similar to the one I had? Optos are optional I guess. All I can find are N-type. I'm surprised there arent more of these around. Or would you use a relay board like this, SainSmart 4-Channel 5V Relay Module for Arduino Raspberry Pi – SainSmart.com
For things that communicate you want a common ground. But the opto is simply an LED that triggers a transistor. Therefore I agree, the ground of the LED should be completely isolated from you high current circuit.
That should fine ok, and it's cheap too. But it's a funny design. They have "2" [count'em 2]
isolations, first the optoisolator and then the relay, with coil separate from contacts, like on
all relays. They don't need the opto, could just run the Arduino signal into the NPN base
resistor, and then the current draw on the Arduino would be nill.
Finally got my replacement parts and wanna make sure I don't blow it again. I got another UNO and one of these relay boards; SainSmart 4-Channel 5V Relay Module for Arduino Raspberry Pi – SainSmart.com
There is a jumper on VCC and JD-VCC.
Leaving the jumper on makes the opto worthless but this is okay because of Q7, correct?
With this relay board, when the arduino pin is low, the relay coil will be energized, correct?
Is it okay to connect VCC and ground to the Arduino VCC and ground pins, or will the relay coil pull too much current through the arduino?
If you want complete optical isolation, connect "Vcc" to Arduino +5 volts but do NOT connect Arduino Ground. Remove the Vcc to JD-Vcc jumper. Connect a separate +5 supply to "JD-Vcc" and board Gnd. This will supply power to the transistor drivers and relay coils.
If relay isolation is enough for your application, connect Arduino +5 and Gnd, and leave Vcc to JD-Vcc jumper in place.