I need to design a circuit so that it can convert 0 - 80 V DC to 0 - 3.3V DC. I need to give the output of a battery which is in the range of 0 - 80 V to an STM32F103 microcontroller. Since the operating voltage of the STM32 is 3.3V it is not possible to directly take the output. I need to convert it to a range of 0 - 3.3 V in order not to blast the controller. Can you please suggest a method to do that. Is it possible to achieve it using potentiometers. If yes can you please explain how the circuit should be?
-
I dont know exactly how to do that with a voltage divider. Can you please explain? – Jackie Dec 18 '18 at 08:22
-
Thanks a lot. But can you please tell ,e if its possible with a potentiometer? – Jackie Dec 18 '18 at 08:31
-
1'converting' is ambiguous. Do you want to use the 80v bttery to power the MCU, or is the MCU separately powered and you want to use it to measure the voltage of the battery? – Neil_UK Dec 18 '18 at 08:33
-
Yes MCU is seperately powered. And I want ot use the MCU to measure the voltage of the battery for some calculations – Jackie Dec 18 '18 at 08:43
-
I could answer but I'm kind of worried you will mess something up and then blame me. tell the guys who are in charge of the battery that you need the battery voltage represented as 0 to 3.3v for the microcontroller to read it. – Jasen Слава Україні Dec 18 '18 at 09:07
-
yeah but even if I tell them, they will ask me to figure out a way to do it. Could you please try telling it? – Jackie Dec 18 '18 at 09:49
1 Answers
Well, if you want to convert an exact ratio of whatever/80 to its equivalent voltage /3.3v (for e.g. 40v to 1.65V) then you find the ratio of resistors needed and implement it, with the output being in the middle of the two.
Your ratio is 3.3V max to 80V max - so it is 3.3/80 for your Vout to Vin. Assuming your top resistor is r1 and bottom is r2, for 80V across R1 plus R2, we want 3.3v dissipated across R2. Thus, 3.3(R1+R2) = 80R2. (1+R1/R2) = 80/3.3. R1/R2 = ([80/3.3] - 1)
Use this ratio to find suitable resistors. The resistor value magnitude depends on the current you want flowing into the microcontroller also - a Kilo-ohm range will result in milli-amps - it may suffice depending on the microcontroller specification.
This solution is a fixed voltage divider, and is an answer on how you would equally divide voltage. This does NOT cover how to regulate an input to 3.3v if that's what you might have been looking for, but based on your question I believe you are looking for the voltage divider method.

- 602
- 8
- 17
-
Thank you for helping me. Actually the operating voltage of my controller is 3.3 V, so if I directly give a voltage range from 0 - 80 V to it, it will blast. I need a solution for this. So if I am using the voltage divider circuit that you have explained here, is it possible to give 80 V without blasting the controller? – Jackie Dec 18 '18 at 12:13
-
No; giving anything above (i would assume) 5V would damage it. Similar to how you mentioned the potentiometer, this circuit is a very simple and primitive voltage divider, that takes (in this case) the proportion of voltage of 80V and outputs the same proportion, but to 3.3V. Therefore, if you had 80V in, you get 3.3V out. 40V in (half of 80), and 1.65V (half of 3.3) out. If you wanted a solid 3.3V output, this is NOT the solution - you need to use a regulator in that case, but you haven't mentioned that at all so I did not include it in the answer. – QuickishFM Dec 18 '18 at 12:17
-
I’d use a voltage regulator capable of handling 80v and reducing it to a fixed voltage such as 5v. From there, since you know you’re using 5v you can easily construct a voltage divider. Use resistors with high values so the amount of power dissipated as heat is greatly reduced. – rr1303 Dec 18 '18 at 13:00
-
I second that for attaining a constant 3.3v supply, which is more along the lines of what's needed for a microcontroller supply. In the question though OP mentioned an output of 0 to 3.3V, which makes me question if instead they want a variable output with the same proportion as the input. – QuickishFM Dec 18 '18 at 13:02