ESP8266 – Low-cost Wifi Module for Embedded Applications

ESP8266 Module
ESP8266 Module

I can only read all the fun project posts on Hackaday using this cool Wifi module for so long before I have to try it out for myself.  I’m guessing this will be the first of many posts on my experience with this module.

From all that I read, this seems to be a fairly robust little chip (albeit poorly documented) and has a pretty lively community of hackers and developers willing to share their experience as well.  Many are attempting to use this as a standalone device, but my near-term aspirations are to use it with an array of my microcontroller platforms (at least all that have a USART available.)  The ESP8266 comes with a nice set of AT commands used to setup and use the integrated TCP/IP protocol stack.

My goal here isn’t to teach anyone how to use this module, but give a synopsis of what I’m doing with it, how it’s going, and to share any designs that may be helpful for those who want to give it a go as well.  There are many good websites that provide information about the module. Here, here, and here.

Ultimately, I’ll be using this device to communicate directly with the USART ports of my embedded projects, but until then, I’ll debug and develop using terminal programs from my computer or some Java code to simulate what will run in the microcontrollers.  There are several development boards out there to provide power and breakout pins so I decided to go with 2 options initially.

I liked the breakout board (ESP8266-EVB) and ESP8266 modules from Olimex to get up and running quickly.  They also break out all the GPIO from the chip in case I decide to utilize that down the road.  In the mean time, it’s done and ready for me to use while I wait for my boards to come in from OshPark.  Since I’m in the US, I purchased mine from Microcontroller Pros LLC for $11.50.  I’ll power it initially directly from my FTDI cable’s 5V supply since USB can handle up to 500mA and the ESP8266 draws peak current of around ~230mA.  If you do the same, make sure you use a cable similar to the TTL-232R-3V3 since the max voltage levels capable by the 8266 is 3.6V.  The TTL-232R-3V3 has a 5V VDD line (Red wire) and the RX/TX lines are all 3.3V.

ESP8266-EVB from OLIMEX
ESP8266-EVB from OLIMEX

For my own personal development, I wanted a certain form-factor and connectors in a certain orientation and location for prototyping.  I also wanted a fairly versatile board that I could use in the future with my embedded projects that has the requisite power supply and connections to the ESP8266 module.  I didn’t find exactly what I was looking for from the community, so I turned to my new favorite low-cost board house OshPark again to get some prototypes made up.

Here’s the schematic: ESP8266 Daughterboard R1

Boards available from OshPark, $11.40 for 3 boards: PCB Files

ESP8266_Daughter_TOP

ESP8266_BOT

Connectors J4 and J5 are wired identically and are used to plug directly into the TTL-232R-3V3 cable.  I like to add a second connector sometimes to make probing with a scope easier without splicing wires and soldering jumpers.

U1 is the 5V-to-3.3V regulator and can handle up to 1A.  The schematic has a regulator that’s rated for up to a max input of 6.5V, but I think I’m going to change it to one with a greater max input like the NCP1117ST33T3G which has a 20V input limit so I can use it on some of my automotive systems as well.

Connectors J1 and J3 break out all the ESP8266 lines and also have the input voltage from the regulator and have 0.100″ spacing to work with a breadboard for development.

Keep checking back for more updates once I get the boards and system up and running.

Magnetic (Hall Effect) Noise-free End Stops / Homing Sensors – Part 1

After reading some the Shapeoko community’s experience with mechanical end-stops, I decided to design my own hall-effect based sensor solution. I’m not saying I went about it the right way and there are probably better/cheaper/faster solutions, but it’s what I came up with. I should say, I was inspired by Kevin Patterson’s hall effect solution (love the red/green feedback LEDs.)  https://www.youtube.com/watch?v=vqU_5wZAX3s6

NOTE: This design has not been implemented yet. Still waiting for one more board from OshPark to arrive.

Features:
* 24V separate power supply for the hall effect circuit.
* Nominally high (active low) design.
* Opto-isolated sensors
* Higher sensor voltage (24V) in combination with some simple pull-ups an caps to help ride out any coupled transients.

I’ve built some acrylic holders for the sensor boards and a small enclosure for the main board. The concept is similar to Kevin’s in that I will have 6 sensors (2 for each axis) connected with inexpensive phone cord connected by RJ11’s to the main board. I’ll mount my main board to the side of my control box where the grblshield/arduino lives.

Enclosure made with the Shapeoko. Holds spindle power supply, Arduino, grill-shield, and speed controller.
Enclosure made with the Shapeoko. Holds spindle power supply, Arduino, grbl-shield, and speed controller.

The PCBs are available to purchase or download the gerber files (PCB build files needed by a board house to make printed circuit boards) from Oshpark.com.
Main Board: https://oshpark.com/shared_projects/RHwVNxOU1
Sensor Board: https://oshpark.com/shared_projects/B7TXAfxt2

FYI:
Schematics and PCB Layout software –> OrCad
Housing design: ViaCad + MeshCam

SCHEMATICS:

shapeoko_homing_circuit_sensor_board

shapeoko_homing_circuit_main_board

BOM: (Note: I recommend the DRV5023AJQDBZR for the Hall Sensor instead of what’s on the BOM. The one in the BOM is a latching version and shouldn’t be used.  Use Digikey PN: 296-38452-1-ND)

Digikey_Order_Shapeoko_homing_circuit

1 of 6 sensors inside an acrylic housing (unpopulated)
1 of 6 sensors inside an acrylic housing (unpopulated)
Main board housing and Sensor covers.
Main board housing and Sensor covers.
Original batch of PCBs from OshPark.
Original batch of PCBs from OshPark.
Testing the sensor circuit before the boards showed up.
Testing the sensor circuit before the boards showed up.
Getting some of the parts ready for the build including a little shield board to solder on the sensor inputs to the UNO.
Getting some of the parts ready for the build including a little shield board to solder on the sensor inputs to the Arduino Uno.

As I build and test this concept I’ll try to post my results. Hope this helps some of you.

Testing the new equipment – A train track for the kids

After Hours now has 3D printing and CNC machining capability for all the custom electronic fixtures and enclosure work that’s done (better then a file and a Dremel!!)  Well, of course the new toys tools needed to be put to the test.  The kids have a wooden train set that had an important wye track missing and Ebay failed us on a replacement.  What better opportunity?  We started with a 3D printed prototype to get the “customer’s” approval before finalizing the design in wood.  Good thing we had that design review because we needed a male coupling where a female coupling was.

One more thing, it’s a good idea to make sure when you export your g-code that you choose the right machine (MeshCAM has a selection of machines the g-code export is tailored to).  I didn’t on the first couple attempts and ended up with a mill cutting right through the middle of the almost finished track.  The final version in the picture is attempt # 3.

For those who care:

CAD work: Punch ViaCAD 2D3D v9

CAM: MeshCAM

3D Printer: XYZPrinting Davinci 1.0

CNC: Shapeoko 2 from Inventables

 

Shapeoko 2
Shapeoko 2
001
The prototype
Getting Started
Getting Started
Looking good... crossing my fingers at this point..
Looking good… crossing my fingers at this point..
Gotta keep it clean
Gotta keep it clean
It looks good, but is it the right size?
It looks good, but is it the right size?
Is After Hours an electronics company or toy business?
Is After Hours an electronics company or toy business?
Sweet Success!! Definitely better then a Dremel.
Sweet Success!! Definitely better then a Dremel.