• 1 Post
  • 431 Comments
Joined 2 years ago
cake
Cake day: June 11th, 2023

help-circle








  • The sense output from the op amp connects directly to an ADC input. The output is 1 volt per amp. If sense_a is already connected to ground, you will have to disconnect it.

    The hall effect current sensor will work fine too. They do tend to have an offset, but you can calibrate that out in software. Just take a reading when the motor is off and subtract it from the reading when the motor is on. If you do use the hall effect sensor, you could connect it between sense_a and ground so it will only measure the motor current.


  • A current shunt is a resistor that can handle the full current of the motor. You would probably want a 0.1Ω resistor rated for at least 1 watt.

    You measure the voltage drop across it to determine the current. The voltage will be quite low. With a 0.1Ω resistor and a 2A load, it will be 0.2V. You want to amplify that up closer to the full scale input of the ADC to get a decent resolution. An op amp with a gain of 10 would work well for that. Use a rail to rail op amp that can run from the 3.3V power supply.

    Here is a schematic:
    Schematic

    R4, D1 & D2 protect the op amp input from any spikes the motor produces.