logo elektroda
logo elektroda
X
logo elektroda

No Voltage Reading on A0 Pin With Voltage Divider on Rectifier to Microcontroller

45 12
ADVERTISEMENT
  • #1 21671578
    David Jensen
    Anonymous  
  • ADVERTISEMENT
  • #2 21671579
    Mark Nelson
    Anonymous  
  • ADVERTISEMENT
  • #3 21671580
    David Jensen
    Anonymous  
  • #4 21671581
    Mark Nelson
    Anonymous  
  • #5 21671582
    Steve Lawson
    Anonymous  
  • #6 21671583
    Steve Lawson
    Anonymous  
  • ADVERTISEMENT
  • #7 21671584
    Steve Lawson
    Anonymous  
  • ADVERTISEMENT
  • #8 21671585
    Steve Lawson
    Anonymous  
  • #9 21671586
    Steve Lawson
    Anonymous  
  • #10 21671587
    Steve Lawson
    Anonymous  
  • #11 21671588
    Mark Nelson
    Anonymous  
  • #12 21671589
    Steve Lawson
    Anonymous  
  • #13 21671590
    Steve Lawson
    Anonymous  

Topic summary

The discussion addresses an issue where a microcontroller's analog input pin A0, connected via a voltage divider to a rectifier output, shows no voltage reading, while pin A1, measuring the voltage drop across a shunt resistor, registers a signal. The voltage divider formed by resistors R1 and R2 is expected to scale the rectifier voltage to about 95%, but A0 reads a negative voltage (-0.3V), which is inconsistent with expected behavior and likely indicates wiring errors or grounding issues. The shunt resistor R3 is used to measure current indirectly by voltage drop, with R4 acting as a buffer to protect the microcontroller input. The negative voltage reading on A0 suggests a bad ground or incorrect connections, as microcontrollers typically cannot read negative voltages. Suggestions include verifying wiring, measuring voltages with a voltmeter or oscilloscope independently of the microcontroller, and testing inputs with known voltages such as a battery. The discussion also highlights that the current measurement approach may be flawed if the shunt resistor is connected directly across the supply without a proper load, and that the voltage divider may be redundant if the supply voltage is already measurable at A1. Protection diodes (D1, D2) are recommended to safeguard MCU inputs from voltage spikes. Additionally, the use of an operational amplifier with a separate power supply is proposed to invert negative voltages and scale signals to match the ADC input range, improving resolution. Considerations about ADC reference voltage and resolution are discussed, emphasizing the need for appropriate voltage scaling to maximize measurement accuracy. Overall, the problem likely stems from incorrect wiring, grounding, and measurement setup rather than component failure.
Summary generated by the language model.
ADVERTISEMENT