So I've been troubleshooting this problem for a little over 2 weeks now and have had 0 luck thus far. I've attached a schematic of my circuit and my code. Basically whenever I flip on high voltage using the relays and then flip on my filament circuit the arduino goes crazy. It'll either reset, execute a random command, print half (or less) of a command and freeze, or print weird characters and symbols and freeze. Whenever the arduino resets, what I mean is it'll print out the start of the void loop command again However the pins stay in their set positions.
My problem is that whenever I set the relays in their corresponding positions flip High voltage (30kV) on, and in turn flip the filament circuit on (1.7A 2V) the arduino exhibits such behavior. I've discussed this with numerous people (graduate student) and they believe it to be a software issue over a hardware issue. I've made sure that the arduino itself is receiving enough power and basically checked all the hardware.
I know I've been pretty vague in my details but hopefully someone can help me .
Tigerzak:
So I've been troubleshooting this problem for a little over 2 weeks now and have had 0 luck thus far. I've attached a schematic of my circuit and my code. Basically whenever I flip on high voltage using the relays and then flip on my filament circuit the arduino goes crazy. It'll either reset, execute a random command, print half (or less) of a command and freeze, or print weird characters and symbols and freeze. Whenever the arduino resets, what I mean is it'll print out the start of the void loop command again However the pins stay in their set positions.
My problem is that whenever I set the relays in their corresponding positions flip High voltage (30kV) on, and in turn flip the filament circuit on (1.7A 2V) the arduino exhibits such behavior. I've discussed this with numerous people (graduate student) and they believe it to be a software issue over a hardware issue. I've made sure that the arduino itself is receiving enough power and basically checked all the hardware.
I know I've been pretty vague in my details but hopefully someone can help me .
Thanks Again!
Do a simple RF shield:
Insulate your Arduino board.
Wrap it with tinfoil.
Ground the tinfoil.
put inductors on the wires controlling your relays. Just take the 24ga wire, wrap it around a iron nail 10 times.
I can't figure out your drawing from the picture, even if I turn my computer sideways. I see however that you have a solution (at the "bottom" of the picture) but you have cut it off so we can't see it.
Based on your description, one of two things is happening: 1) your circutry overtaxes the Arduino's power supply and it shuts down partially, or 2) your high voltage is crawling over conductive surfaces to affect the electronics. 30kv is a lot and normal insulation that works for 5v looks like a conductor to 30kv.
You can test which hypothesis is wrong by doing a couple experiments. for 1) replace the high voltage powr supply with a load that puts the same drain on your powersupplies, but does not generate 30kv. If it still acts up, you have a current issue.
The second experiment would be to further isolate the 30kv by placing it in a well shielded cage some distance from the electronics.
ps, the sketch you attached doesn't seem to have anything to do with the project, right? or am I missing some subtle connection?
My problem is that whenever I set the relays in their corresponding positions flip High voltage (30kV) on, and in turn flip the filament circuit on (1.7A 2V) the arduino exhibits such behavior. I've discussed this with numerous people (graduate student) and they believe it to be a software issue over a hardware issue.
I'm quite certain its a hardware issue, specifically emissive RF energy due to relay contact arcing. There are several locations an MOV could help, but the AC voltages are needed to help size the appropriate MOVs (see below).
Also, opto isolation driver circuitry for your relays is very highly recommended for this application.
After re-configuring with opto isolated relay driver circuits, installing the MOV's and if the HV load is disconnected from the HV relay contacts, I'm quite sure the problem will disappear.
Now all that's left is locating the HV circuit further away from the electronics and shielding the HV circuit (or electronics) from the excessive emmissive RF interference at the 30KV relay contacts. A snubber may help here, but it's at much higher voltage than anything I've ever designed. At minimum, all component datasheets and design requirements need to be provided and possibly someone could help.