4

I want to power a 24 VAC vibration pump (48 W 50/60 Hz, often used in coffee machines), and control it with a microcontroller. I've got an existing system that is powered with 24 VDC. A standard DC-DC converter powers the microcontroller.

I thought it would be possible to use a L298N DC motor controller, and program the microcontroller in such a way that it changes the motor driver's direction every 20 milliseconds, creating a 50 Hz square wave that's basically some sort of "AC" voltage.

If such a thing is possible, do I need some kind of diode that protects the driver and the microcontroller from nasty currents flowing back? The pump's datasheet says it has a built-in diode. Would I need extra diodes or would that built-in one be enough?

If such a thing is not possible, I'm open to other ideas on how to control the pump.

Thanks in advance!

Edit: Sorry, I forgot to mention I have no 24 VAC available, I want to do it with the 24 VDC.

empewoow
  • 71
  • 6
  • You say two different things. Title: "How to drive a 24 VAC pump". Text: "how to control the pump". These are different questions. Which is it? Do you want to _power_ the pump with 24 V? Or do you want to _control_ the pump that already has a 24 Vac power supply? Please clarify. – Davide Andrea Jan 29 '23 at 17:56
  • 1
    Sorry for the misunderstanding, I want to **power** it with the 24 VDC (I have no 24 VAC available) and **control** it with the microcontroller, so turn it on and off. – empewoow Jan 29 '23 at 19:55
  • You could use a 50Hz square wave. That is essentially how a single phase BLDC motor works. – Aron Jan 30 '23 at 08:14

5 Answers5

9
  1. Easiest: replace the motor or the entire pump
  2. Next easiest: 24 Vdc to 120 Vac inverter + 120 Vac to 24 Vac transformer
  3. Not easy: look for a 24 Vdc to 24 Vac inverter on AliBaba
  4. Hard: design your own 24 Vdc to 24 Vac inverter with a full-bridge module
  5. Hardest: design your own 24 Vdc to 24 Vac inverter from scratch
Davide Andrea
  • 16,164
  • 4
  • 33
  • 62
  • Thanks for the options, are you sure there is no 6th option in the direction I was thinking about? (Or in the answer by **fraxinus**?) To create a square wave and power the pump with that? – empewoow Jan 29 '23 at 20:09
  • 3
    That's #5. ................ – Davide Andrea Jan 29 '23 at 20:46
  • 1
    Depending on the OP's abilities, I'm not sure that #4 is any harder than #1. #4 is an oscillator feeding an H-bridge. – Simon B Jan 30 '23 at 21:34
7
  1. Get a separate 24V AC power supply - such as an HVAC or doorbell transformer. These are available both as components designed for hard-wiring and as plug-ins.
  2. Use a relay controlled by the 24V DC (or other available signal) to switch the 24V AC transformer output.

If you use a plug-in transformer (should be UL or similar listed) then everything you are dealing with directly or via the relay is low voltage, which keeps things relatively safe.

2

Let me guess - you are trying to alter a coffee machine to run off a truck battery?

Chances are that the pump doesn't really need a "real" AC (one that switches direction) and will happily run off a 24V that is periodically switched on and off.

While I am yet to disassemble a coffee machine, I have seen similar devices (mostly pumps) that expect AC and in fact contain a diode that makes it a pulsating DC.

The simplest strategy will be to use e.g. 555 chip to form 20ms pulses with 20ms pauses, amplify them with a powerful transistor and feed these pulses to the pump.

You will need a flyback circuit (diode or diode + resistor) in order to protect both the pump coil and the transistor from the overvoltage that will happen on every transistor "switch off".

I don't have means to draw a circuit right now, but you probably get the idea.

fraxinus
  • 8,726
  • 11
  • 34
  • Interesting guess! But that's not what I want, haha. (Don't think that's really relevent though.) I like your response the best since it is in the direction I was thinking. I have a similar design with this pump where it runs with a square wave, so I think you're right. I can exchange the 555 chip with a microcontroller and use a powerful transistor (or mosfet) right? But what do you think of my L298N idea? Also you talk about the flyback diode. My pump has a diode built-in. Is it for that purpose, or do I need an extra one you think? – empewoow Jan 29 '23 at 20:05
  • If your pump is powered by AC and it does contain a diode it is in fact the case in my answer (a half-wave rectifier to get single-polarity pulses to the pump coil). Or some different setup that I am not aware of. AC is its own flyback, every next half-period. Flyback arrangements are needed in the DC world. You probably may use the existing diode if you connect it as a flyback (in parallel to the coil). – fraxinus Jan 29 '23 at 20:09
  • p.s. if you already have a microcontroller in your setup and the freedom to alter its software, then yes - you can pretty much control the pump directly from it, without a separate timing circuit. In this case, a MOSFET transistor will be easier to use. – fraxinus Jan 29 '23 at 20:14
  • I have not much info about the diode. It's inside the pump, I have not disassembled the pump completely... It just says "Integrated diode" in the datasheet lol, so I have no idea where it's used for. Look for CEME ULKA EX4 48W 24VAC 50/60Hz if you're interested. And yes I program the software on the microcontroller, so I don't need to use a 555 timer IC. Still, everybody ignores my idea to use the L298N. Is that a bad idea, or is the transistor/mosfet enough, like you say? – empewoow Jan 29 '23 at 20:26
  • In regard to L298N - you simply don't need this much gear. But will also work, provided some common sense. – fraxinus Jan 29 '23 at 20:32
  • I get it, I'll try a simple mosfet and report back! Give me a few days. – empewoow Jan 29 '23 at 20:38
2

Using the L298N might work but you will be at its absolute maximum load. Your heatsinking etc you use must support it. Look at the BTS7960 or similar parts/modules both 1/2 and full bridge. The key is the MOSFET outputs, the low voltage drop will keep them cool. The BTS7960 is a 1/2 bridge so you will need two of them. For 2A the heat sinking will be minimal. I have had no problems using these. You can get the full bridge BTS7960 in module form for less then $10.00 US with a 40A + rating. Flyback protection etc is included.

Gil
  • 4,951
  • 2
  • 12
  • 14
  • See e.g. ST AN240 on how to parallel L298 half bridges to get a 3.5 A one. (*Not* recommending the ancient part for "new" designs or projects.) – greybeard Jan 29 '23 at 21:40
1

Regarding protection diodes around the L298, the data sheet shows a good approach:

datasheet snip

Snip from sparkfun hosted datasheet: https://www.sparkfun.com/datasheets/Robotics/L298_H_Bridge.pdf

Bryan
  • 2,156
  • 1
  • 6
  • 11