Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Arduino Mega + SD card shield + ESP13 shield - strange hardware malfunctioning problem

Status
Not open for further replies.

boylesg

Advanced Member level 4
Joined
Jul 15, 2012
Messages
1,023
Helped
5
Reputation
10
Reaction score
6
Trophy points
1,318
Location
Epping, Victoria, Australia
Activity points
11,697
The right image is of my full setup.

The solenoids switch 24AC through standard solenoid valves from Bunnings Australia.

The LCD screen just allows you to see what is going on inside the software as it boots up and operates.

The blue PCB is custom one I designed and includes a slot for a bluetooth modem, and bridge rectifier and a DC to DC converter to provide the 5V for the digital electronics.

The left image is just a mega with an data logger shield and a ESP13 shield - just to show the essential hardware without the custom PCB in the way.
1633244526392.png
1633244771712.png


This system works flawlessly at my house and in 3 medical clinics.

But as soon as I take to one particular house I am getting hardware failures.

The SD card read can't 'mount' the SD card and read from it.

The firmware on the ESP13 shield may get wiped or damaged and I have to reload it.

The system just does not work.

And this is after two completely separate system with no re-used hardware.

My suspicion is that there are power spikes or something coming through the power in the house or may be external to the house.

I learned early on in the development of this that power spikes are deadly to digital electronics - i.e. inductive kick back from the solenoids was resetting the meg ever time.

Until Brian I think it was pointed out a device (whose designation I forget off hand) that snuffs kick back spikes.

As soon as I installed one of these close to where the solenoid valves are wired to my custom PCB, this problem disappeared.

So with this other less tangible problem, I can come to no other conclusion that there are small power spikes coming into my electronics from the outside.

May be a faulty appliance else where in the house?

All I can try is to add some sort of protection against spikes that might be leaking through the bridge rectifier and DC to DC converter.

However I have no idea where to begin.

Any suggestions please?
 

Attachments

  • 1633244561373.png
    1633244561373.png
    616.1 KB · Views: 110

Buy a good AC line filter - it should stop much of the mains borne spikes. Avoid domestic 'surge protectors' because all they are is a fuse and MOV.

Beware of the problems of those multi-relay boards. I have some here and the wiring on them is crazy. They claim to be opto-isolated but in truth, all the isolators share a common power and ground connection to both sides so they do absolutely nothing to break input and output side connections. Try adding a small inductor in the power feed to the relay board and add a pair of paralleled capacitors 100uF and 100nf across the supply and ground on the relay board side of it.

If possible route all power switching wires well away from the PCB.

Brian.
 

It would
Buy a good AC line filter - it should stop much of the mains borne spikes. Avoid domestic 'surge protectors' because all they are is a fuse and MOV.

Beware of the problems of those multi-relay boards. I have some here and the wiring on them is crazy. They claim to be opto-isolated but in truth, all the isolators share a common power and ground connection to both sides so they do absolutely nothing to break input and output side connections. Try adding a small inductor in the power feed to the relay board and add a pair of paralleled capacitors 100uF and 100nf across the supply and ground on the relay board side of it.

If possible route all power switching wires well away from the PCB.

Brian.
It be ideal to incorporate the solenoid things on a larger version of my custom board. But it all adds to the cost of complication.

Anyway the cables between the digital electronics have never been a problem here.

It has got to be something bigger outside the board.

Can you suggest an AC line filter for 24VAC incoming to my board Brian?

Honestly I have no idea where to begin.

Can you suggest a good web page that explains the principal of these things?

Something like this perhaps?

1633251064258.png
 
Last edited:

That filter or a similar one would be suitable but make sure it is rated at high enough AC voltage for the country of usage.

How they work is very simple, the two small blue parts are 'dormant' resistors that have a very high value until a certain voltage threshold is reached. If the voltage goes above that level, they start to conduct and absorb some of the excess energy. Although not perfect, they give some protection against excess voltage spikes. The capacitors are wired differently on one side of the inductor to the other. One one side, the single capacitor is directly across line and neutral (the incoming AC) wires and it provides a low impedance to high frequencies. It will still conduct a little at 50/60Hz but the amount is very small. Because it is across the AC, it provides differential filtering. The two capacitors together are wired one from each of line and neutral to a common ground (Earth wire). They serve the same purpose but this time to 'common mode' (meaning the same on both lines). The inductor is wound with two coils, one for line side and the other for neutral side. It's inductance is quite low so it doesn't limit the AC current that can flow through it but at increasing frequencies it generates more magnetic field. The windings are arranged so the current through each winding produces a field that oppose each other. This means that at high frequencies the energy is absorbed into the core.

Between them, the components limit the passage of noise and spikes that are across the line and neutral and also on both at the same time compared to Earth (differential and common mode EMI). Note that a good Earth connection is needed or the common mode filtering will not be effective.

Brian.
 
What happens if I want to use it at the 24VAC stage rather than at the 240VAC mains stage?

By the sound of what you are saying I would have to change the value of some components.

How do go about calculating that?
 

Whenever I look at house voltage on my oscilloscope, the (roughly sinusoidal) waveform always has a slight amount of 47 kHz riding it. I don't know where it comes from. Example, light dimmers are notorious for sending out interference creating buzzing in nearby AM radios. Or maybe it's the frequency of operation in compact fluorescent bulbs?

Anyway if 47 kHz is present on your house voltage, and your circuit were to amplify it somehow, that could make for problems.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top