How do you calibrate the current sensor connected directly to OSD?

101 views
Skip to first unread message

Phillip Evans

unread,
Sep 15, 2013, 5:14:49 PM9/15/13
to kv-te...@googlegroups.com
loving this OSD, had lots of fun spending today doing all the hardware mods to the OSD to allow reading of the current, RSSI and battery voltage as my multiwii doesnt have analogue inputs accessable. 

I have got the RSSI working (although i might add a capacitor to smooth out the readings a bit). Got the main battery voltage working. But for the life of me, i cant figure out how to calibrate the current sensor... :oS My current sensor gives out 0v-3.3v for 0-90amps. I put in a voltage divider to bring it down to 0-1.055v. When i connect it up and increase the current, the figure on the display actually goes in to minus figures!!? really weird as if i put 1v straight in to it, then it shows a positive amp reading. Anyway, i have no idea how to calibrate it with the items listed below in the config.h so that i actually get useful readings... 

Can anyone help me out? :) 

#define EST_PMSum 2.6        
(no idea what this is supposed to do?) 
                                         
#define AMPDIVISION 3600            // Hardware current sensor division ratio 
(when i change this value it doesnt seem to affect the amps displayed?)

#define AMPERAGE_CAL 1.1            // Amperage calibration   
(i have increased this number so that 1.055 volts = 90amps, as per my current sensor and voltage divider)

#define AMPRERAGE_OFFSET 512        // Amperage = AMPRERAGE_OFFSET - analogRead * AMPERAGE_CAL / 10.23
(why do you need an offset? i changed this to 0 so that 0 volts from my sensor = 0 amps)


Phillip Evans

unread,
Sep 16, 2013, 11:17:18 AM9/16/13
to kv-te...@googlegroups.com
figures it out!! :) lol

ignore my whole message! 

just need to set AMPERAGE_CAL to be = what the amps would be with a 1.1v input then that answer by 10. 

so at 1.1v my amps should be 93.838amps (this accounts for the fact that my voltage divider gives 1.055v for 90amps)

then get 93.838 and divide by 10 to give  9.3838 which can put as the value for AMPERAGE_CAL.

At least i think this is right, am at work, will test at home. 

KataVentos

unread,
Sep 28, 2013, 10:11:37 PM9/28/13
to kv-te...@googlegroups.com
Hi Phillip,

   sorry for the extremely late reply.
Good to know you already have it working.

Now for the none explained function EST_PMSum (2.6) is to be used with PowerMeter Soft and the number is empirical, it is a division to fine tune the previous tuning session on MWii so you display the "real" drained amps at the end of flight.

Cheers,
-KV 


Reply all
Reply to author
Forward
0 new messages