AC power source versus PC and laptop

I have an arduino mega based irrigation controller that takes 24VAC to power it.

The 24VAC powers solenoid valve and also goes through a bridge rectifier, filter cap and DC to DC converter module that supplies 5V for the electronics.

The arduino and electronics seem to work flawlessy.

However when I plug the USB cable into the Arduino Mega simultaneously with the 24VAC power supply then it causes the PC or laptop to play up.

My PC won't wake up after going to sleep - I have to disconnect/reconnect the PC power chord and reboot it.

At one stage the power on my laptop cut out and I had to re-boot that.

So I presume there is some noise coming though the mains power that is not being filtered out and is interfering with the PC/laptop electronics though the USB cable.

So my question is what do I need to add to PCB to prevent this from happening?

Let me get this straight. You have this device that you built and it does something you don't like. And you want someone to be able to tell you how to fix it without being able to see it or really know anything about it or how it is put together. Have I got that right? Does that sound intelligent to you? Or do you think it sounds smarter to put some detail there?

You've been around long enough to know better than this.

Diagram?

Hi, What happens if you connect your laptop without it mains connection, that is running on its battery?

Tom... :)

And you have no snubber for the solenoid valve?

boylesg: However when I plug the USB cable into the Arduino Mega simultaneously with the 24VAC power supply then it causes the PC or laptop to play up.

My PC won't wake up after going to sleep - I have to disconnect/reconnect the PC power chord and reboot it.

Market this as an USB KILLER for glorious profit.

MarkT: And you have no snubber for the solenoid valve?

https://docs-apac.rs-online.com/webdocs/0eef/0900766b80eefb4d.pdf

ERZV10D470

But that does not seem to protect the PC from whatever else is interfering with it.

I am not formerly trained in electronics so my knowledge is patchy.

If you experts here were designing a device that takes AC power, rectifies it and converts it to 5V DC for a microcontroller and the microcontroller plugs into a PC via a USB cable, then what filtering circuits etc would you likey have in place?

As for my circuit.....

24VAC goes through a bridge rectified and a filter cap into one of these: |500x375

The 5V output from this power a standard arduino mega and a relay board: |500x500

The relay board switches 24VAC to standard solenoid valves.

Is this 24Vac isolated? If in doubt assume its not and only use a laptop that's not plugged into the mains to interface to it.

You can use a multimeter in voltage mode to compare ground between your irrigation controller and PC USB ground. Compare both with and without a 1k ohm resistor connected between the two grounds. If either supply is isolated the 1k resistor should be able to pulll the grounds very close together in voltage (both DC and AC should be checked). If the 1k resistor isn't bringing the grounds into line with each other you must not common the grounds, large currents could flow and burn things up.

Mark it is just a standard 24VAC plug pack.

The iron core may be earthed for safety but I am not going to crack it open to find out.

I believe standard plug packs are ‘floating’?

I have used a standard 3A bridge rectifier IC and 2200uF filter cap to convert the 24VAC to about 38VDC.

That forms the input to that Ebay dc to dc converter.

The Arduino GND is connected to the OUT- of the dc to dc converter and the 5V of the Arduino is connected to the OUT+

It is really no more complicated than that.

It is only a problem with an AC power source - no issue with other devices I have made that use a commercial DC power source, e.g. a laptop power supply, that goes through the same dc to dc converter to make 5V.

But the problem is, due to my patchy knowledge, I don’t know what I am looking for re the AC power source that goes through the bridge rectifier, filter cap and dc to dc converter that I have combined together myself.

By the way it doesn’t ALWAYS interfere with the PC, sometimes I can re-start it from sleep mode.

The intermittent nature of the problem is not helping me re diagnosing the it.

I've never had a problem running from an external AC source to power the devices (through 12V 9V and 5V DC voltage regs) then plug the USB in to program debug - always been stable

My thought is you have AC on the DC lines from not isolating correctly. Check that there is no continuity between any of the DC and AC

MarkDerbyshire: I've never had a problem running from an external AC source to power the devices (through 12V 9V and 5V DC voltage regs) then plug the USB in to program debug - always been stable

My thought is you have AC on the DC lines from not isolating correctly. Check that there is no continuity between any of the DC and AC

If that was the problem then surely the Arduino would not work?

The Arduino always seems to work perfectly.

It is only the laptop or PC that seems to have a problem with the AC.

I don't know if it helps but when the USB cable is plugged into the arduino with the AC power connected, and the PC is asleep, the HDD LED on the PC is permanently lit. Some times pressing the power button works, sometimes it doesn't.

Hi, Are your mains power outlets wired correctly.

Please a circuit diagram, reverse engineer your project and show us your connections.

Thanks.. Tom... :)

Here it is - from DipTrace

The open connectors on the opposite side of ‘SOLENOIDS’ go through the one of these:

Hi, If you have a PCB made then you must have a schematic, a circuit diagram ! ! !

Might I suggest you leave as much copper as possible on your PCB, to make your tracks thicker and to make a gnd plane.

You have [u]bought[/u] the blank PCB, now you are [u]paying someone[/u] to take most of it off?

Tom.... :o

You're plugging in a USB which is 5V to an already powered circuit? 24v? The 24V is going back through the USB cable making the computer shutdown the USB ports to protect it. OR some other difference in potential created on your circuit causing something to go back to the computer. Even if the Arduino can regulate and operate doesn't mean it's kicking out a perfect 5v, then another 5v from a different power supply goes in. That can be higher or lower than the other 5v, boom difference in potential. That's my theory. Don't keep doing it, figure it out before plugging that in again.

Hi,
This might help;
MegaPower.jpg

Tom… :slight_smile:

Have you adjusted the screw on R2 in the picture? I'm a noobly noob here but I think that will raise or lower voltage and available amps and you may have that difference of potential I was talking about. You'll need someone else's advice on adjusting that, I own a dc-dc converter like that but have not used it yet. Hope this helps.

https://www.youtube.com/watch?v=jYMGCLsytT4

TomGeorge: Hi, If you have a PCB made then you must have a schematic, a circuit diagram ! ! !

Might I suggest you leave as much copper as possible on your PCB, to make your tracks thicker and to make a gnd plane.

You have [u]bought[/u] the blank PCB, now you are [u]paying someone[/u] to take most of it off?

Tom.... :o

No control over any of what you have mentioned. I had the PCB's made by one of those Chinese companies

I made all the traces 1.5mm wide (according to Diptrace) that was a wide as I could make without them shorting at the Arduino pins.

Some one mentioned via PM that it might be a DC back feed problem from the DC to DC converter through the USB cable.

This is where my patchy knowledge is a problem - nothing like that occurred to me.

Probably just a matter of adjusting down the output voltage of the DC to DC converter slightly.

And no I don’t have a schematic of the whole circuit…to the person who asked.

I have no means of producing schematics involving off the shelf mega boards and relay boards etc.

And I can’t see any benefit in making one for such a trivial circuit (not including the mega board and the relay board)

Hi,
Did you make a prototype before getting the PCB made.

I made all the traces 1.5mm wide (according to Diptrace) that was a wide as I could make without them shorting at the Arduino pins.

The tracks can still be wider.

Have you set the output of your DC-DC converter to 5V?
They are not isolating converters, the gnd_in and gnd_out are connected

Tom… :slight_smile: