How to make a separate ground for MCU to measure with ADC

Thread Starter

ArakelTheDragon

Joined Nov 18, 2016
1,366
Worst case scenario by calculations is 2.55W. If we except is as 3W, how much can I cool with a heat sink. I have some standard small heatsinks, maybe about 3 square cm. You are writing "0.1A" in the formula because the drained current is "0.1A"?

Edit: I remember studying these formulas, but I relaxed and now I am stupud!
 
Last edited:

Thread Starter

ArakelTheDragon

Joined Nov 18, 2016
1,366
1. Zener diode on the second circuit of with comparator:
By the way the zener diode should still not be there on your second circuit with the OPAMP, on post #24 I think.

2. Capacitor on the ADC pin:
Should I put a cap for filtering the noise and how much should it be?
 

ScottWang

Joined Aug 23, 2012
7,505
1. Zener diode on the second circuit of with comparator:
By the way the zener diode should still not be there on your second circuit with the OPAMP, on post #24 I think.
That was used for protects the ADC and the Vzd should be a little higher than V_R2, add it or not that it is depends on you.
2. Capacitor on the ADC pin:
Should I put a cap for filtering the noise and how much should it be?
You mean that to adds a 0.1uF across on R2 for filtering the noise?
 

Thread Starter

ArakelTheDragon

Joined Nov 18, 2016
1,366
Yes for R2.

I am guessing that the zener is 3.3V and when the voltage of the OPAMP gets to 3.3V the zener will start working, but will never allow the voltage to get more than 3.3V?
 

ScottWang

Joined Aug 23, 2012
7,505
@ArakelTheDragon
You can re-setup the voltage divider ratio as 24V to 3V and the resistor as 21K with 3K, when you measure the ADC which the input voltage is 3V(adc), and on the uC side, when you calculate the input voltage should be multiple 8 times as
Vcal = 3V(adc)*8 = 24V, so you will get a 24V as the V1.

When you measure the ADC which the input voltage is 1.5V(adc) and on the uC side, when you calculate the input voltage should be multiple 8 times as
Vcal = 1.5V*8 = 12V, so you will get a 12V as the V2.

If you use the Vzd=3.3V and Its Vzd have ±5% tolerance then the
Vzd = 3.3V*([1-5%]~[1+5%])
= 3.135V~3.465V

The lowest 3.135V(V zener) is still higher than 3V(Vmax of ADC), so it will be ok for the most of conditions.
You can choose to add the zener or not, if you want to use it then buy 5 piece at least and choose the one which the Vzd >=3.3V.
 
Top