# Ideas for driving an electromagnet with high voltage AC current from a PCB

I have an aquarium pump that is no longer being used and I want to integrate it into a design of mine. I am inexperienced designing for stuff with high voltage AC or AC current in general. i've done many <12V DC electronics designs, even complex ones involving BGA FPGAs, I've never NEVER touched high-voltage or AC current on my PCBs before.

Here are some photos of the pump: https://imgur.com/a/iZFpGGL]https://imgur.com/a/iZFpGGL[/url

The pump plugs into mains voltage and seems to have a potentiometer and some passives to control the amplitude, and what i believe is a flyback diode for the inductive load. I'm not really sure the circuit for it but i'd be happy to dissect if further if someone wants to help explain what each passive does. I assume the diode is for sinking the induced negative voltage from the massive inductor when the AC voltage switches polarity, but i'm not sure what the capacitor is doing there. I only plan to use "half" of it since it's essentially two electromagnets each of them pushing two dual-diaphragms. So I only intend to use one electromagnet pushing two diaphragms.

The product page for the pump shows that the entire unit only uses 6 watts at 120VAC, i only need half the unit so the section I would need would use 3W@120VAC; quick calculation means one half only uses 25mA of AC current.

At first I was thinking of plugging mains power directly into my PCB using something like an IEC connector and then using a PCB mounted AC-DC converter to step down to 5 volts for the rest of my design (raspberry pi zero, stepper motors, LCD display, etc) and have the AC side of the PCB feed into a relay that connects to the inductor and have the relay switched with the raspberry pi's logic level output. This seemed like an okay approach but it also has me nervous since i've never used high voltage and in addition the PCB mount switching power supply i'd need to go from 120VAC to 5VDC would be huge and unwieldy to design around. That part alone would take up half of my planned PCB board space.

I need at least ~7Amps supplied on the 5VDC side because that side of the design uses 12 MG996R servos which have a running current of 500mA; truth be told I will only ever be actuating one servo at a time but when the board comes online I don't want the inrush current from all the servos to burn anything out. The other components (rapsberry pi, LCD display, addressable LEDs, etc) all use a relatively small amount of current, the Pi being the largest at no more than 300mA (but probably no more than half that to be honest).

I was wondering if a better idea was to use a commercially available power brick to provide 12VDC 10-15A to the board and then make a smaller section of the PCB somehow drive the AC electromagnet. Is believe DC-AC converters are called inverters? Does it seem reasonable to be able to convert 12VDC to AC for something this low power (roughly 25mA by my calculation)? I've also found these but the output frequency is too high to drive the electromagnet correctly.

What do you all think? Should I use the huge PCB mount AC-DC converter with a relay thrown from the 5V side? Or is there another circuit I could build if instead I supplied 12VDC 15A and used a section of PCB to convert to higher voltage AC?

Would an H-Bridge driver work for this? Maybe I could use a DC-DC converter to generate 120DC and use an H-Bridge to alternate the current flow? It would be a square wave so maybe I could use a low pass filter to get a sinusoid. I would need another circuit to do the switching unless I manually controlled the switching in software (non-ideal as it's one more thing to deal with).

• Do you need to use this specific device? It's likely you can get a similar pump designed to operate off of 12 V DC. Commented Dec 30, 2020 at 17:37
• I've tried a handful of 12VDC pumps and none of them produce the air flow i need for my application. The ones that do seem up for the job are too expensive. Commented Dec 30, 2020 at 17:39
• This might be an XY problem. How much air flow do you need? Commented Dec 30, 2020 at 17:40
• currently unsure, but i've used a handful of 12VDC pumps in the past and they haven't worked for me. I asked a question here: engineering.stackexchange.com/questions/39396/… to understand the amount of airflow i need better. Regardless I'm still interested in understanding good ways to drive these AC pumps from a custom PCB. I'm not as interested in skirting the problem as understanding how one might decide is an good and safe way to drive this pump on a custom PCB. Commented Dec 30, 2020 at 17:52
• I'm writing up an answer now about how I would approach this. Commented Dec 30, 2020 at 17:54