Using a 12v battery to run 5v microcontrollers

Having to use a voltage of 5 volts is something very common today. The first thing that comes to mind is to charge our mobile phone. Our mobile phones are charged by a charger / transformer that converts the 220 or 110 volts of the network to 5 volts in order to finally charge the battery of a mobile phone that operates at about 3.7 volts.

On the other hand having access to a 12 volt battery is also very common. Our car for example always has a ready supply of 12 volts ready for use. If we have an autonomous photovoltaic system (small or large) we still have access to a 12 volt source. An old car battery can also give us this power supply, even if it is no longer in our car.

Of course there are ready-made devices on the market that can do this voltage conversion very easily. In this article we examine how we can get the desired voltage from a general purpose transformer, ideal for use with microcontrollers and more. For example run an ARDUINO microcontroller (typically running at 5 volts from the USB port) from a 12 volt battery. Many have found themselves in this position as it is very common for someone to look in the warehouse and see a car battery sitting on the edge … dusty! and wonder if I can run my ARDUINO PROJECT with this battery at no extra cost to buy a battery? The answer is of course YES, although the car battery is not the ideal solution. In projects that are short or medium term can really be a good solution.

Let me give you an example: last fall I wanted to run the internet beehive scale based on the ESP32 microcontroller with SIM800 gprs modem (see how I made it here) to monitor the flow in my area of ‚Äč‚Äčinterest. I had no batteries available. The ones I had were placed in a project that was already running. So I thought maybe a car repairman or a battery dealer would have an old battery after a replacement. In fact, having a voltmeter with me I found some batteries, one of which was offered for free. Of course I chose the one that the voltmeter showed the highest voltage!

The battery was over 12 volts at the time of the measurement but could not start the car. Using the transformer I will show you below the scales ran for over a month without having a solar charger connected to be renewed daily. Due to the fact that there was no connected charge regulator, the scales drew power even when the voltage dropped too low. The result was that the battery was completely depleted! At 0 volts !!! The scale as long as there was a trend worked amazingly and gave me very nice graphs of both the weight and the environmental conditions prevailing in the area. I considered the battery dead now because car batteries are not as deep discharged as those of photovoltaic systems. They are designed to have great strength at start-up and not withstand full discharges. I tried charging it with an improvised battery charger (consisting of an old 18-volt power supply for my first HP DESKJET 710 printer and a charging regulator for a solar panel – see more here) and was thrilled with the result I was not expecting. The battery reached 12.8 volts again and remained stable, as if telling me I was ready for the next experiment! I said of course you are!

With a solar panel charging the battery it could last for months. I like to use something that I think is not (yet) for throwing away. Buying a new battery and even a deep discharge is a significant cost and here I just quote an option … almost free. An old car battery may not be as comfortable in size and weight but it is free. And that counts for someone like me who has his mind constantly on trials. I can not buy batteries for all my ideas. Maybe you too.

I close my thoughts by presenting a converter that worked very reliably in my case. He also did not have any overheating issues. The latter is very important when the field of action is out in nature. I would not want something too hot to be near dry grass for example. The LM2596 DC-DC Voltage Regulator Adjustable Step Down Power Supply Module With Display was easily and clearly adjusted even for a beginner.

LM2596 buck converter
LM2596 buck converter

I made a reference to overheating and I have to give an example. The following transformer showed a high temperature, to a point where I could not even touch it.
The Mini DC Adjustable Power Supply Buck Module Step Down Module provided a constant output voltage and worked well, but I can not recommend it for outdoor use in nature. I installed a small heatsink without noticing a drop in temperature. CAUTION.

Author: tommykar

Leave a Reply

Your email address will not be published. Required fields are marked *