Hello, first time poster so please dont hurt me
My background is mechanical and I know enough about electronics to be dangerous, but I muddle through as much of it is fun and interesting.
Anyhow, I am working on a project using a microcontroller that can take between 3-5V on its bus logic pins, to control some solenoids, powered by a 20V battery. What I would like to do is to have the system change modes when the battery voltage drains to 15V. This has led me down a worm hole of headache.
First thought was well, I can take a 15V 2% Zener reverse biased and place it across my Positive and Negative bus lines with something like a 220 ohm resistor, the resistor being between the diode and ground. Thought was, any time battery voltage is above 15V, power would go through, and the 220 ohm resistor would keep power consumption low.
Problem with that is I cannot have 15V going to my controller pin. I don't want to do a simple voltage divider using two resistors in series incase the voltage creeps above 5V or below 3.3v on the range.
So I figured well, I can add a second zener, a 3.9V across my tap upstream of the resistor. This way my voltage going to the MCU would be limited to 3.9V as anything over 3.9V will drain to the ground through the Zener.
But that got me thinking the current path will simply avoid the resistor at this point, and simply pass through all of the zeners when voltage is above 15V. So I came up with the concept of two 430ohm resistors. One to replace the 220, and one to go downstream of the 3.9V Zener. See Schematic.
Does this look like this would work? Or am I going about this all wrong. The rest of the circuit is somewhat simple. It feeds a LM2940 to run the microcontroller and some sensors, and the micro controller is connected to IRL540s to run the solenoid. Again, I would like to have the microcontroller poll a bus pin for presence of a high signal from the Zener circuit to alert the user to swap batteries when it drops below 15V.
Thanks!

Anyhow, I am working on a project using a microcontroller that can take between 3-5V on its bus logic pins, to control some solenoids, powered by a 20V battery. What I would like to do is to have the system change modes when the battery voltage drains to 15V. This has led me down a worm hole of headache.
First thought was well, I can take a 15V 2% Zener reverse biased and place it across my Positive and Negative bus lines with something like a 220 ohm resistor, the resistor being between the diode and ground. Thought was, any time battery voltage is above 15V, power would go through, and the 220 ohm resistor would keep power consumption low.
Problem with that is I cannot have 15V going to my controller pin. I don't want to do a simple voltage divider using two resistors in series incase the voltage creeps above 5V or below 3.3v on the range.
So I figured well, I can add a second zener, a 3.9V across my tap upstream of the resistor. This way my voltage going to the MCU would be limited to 3.9V as anything over 3.9V will drain to the ground through the Zener.
But that got me thinking the current path will simply avoid the resistor at this point, and simply pass through all of the zeners when voltage is above 15V. So I came up with the concept of two 430ohm resistors. One to replace the 220, and one to go downstream of the 3.9V Zener. See Schematic.
Does this look like this would work? Or am I going about this all wrong. The rest of the circuit is somewhat simple. It feeds a LM2940 to run the microcontroller and some sensors, and the micro controller is connected to IRL540s to run the solenoid. Again, I would like to have the microcontroller poll a bus pin for presence of a high signal from the Zener circuit to alert the user to swap batteries when it drops below 15V.
Thanks!
