Skip to main content

Initial planning for companion boards

One tiny board of 4 cm times 2 cm with 3 terminals:

  • Battery positive
  • Battery negative
  • SOC output signal 0-10V

The output is referred to the battery negative, and is a piecewise linear interpolation that approximates the discharge curve.

image.png

Filtering

The V_SOC must not jump around as the battery voltage fluctuates according to the load. Therefore the highest input value of the last 5 minutes must be used for calculating the output. For this, we need a microcontroller.

Flexibility

The exact same circuit and software must work fine for 36V or 48V batteries. The choice between the two must be made by a simple jumper on the board.

Make it simple

Could we build the whole thing around an Arduino nano? One PWM or analogue output pin amplified and filtered  to drive the 10V output.

In particular this is a good platform:

https://no.rs-online.com/web/p/microcontroller-development-tools/1245506/

Can we have this + op amps + LDOs and we are done, can build it in a few days?

The power consumption of this while thing without the LED is 6 mA. Why do we have 55mA on the BMS?

Close the project - LEDS

If we have more GPIO outputs, we can make the LED board work tooo!!!!

Like with this:

https://www.elfadistrelec.no/no/arduino-pro-mini-328-16-mhz-5v-sparkfun-electronics-dev-11113/p/30145429?ext_cid=shgooaqnono-P-CSS-Shopping-NGRAM&pi=30145429&gclid=Cj0KCQjw5auGBhDEARIsAFyNm9FBHguyLCLafc4_HDE0ooUHJLxeslfWpgeNSN9Q_Ug477wgmwTIXDQaAj66EALw_wcB

1.6 mA consumption!!

https://diyi0t.com/arduino-reduce-power-consumption/

First approach - Through Hole circuit

As a first approach before designing the ultimate version, we will build up a through-hole circuit from the "Arduino Uno" development kit. 

On the one hand, the Arduino kit will provide all the signal processing of interest while, on the other hand,  our external circuit will serve as supply, filtering and providing the final 0 - 10 V SOC signal.

The schematic is depicted below.

image.png

There are two LDO's at the top side of the scheme. They will provide the necessary voltage level for both the Arduino kit (+5V) and also for the operational amplifiers (+12V).

A voltage divider is performed using R1 and R2 in conjunction with a voltage follower Op Amp. This way, the battery voltage is transformed into a magnitude that the micro-controller could read properly.  The selection of those two resistors is done considering both the 36V and 48V battery model. Both batteries must provide an equivalent voltage between 3.3 and 0 V at the ADC input. Then, for R1 = 680K and R2 = 40K:

  • Vadc_MAX_36V  = 2.333 V
  • Vadc_MIN_36V  = 1.5555  V
  • Vadc_MAX_48V  = 3.033 V
  • Vadc_MIN_48V  = 2.0222  V

*** THESE VALUES HAVE CHANGED IN THE LAST UPDATE

This ADC output is taken to the Arduino external circuit and then processed. We can also, select between 36 V or 48 V model through the push buttons at the bottom of the diagram and consider it for the algorithm.

The micro-controller will implement a lookup table based on the total voltage read and later provide a duty ratio for a PWM signal according with the battery state of charge. This PWM will be the input of the second Op Amp. It consist of an active low-pass filter with a given gain. 

To summarize, this Op Amp will give us a signal from 0 to 10 V according with the battery SOC.

Bill of Materials

Adjustable Linear Regulator TO-92 LR12N3-G..................(x2)

Two terminal Operational Amplifier OPA2241P.................(x1)

Arduino Uno development kit.....................................................(x1)

Generic Push Button.......................................................................(x2)

Through Hole Resistor....................................................................(x10)

Though Hole Capacitor...................................................................(x7)

Second approach - Implementation

The implementation of this second stage has involved the construction of a through hole set-up with the components previously commented. However, this time we have taken into account some new considerations that we were missing:

  • An Arduino Pro Mini has finally been selected for the application. The reason is about the consumption. This little board runs at 3.3 V / 8 MHz rather than the other versions considered. In the end, it will draw a significant less amount of current since we have reduce the operation voltage and frequency. Also consider the amount of physical space we are saving with this new device. The picture below shows a comparison in size among the Arduino Uno, Nano and Pro Mini, respectively form the left to the right.

image.png

  • This new Arduino kit can be supplied in a range up to 12 V. Then, for this purpose,  we have considered another supply at 6 V in order to increase the internal board LDO efficiency.
  • A capacitor has been introduced in the input of the board (battery supply) and also an RC filter at the input of the analog measurement (1k, 1uF). This will provide a considerable decrease in the ripple of the signals processed by the micro-controller, and, consequently, a highly improved precision in the SOC estimation.
  • Five LED indicators have also been considered. We applied for the BH battery indicator which already came with the proper connector with the LED inputs and the push-button that governs them. It is shown on figure below.

image.png

  • A jumper has been added for selecting between the 48 V or 36 V battery version. This jumper will go attached to one of the micro-controller inputs.

Thus, a new more completed schematic is provided.

image.png

As can be noticed, some passive components have been removed since they were only wasting energy getting to a more reduced version of the previous circuit. The set up can also be seen in the next pictures, as well as some numbers to show the performance.

image.png

Where the multimeters are for:

  • Blue: State of charge signal, form 0 V (0%) to 10 V (100%)
  • Red: Amperimeter. It shows the overall circuit consumption in mA.
  • Yellow: Battery voltage. It measures the voltage at the terminals of the emulated battery (power source) since its own display usually lead to some errors.

