cancel
Showing results for 
Search instead for 
Did you mean: 

ADC returns wrong value

oziesin
Associate III

I have a hardware that have on stm32g071 chip and mcp9700 temperature sensor. I tried reading temperature and i read 2040.(ADC 12bit resolution).

I also measured directly on hardware using multimeter and i read about 0.7 V So ADC measures wrong. 

Addition:

I read temperature using nucleo board that have on g0 series microprocessor. Is it about hardware ? Any suggestion would be appriciate.

1 ACCEPTED SOLUTION

Accepted Solutions

Thank you very much. When I cabled vref+ and vdda it is correctly working.

View solution in original post

12 REPLIES 12
Javier1
Principal

You should take a look at this : https://deepbluembedded.com/stm32-adc-tutorial-complete-guide-with-examples/

Maybe you can try enabling Continuous conversion mode?

we dont need to firmware by ourselves, lets talk

Thank you but i 've already try continuous  mode , it did not change anything.

is this board custom hardware?

we dont need to firmware by ourselves, lets talk

Yes , designd by me. If i measure using nucleo it reads correct.

Can you show us?

we dont need to firmware by ourselves, lets talk
TDK
Guru

I don't think the bug is in anything that you've shown us. It's possible in your hardware connection to the device. Maybe you're not measuring the pin you think.

There is also some some possibility that the ADC was damaged.

If you feel a post has answered your question, please click "Accept as Solution".
oziesin
Associate III

Thank you to reply. Is it possible that is reference voltage issue ?

Of course the VREF pins, if present, must be correctly connected - read AN5096. If you've not connected those pins, take a look on internal voltage reference.

Your voltage reference would need to be 1.4V which isn't allowed on that chip, so unlikely. Of course, faulty board/schematic layout can lead to undefined results.

If you feel a post has answered your question, please click "Accept as Solution".