Category Archives: Arduino

State of Charge (SoC) estimation of a lithium battery with polynomials

Estimating the state of charge of a lithium based on voltage measurements from the battery is rather challenging. This is due to not only the state of chacrge but also the condition of the battery, current drawn, ambient temperature, etc all having a significant impact on the voltage measured. The best way for SoC estimation would be a columb counter which wasn’t available for my project. For my project the current drawn is rather constant around 200ma and the temperature is relatively stable around 20-25C. Thus a much better estimate should be possible with polynomials than the simple linear SoC estimations. For the polynomial regeressions and to find the polynomial coefficients r was used.

Continue reading

Ultrasonic Dimmer (without humming or buzzing noise)

Arduino based Ultrasonic Dimmer

I have been working on this project for a while and whilst it is still under development here’s a short guide after several requests to do so. The dimmer uses an interrupt driven XL-Maxsonar EZ1 ultrasound range finder to measure the distance between the sensor and your hand. By moving your hand up and down over the sensor you can increase or decrease the amount of light emitted by the connected halogen lamp.

In this post I will explain how one can make the basic dimmer based on a simplified circuit. This dimmer later evolved to include an LCD, SHT15 temperature and humidity sensor, DS1307 realtime clock and a mosfet driver to drive the mosfet above 30Khz so the unpleasant dimmer humming noise would disappear. I will talk more about this later.

First things first, here’s a movie of the latest version of the dimmer in action, it includes an LCD, a temperature and humidity sensor, a realtime clock and an alarm function that simulates a sunrise:

[youtube width=”590″ height=”420″]http://www.youtube.com/watch?v=NGR54NZKIrM[/youtube]

Continue reading