Page 1 of 1

ESP32 for this project suitable?

Posted: Wed Oct 23, 2024 11:38 am
by Gugu55
Hello,

I would like to control several electromagnets, whereby the magnets should have a variable strength, depending on a specified signal (received and processed by a higher-level controller). The higher-level instance should communicate wirelessly with the group.
Due to a lack of experience, I'm not sure whether the ESP32 is suitable for this, but the possibility of working via Bluetooth seemed sensible to me. If I have understood it correctly so far, I can control the strength of a magnet via a PWM pin. I would then implement this via a mosfet, while I regulate the 12V voltage source down to 3.3V with a buck converter.
There is also a rough circuit diagram at the bottom of the picture.

Would you say that I can build it this way, or would you recommend something else?

Re: ESP32 for this project suitable?

Posted: Thu Oct 24, 2024 1:14 am
by ESP_Sprite
Should work, but make sure to add a flyback diode to the magnet. I'm kinda wondering what the use is of a variable-strength electromagnet, though: as magnetic force decays with the cube of the distance, generally the distance between the magnet and whatever it attracts plays a much greater role than how strong the magnet is to begin with. Out of curiosity, do you mind divulging what you want to use this for?