va3wam / hexBot

Six legged robot
MIT License
3 stars 0 forks source link

figure out 5V current measuring voltage divider #196

Open nerdoug opened 2 years ago

nerdoug commented 2 years ago

Need to understand how current measurement works on the 7050 chip, calculate the resistor values for the voltage dividers, and update: 1) voltage-dividers.odg 2) power-test-config.odg

The voltage-dividers.odg file has the framework for the calculations on the right side, just need to determine some input values.

nerdoug commented 2 years ago

We saw an indication that the MultiSense signal that provides current measurement does this by providing a varying current on the MS pin. This came as a surprise, and I'm trying to find that reference again.

The User manual document for the VIPower series of chips, that includes the 7050, has diagrams that show MS pin connected to a microprocessor A/D pin, which implies that the current measurement is represented by a voltage. Reference: UM1693 document (which I'll put in the datasheets folder), section 5.3, figure 37. This shows 3 power control devices, each with a multisense output that has this path:

Note also the 100nF decoupling capacitors on the power control chips. Attempting to attach a copy of figure 37. figure-37

nerdoug commented 2 years ago

UM1693 provides further info on Multisense (MS) in section 7, section 7.2.1 in particular. It seems that the MS pin delivers a current that is proportional to the load current. However, the external Rsense resistor converts this to a voltage level. It's not clear how you select the value for the Rsense resistor, but if we're lucky, we can select it to create an output voltage that's compatible with the ESP32 A/D hardware, and avoid another voltage divider.

Rsense calculation is covered in section 7.2.5, and 7.2.6 . Needs further investigation, as it's a bit complicated.

nerdoug commented 2 years ago

see docs/current-sensing.odg for musings on Rsense controlling a current divider

nerdoug commented 2 years ago

The current measuring circuit seems to be a current divider, as explained in: https://www.electronics-tutorials.ws/dccircuits/current-divider.html https://blog.ttelectronics.com/current-sense-resistors

nerdoug commented 2 years ago

Need to breadboard the power control circuitry, and write some software to exercise the functionality, as a proof of concept.