2016-06-15 03:25 PM
Hi all,
I want to measure a 18650 cell voltage with the help of internal ADC of STM32F407VG Micro controller. But the current rating of 18650 cell is in Amperes while my controller pin current rating is in mA. So my Question is how do i measure the voltage of this cell via ADC.and My 2nd question is what is the best possible way to measure current flowing in a circuit via microcontroller.Kindly help me out here, Thanks.2016-06-16 12:49 AM
I suggest to start here :
2016-06-16 08:10 AM
Hi! I am familiar with this law. The point is if under load conditions a current of Amp is flowing through these cells(2A lets say in a series of 10 18650 cells). Then how much current would flow into my ADC pin of microcontroller? or i could just insert a resistor in series to limit current to mA and ensure pin safety/
2016-06-16 09:19 AM
Point is you're NOT putting current into the ADC pin, it is measuring a VOLTAGE, and the current drawn will be all that is required to charge/discharge the capacitive sampling circuit. That your battery can supply 10A, or whatever, doesn't mean that is what will flow all the time as soon as you connect it to something.
It is the VOLTAGE you need to concern yourself with, and the range that the STM32 will accept, ie 0-3V for a 3V powered STM32 To measure current you'd need to do a differential voltage measurement across a small load resistor that can carry enough current for your application circuit.2016-06-16 02:42 PM
Yeah! I know i'm dealing with voltage here for ADC, was just concerned about the current drawn. Thanks for clarification i was also thinking something like that.
Can anybody suggest me some 2-way cheap switches which will be controlled through a GPIO pin of Micrcontroller. I have looked at DPDT relay boards but they are quite huge in size with a bit of circuitary. can someone suggest me some better options? Thanks :)2016-06-17 12:26 AM
> Can anybody suggest me some 2-way cheap switches which will be controlled through a GPIO pin of Micrcontroller.
With an appropriate driver stage, almost anything electrical can be controlled by a MCU. Perhaps an old-fashioned relay will do, or a logic-level MOSFET. More information about the load and required switching characteristics would be helpful.2016-06-17 12:43 AM
I am monitoring voltage of each individual cell via microcontroller in series of 10 cells. And whenever some cell get discharge I want to remove that cell from the circuit via some switching(2-way) i.e: replace that cell by a wire and then add another redundant cell into the series circuit(it can be thought of a reverse process of the previous case).
So, for this purpose I need 2-way cheap and small size switches. Hope its clear now.2016-06-17 12:57 AM
Logic level mosfets are a good choice I have read about them a bit. But how do i combine them to make 2-way switches? is there an IC for such purposes?
2016-06-17 03:16 AM
> But how do i combine them to make 2-way switches? is there an IC for such purposes?
Driving two of them by the same output ? Might become a little bit more difficult - one needs to be high-side, and the other a low-side switch. I'm no hardware designer, but example schematics should be around. But from your description, I would consider relays as well. There are types specifically for PCB mounting, they are cheap, robust, and different terminal configurations are available without a size penalty. And, because the switches are galvanically isolated, the design would be easier.
2016-06-18 03:35 AM
Yes, driving both of them by the same output of the microcontroller