Once it is verified that the algorithm works properly, next step is the concern about the power consumption. If we were to consider this circuit in a real life application in which almost 6 mA are being consumed, it would take a bit more that two months to fully discharge a 10 Ah battery. That is not acceptable. Consequently, this power consumption has to be reduced.

Third approach - Power management

As established before, the power consumption can be a problem and must be decreased. Two new considerations have been studied this time

  • To implement a "low power" mode in the micro-controller to make it sleep for a given time. The consumption while sleeping is notoriously reduced.
  • To use switching regulators for the circuit feeding, rather than LDO's. This will increase the overall circuit efficiency from ~30% to almost 90%

Low power mode

The idea is to use one of the countless libraries Arduino has, so just with a couple lines of code we can select when to send the device to sleep; saving lots of energy in the process.

Thus, the procedure is to run the SOC algorithm in a loop, and, at the end make it sleep for some seconds (8 sec. in our case). After that, the microcontroller wakes up by itself, runs the code and again goes back to sleep, periodically repeating this sequence.

Two pictures are provided about the consumption. On the left when awaken, on the right when slept.

image.png

Assuming it takes maximum 1 sec to run the SOC algorithm and then it sleeps for 8 seconds, the mean consumption can be determined as:

image.png

That gives us a mean consumption around 2.57 mA which is quite low in comparison with the result in previous section, but still we can manage to make it even lower.

Switching regulators (DC-DC)

The last step is to replace the regulators. These regulators offer quite bad performance in terms of efficiency since they just dissipate the excess of power between its input and output. Then, the best solution is to apply for some DC-DC converter modules based on switching regulators. In fact, manufacturers like RECOM offer quite good solutions. The ones employed in our case will be  from the RPM family since they provide enough high efficiency in a relatively small package, with a voltage operating levels suitable for out application.

Two of them are used from 60 V to 12 V (AO feeding) and from 12 V to 3.3 V (MCU feeding).

After implementing these new devices in a new PCB and considering the sleep mode developed in previous chapter, the mA numbers are the following.

image.png

Where the highest consumption corresponds to the awaken stage. This way,  applying for the previous expression for the average current , we will have a mean value of 0.57 mA. Even more, for the case of a 10 Ah battery, the time it would take to fully discharge shoots up to around 2 years.

Including LED indicators

Despite the previous circuit managed to success, we still have to deal with the LED indicator board that must work independently the device is sleeping or not. For that, we just attach an interrupt to the push-button that triggers the LED's in such a way that the device wakes up, lights up the LED's and goes back to sleep.

Low power mode verification

The verification of the sleep mode has been done using the oscilloscope so we could visualize the current step that appears each time the system changes between sleeping and awake mode. 

In fact, the measurement consisted on visualizing the voltage drop in a 1K shunt resistor added at the entrance of the supply since we do not own a current probe.

The setup is shown below, as well as the current waveform observed.

image.png

Despite we can observed the oscilloscope screen from the picture, a more detailed graph is provided below.

image.png

Obviating the ripple observed, mostly produced by the power source (which will not be present in a battery), we can verify the consumption step from 0.52 V to 0.83 V, which translated to current trhough the 1K res, gives us the consumption regarded in the "Switching Regulators DC-DC" chapter's picture.

A bit more information can be extracted from here such as the time it takes for computing all the SOC code before going back to sleep. This way, we notice that the system takes only around 30 ms to operate, which is negligible versus the 8 seconds it spends on sleep mode.

Cost of production

Prices w/o MVA, including shipping.

25 kr - Arduino Pro Mini 3.3V ATMEGA328P from AliExpress (93kr from Elfa Distrelec)

52kr - RPMH12-0.5 converter

33kr - ROF-78E3.3-0.5SMD-R

15kr - opamp

20kr - PCB

= 145kr

Plus resistors, caps, connectors, header pins, etc.

Fun fact: the Arduino Pro Mini costs less than the sum of its components.

However, it is also super super simple. We actually only need 7-8 SMD components: the chip, the resonator, and a few caps and resistors. It might be no more work installing these than layering on the board. And it would give flexibility! We shall do a trial. 

Chinese assembly costs

Let's compare the production costs when applying for the Chinese manufacturer "PCBWay.com", when designing the Smart SOC with the micro-controller is included or when we put it by ourselves, separately.

Prototype 1: Arduino microchip included

On the picture we show a screenshot of this PCB. Apart form the primary circuit, it includes the same chip that runs the Arduino Pro Mini board and the sufficient components to make it run (oscillator, decoupling capacitors, etc.). Also, the space that it takes on the board is negligible (only 6 more mm than not including it!!)

image.png

For an amount of 10 boards already assembled, the actual bill would be

PCB production cost

$ 5.00

Assembly cost

$ 295.00

Components cost

$ 206.37

TOTAL COST

$ 506.37

Which in the end gives us a unitary price around $50/board.

Prototype 2: Arduino board externally assembled

A simpler version of the previous. This time, we only consider the primary SOC circuit, so then we include the Arduino Pro Mini kit externally in a sandwich shape. This means that all the PCB tracks placed before are now substituted for its correspondent pin to join the Arduino board. Figure below shows the design.

image.png

Let's see how the price changes now when applying for the Chinese manufacturer for a full assembly as we did previously. However, this time the purchase will be done for 100 boards.

PCB production cost 

$ 51.00

Assembly cost

$ 351.00

Components cost

$ 1409.00

TOTAL COST

$ 1811.00

So, this time, the unitary price per board goes down to $18.11/board plus the cost of the Arduino Pro Mini kit of $ 2.00. This gives us a final cost around $20 per circuit!!!