2019-10-21 05:19 AM
Hai ,
my name is Dattu i am working on a project which involves measurement of current using ADC on STM32f407VG to achieve this i am using a 30A ACS712 sensor i have interfaced the sensor but when i am running the program i am getting a constant value like 1 or 0 so any can help with the interfacing issues i am not using a divider circuit even if i use i am getting same issue
Thankyou in advance
2019-10-21 05:57 AM
>... measurement of current using ADC on STM32f407VG to achieve this i am using a 30A ACS712 sensor ...
I am not sure if this sensor is a good choice.
The datasheet states:
>... 66 to 185 mV/A output sensitivity ...
For a F407 drawing less then 200mA, the sensor range seems a bit (2 orders of magnitude) off.
On top of that, the datasheets states "not recommended for new designs".
2019-10-21 06:47 AM
What value are you expecting? How much current is going through the sensor? Maybe that's just what the reading actually is.
2019-10-21 07:04 AM
Did you measure the output of the ACS712, using a multimeter, or better, oscilloscope?
JW
2019-10-21 09:46 PM
I am using a digital multimeter to measure the output i am able to see output value as 0.59/0.65 constantly
2019-10-21 09:50 PM
do you mean that i cannot use ACS172 sensor on stm32f407vg board and in that case do i have any other alternative to measure current on stm32f407vg like any sensors or do i need to build my own circuit
thankyou
2019-10-21 09:56 PM
the output which i expect should vary according to the change in voltage (or) a constant voltage with variable load i have tried both the ways in case if this sensor is not appropriate for this task how can i proceed further my final aim is to measure current across load using adc on stm32f407 vg board
2019-10-21 10:23 PM
Do some rough estimations. A STM32F407 draws about 100mA, which is 0,3% of the sensor's range.
This gives you about 7..18mV sensor output signal, which uses at most 4 bits of the 12-bit ADC signal of 3.3V.
I would call this a bad choice.
2019-10-21 10:27 PM
do i have any alternatives if so please guide me
2019-10-21 10:30 PM
So the the ADC is not set up properly. In debugger, check in respective GPIO_MODER if the pin is set tp Analog. Read out and check the ADC registers.
JW