I am Danny Staple, Orionrobots is my investigations and projects with robotics, electronics and stuff that moves. I aim to make some of the cool robotics things easy for anyone to build, and push the boundaries of what is easy. Oh and just to have lots of fun doing it too…
I’ve been learning to do stuff with the esp8266 in the past month or so, and I’ve finally got all the video from it uploaded. In the video series for this, I take the 8266 on the esp-01 board, and get it flashed with Lua/NodeMCU firmware, and then use this to serve a web page that controls an LED - a web connected lamp.
It is a simple example that can be used as a starting point for many internet connected (internet of things/IoT) gadgetsd.
If you’ve not been following my video series, you will want to know what the esp 8266 is. This video introduces what the 8266 is, and why I love this device. Yes - I get pretty excited about geeky stuff like this.
In short - it is a very cheap wifi connected microcontroller - a device you can attach your own sensors, and outputs to, and then write code for.
Getting it to talk to me at all and powering it was an initial problem, which I’ve covered in my previous blog post here Powering the Esp8266. I also put the Lua/NodeMCU firmware on the 8266 in the last video segment there.
Once it was powered, I put an LED on the board and got some code to make it flash running.
This was a fairly simple circuit, based upon the circuit made for the previous segment with the power supply, but with the serial moved to a more convenient place on the breadboard.more...
If you are working with small devices, you will need power supplies for them. 5v is generally easily supplied by a USB port (be careful here - get it wrong, and you may damage your laptop). 3.3v needs a few tweaks.
I wanted to power the esp8266, and it took a few attempts to get it right. I’ve got footage, circuit diagrams and datasheets for each attempt, the limitations of it, and details of what worked brilliantly.
First up - the TS2950CT - capable of 150mA max (this was the flaw). This is an easy to use regulator in a small TO92 package - which has 3 pins, is easy to breadboard, and was available in a local Maplin.
It is “Ultra Low Dropout”, so 5v+ is ample. Only a single 3.3uF cap was needed to get stable output from it.
However, after having this work, I had to order a new serial cable to talk with the 8266. When that arrived, I attempted to use it with the 8266.
It didn’t quite go right, I found it not particularly responsive - garbage characters and then a reboot loop - I diagnosed the power supply as being the problem.
After some research, and checking current with a multimeter, and the datasheets for the chip along with information on the 8266, it became clear that this supply is underpowered for the esp8266.
Datasheet for TS2950CT: http://www.farnell.com/datasheets/50395.pdf The 8266 can need 240/300mA when wifi is enabled.
As a short term hack to get something, anything other than the reboot loop, I used an Arduino Uno rev 3 board to power it - this worked ok, but is a bit of an abuse of an Arduino, and according to it’s datasheet, it was barey better than the original, but at least just enough not to be in the reboot loop.
I spent a bit of time choosing and checking the specification for a power regulator - inspecting the datasheets for it.
The part I chose: http://www.farnell.com/datasheets/1776449.pdf
Finally, I received this part, built a circuit board with it and got the 8266 running, without tracebacks on it. This was the part used in all my further esp experiments.
The part I chose, the LD1117 worked brilliantly and has power to spare for other sensors or devices on a gadget.
Here is the circuit in fritzing:
Iam about to start tinkering with the rather interesting esp8266- an inexpensive chip that does wifi, can be programmed and has a couple of GPIO pins. The plan (and I’ll make a video on the detaills later) is to use 2 continuous rotation servo’s to make a wifi-enabled tiny mobile robot.
I started this by wanting to test all my servo motors, to see that they worked, and if any in my robot cupboard had been modified for continuous rotation. None had. However, I had a 6v, 4xAA power supply that I intended for use in building a robot with the esp8266. After demonstrating the motors, my little one asked “why does it need to be connected to the laptop if it already has batteries?”
I had a think about this. The regulator onboard the Arduino and a 7805 will not deal with 6v. It is too high to safely use unregulated with the 328 without damaging it, and too low for the 7805 to regulate - it wants about 7v. Awkard. I could go on the internet, and buy a boost-buck regulator, although it would be pricey, and not quite satisfy the immediate gratification.
I looked around my store cupboard, and seeing the bag of diodes, it hit me that I could probably use a couple of diode drops to get close enough for it to work. Each diode, these are 1n4007’s, will drop about 0.6v. Two of them makes 1.2v.
6v - 1.2v = 4.8v
See the video for more information on it, and to see it working.
The supply works, however, I later found some issues with the noise from the Servo motors - which I’ll discuss in another video.more...