aq_mishu
Full Member level 4
just now i've finished the assembly of it on the new pcb without the q4 part. it's 1:30 at night and i'll power it on in the next morning after a good sleep. I'll let you know...
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I'm really sorry to hear that, I hope you are okay.betwixt said:Sorry for not replying, my mother died yesterday and I have had to travel to arrange funeral etc. I will reply in full later, at the moment I am trying to use internet on mobile phone - not easy!
Brian.
[Batt - ]------|--[Shunt as .22Ω]------GND
|
|---[Atmega ADC]
[Batt - ]------|--[Shunt as .22Ω]------GND
|
|--[1MΩ]---[Atmega ADC]
For I = 1 To 10 Step 1 'taking 10 readings
Adc0 = Getadc(0)
Adc1 = Getadc(1)
Temp_iin = Adc0 * 4.89 'adc * resolution = 5000mV [Note: at 3A, shunt voltage = 600mV]
Temp_iin = Temp_iin / 100 'scale at 0.1V. So Iin = 1A at 0.1V
Iin = Temp_iin + Iin
Temp_vin = Adc1 * 4.89 'adc * resolution = 5000mV
Temp_vin = Temp_vin / 1000 'scale at 5v
Temp_vin = Temp_vin * 4 'scale up 5v to 20v
Vin = Temp_vin + Vin
Waitms 100
Next I
Vin = Vin/10
Iin = Iin/10