Electronic – Power 24V external component + blue pill, control external component

powerstm32voltage

Please take into account I'm a beginner with microelectronics.

I want to build an automated air humidifier.

For this, I'm using a STM32 blue pill and a si7021 I2C sensor. The I2C sensor regularly measures the temperature and humidity in the room. That's the part of my project that properly works at the moment.

Depending on the humidity level in the room, I'd like to trigger an ultrasonic water atomizer. I bought a pack of atomizers here: https://www.amazon.fr/gp/product/B07F3YY6K7

From what I could find, these atomizers should be powered by a DC 24V current, which is obviously way more than what the blue pill can provide on its own.

That's where my knowledge ends. I don't know how to power and control these atomizers. What's coming is no more than an educated guess.

I imagine I need to get a 220V AC mains to 24V DC adapter. This 24V current then needs to be split:

  • to 5V to power the board, and maybe other components (like a bluetooth chip)
  • to 24V to directly power the atomizers

But once all the components are powered, the blue pill needs to be able to enable/disable the power to the atomizers.

So what I'm missing is (I guess):

  • a way to convert 24V to 5V
  • a way to control the power to the atomizers from the blue pill

Can you point me in the right direction please?

Best Answer

You are heading in the right direction; let’s suppose you get a 24V power supply with can supply enough current to the atomizers.

The most efficient is to use a Buck DC-DC converter module to transform the 24V -> 5V with an efficiency of about 90%. Alternatively you could use a linear regulator, but it will dissipate a lot of power depending on how much current you need at 5V.

To turn on the atomizer you could either use a relay (driven by a little transistor connected to the MCU) or a MOSFET rated to carry the current of the atomizers.

Edit: as mentioned by Vlad, the atomizers listed are just transducers. So they need to be driven at the correct frequency - not just a DC voltage. For this MOSFETs are more suitable than a relay.

Related Topic