How can I code the output of ADC ?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

I am trying to calculate the power consumption of a system , to do so I am reading the voltage value from a shunt resistor and amplifying it . After amplification , the signal goes to the Delta-Sigma ADC and finally I have digital form of my voltage value. Now , I need to do calculation with coding. How can I code the digital output of an ADC ?

0 Likes
3 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

The DelSigADC API has several functions that convert the digital reading into voltage values.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

As usual there are some example projects availlable. Just right-click on the ADC component and select "Find Example Project". Choose one without DMA first, will be easier for you.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Your reading off the shunt R produces an equivalent instantaneous I.

   

Ohms law. The V read is instantaneous V. So now you have to correct

   

for reactive loads. Google "embedded power meter ac line", lots of ap

   

notes on basic calculations and period measurement to do the calculations.

   

 

   

Regards, Dana.

0 Likes