If you have been following my posts, you will have seen that I am powering my ESP8266 using the 3.3V source from my Arduino UNO R3 board. I knew that the 3.3V source on the Arduino board does not have enough current to satisfy ESP8266 but was using it since I had not seen to many issues. Now that I have been playing with it more, I am finding that the Arduino board would reset whenever I ran an AP search. I temporarily worked around the issue by adding a 2200uF cap (yes it is a very big one) tot he 3.3V Arduino supply output. This works most of the time, but knew that it is only going to be a temporary solution. It would likely kill the Arduino board eventually.
So I picked up a LM317T Adjustable Voltage Regulator at Radio Shack for $3.49 and hoping to use that as the power source for the ESP8266. I am thinking of using a 9V battery as the source. The LM317T output can be adjusted from 1.2V to 3.7V. If I use a 9V battery as the source, I am hoping to use a small potentiometer so I can “dial” in the voltage I want up to (9V-1V) assuming that the LM317T will have some drop out voltage.
Here is some key info from the LM317T data sheet (click on picture to enlarge)….
The key equation boils down is Vout = Vref * (1+ R2/R1).
- My first desired output is 3.3V
- I have some 330 ohm R’s handy so I am going to use it as R1.
- Vref = 1.25V according to the datasheet.
Solving for R2…..
- R2 = (Vout / Vref -1) * R1 …. replace with what I have….
- R2 = (3.3 / 1.25 -1) * 330 ==> 541 ohms.
I also purchased a very small (physical size, not R value) 1K potentiometer at Radio Shack for $1.99. I hope to use this as my “voltage dial”. The circuit would be really small with only 3 parts on it. Here is the diagram..
Testing and results
I bread boarded the circuit and it worked on the first try! That never happens. I measure the output and can use the dial to change the voltage. I dialed it to output 3.3V and measure the R value of the potentiometer. It was ~600 ohms which is close to the calculated value. Not sure where the error is coming from. Maybe the 330 ohm R is a little off or the Vref is not quite 1.25V. I still call it a success. Now I use this to power my ESP8266 without causing my Arduino board to reset.
Here is a picture of my bread board..
Now that I know this works, I can purchase a few more of these parts on line for cheaper and make my own little power bank with several voltage outputs that can be dialed to various levels for all the crazy projects I have planned. Probably build in a few source options like 9V battery holder, USB port, power jack (like on laptops). Of course the top output of all the supplies would be limited by the source but gives me a world of options now.