12v DC Solenoid , a RaspberryPi & a 3d printed case

I’m looking to build a button-pusher to activate a mobile air conditioning unit in case of the main unit failing.
Looking to emulate part of this project to do so

The circuit i need to build is:

I’m going for this solenoid

Question: What is a fly wheel diode? I get what it does in the circuit, protecting against spikes coming back off the solenoid, but i’ve never bought one before, would this do? These things seem to have multiple names.

I was planning to come along to one of the electronics nights once i’ve ordered everything up for a bit of assistance in getting the circuit onto a development board and eventually put in a nice 3d printed case.

Back EMF or flyback diode are other names for that. Here’s a little tutorial on what they’re for: https://progeny.co.uk/back-emf-suppression/

tl;dr: it’s so that when the magnetic field collapses when you stop putting current into the coil, you don’t get a big spike of current going in the opposite direction, thus blowing up the rest of your circuit.

The diode you use just needs to be able to handle the current the coil is likely to develop across it’s terminals for a very brief period of time. A rectification diode should do perfectly fine. 1N4007 should be OK for most small diodes.

2 Likes

Great, thanks!

There is loads in the space.

If you add a button you will need a pulldown resistor and a few diodes so you don’t blow the gpio pin

Abandoned this project and just got an A/C unit on the wall with an API we can talk to,
thanks for the advice however!

Please can you elaborate?

We have an air conditioner that has a JSON Rest API, which means it has a web server that allows me to write some code and talk to it programmatically. We can pull out the status of the machine, if it has shut off or failed in someway and get in to the office to sort a backup solution within 4 hours.

JSON Rest API - https://searchmicroservices.techtarget.com/definition/RESTful-API

We currently pull On/Off Status, Desired Temp, Room Temp, Machine Temp, and then monitor a load of other environment sensors in the room being monitored. If things go wrong we get an alert via Pushbullet, which also has an API :slight_smile: We also push all the data into Grafana so we can view the history over time.

All code is PHP and is much more reliable than the app the a/c unit came with.

2 Likes