Powerful Esp32 Board For Development
Products from EspressIf are ideal for low-cost WiFi and Bluetooth enabled robots or IoT devices. The Esp32 is a small postage stamp sized module with WiFi and Bluetooth as well as serial interfaces combined with a host of other popular hardware interfacing busses.
Besides an onboard 3D Accelerometer/Gyro chip, LSM6DS3, we squeezed in a Bme280 environmental sensor onto Rev 3 shown!
A TMP36 sensor can be used with it's own pins if you need isolation for better temperatures.
It has 3 standard servo jacks with servo power to the upper right. There are 2 counter units ideal to use as two QEI encoder ports!
A serial port for programming and an I2C port as well as SPI port and a Io or JTAG debugger port make this a powerful unit.
4 LEDs and a on-board accelerometer/Gyro unit using the LSM6DS3 are handy too.
Eclipse Dev & several threads on FreeRTOS.
An analog jack with ADCs and dual DACs.
GDB debug using openOCD works now where a J-Link debugger plugs into the JTAG jack.
The PC board has plenty of silkscreen to show where parts go as well as document pins
Although the jacks are labeled and planned for some very common IO the pins are mostly GPIO pins so can be used as needed for whatever needs are required.
An onboard 3.3V power supply may be powered from the micro USB jack or a 2-pin power jack.
The 0.1" spacing pins are on an overall 0.1" grid to allow for partial loading and proto-board experimentation as well.
Built In WiFi and Bluetooth Radios Onboard
The Rev 4 Mark-Toys Esp-32 based Dev board has a pin compatible I2C connector that allows directly soldering in an optional 1.3" 128x64 pixel OLED display off of the I2C bus is shown here. Also shown is a temperature sensor that uses the onboard ADC to read temperature.
We now have software to drive several other different sized displays including the tiny 0.96" 128x64 and low power unit with a cost on EBay typically of under $3.
For color and larger display needs see the
Robotic Subsystems page
on this site where a rather nice TFT Color display has been used and driven from the Mark-Toys Esp32 Dev board.
Built In Connector for Small OLED Display
The Esp32 has both WiFi as well as Bluetooth units onboard which make the Esp32 ideal for a great many applications requiring external wireless connectivity.
The board can come up as a WiFi access point (AP mode) for example to allow a connection by a phone to then configure the unit and then have the board become a member of the users wifi network.
The ESP SDK also has support to be able to add a Bluetooth GATT server using BLE (Bluetooth low energy) as a server or a client. A great many devices these days such as the FitBit or many other devices operate as a BLE server and phones such as Android or iPhones can have apps made to control the device. Mark-Toys has a few such Android Apps for internal use to control our robots or configs other devices we use this Esp32 dev board for at this time.
Development On The Esp32 Board
Here is the Mark-Toys powerful Esp-32 based IoT friendly board. This board sports WiFi hotspot or client as well as Bluetooth LE and runs today a BLE GATT server that I talk to with my Android Apps for a few of my projects based on this board.
Development can even be done using the Arduino IDE and the 'ESP32 Dev Board' personality!
Developing code on the Mark-Toys Esp32 Dev Board can be done with least effort by use of the Arduino IDE 1.6.12 or using full featured FreeRTOS if you setup a typical dev environment. The Arduino IDE approach uses an Esp32 board support package.
For Reference you can get the Esp32-WROOM32 Module
Data Sheet is HERE
Pinout Of Most Key Signals Eases Prototype usage:
This Esp32 Dev board can be used plugged into the typical prototype boards for many of the features. Care has been taken so that the top most likely pins required are almost all in two long rows of pins that are 1.1" apart. All connectors on this board are on an overall 0.1" grid of pin spacing so that this board can also be connected to prototype boards with ease.
Serial Download To The Board:
To download to this board you need to plug in power to the board using a micro-usb line and then hook a USB to serial adapter such as the CP210x style adapters using Tx, Rx and Ground. WARNING: YOU MUST USE AN ADAPTER THAT ONLY PRESENTS 3.3V SIGNALS TO THIS BOARD OR YOU CAN DESTROY THE Rx INPUT ON THE ESP-32. Besides Rx and Tx, the RTS line on your adapter ties to the 'EN' line and the DTR line ties to the 'BT' both on a 2-pin jack right next to the serial jack on P1. All are clearly labeled.
Using The Arduino IDE:
I am using the 'ESP32 Dev Board' personality and use settings of 80mhz flash frequency and an upload frequency of 23040 . Choose File->Examples->01.Basic->Blink and then modify led to be 2 because our status led is on GPIO2. This will be a good test the download and run the simple blink example on this Esp32 dev board 'status' led. I have used several Arduino drivers with good luck including basic GPIO input and output and Servo outputs to this board's servos for pin 21 on PWM_0 and pin 19 for PWM_1 both on jack P7.
Connector Pinouts For The Esp32 Board
Great effort has gone into clear silkscreen labels for the many connectors on the board. This section ties it together so the actual GPIO lines used for each pin are known so that code can be done to use the pins in whatever way is required. The jacks try to give names that are likely but because the pins of the Esp32 are highly programmable you may use pins as needed.
Most jacks have pin one on same side and almost always pin one is ground, labeled 'G'.
P1 - Serial Interface and Programming
1 - Gnd (digital ground)
2 - Serial receive input. 3.3V input. DO NOT APPLY 5V SERIAL HERE!! This is RXDO
3 - Serial transmit output. This is TXD0 line
4 - Vdd which is 3.3 Volts
P13 - Programming and Reset (Right next to P1 pin 3 this is a 2-pin jack)
1 - The CHIP_EN or just EN input. Normally a 3.3V digital RTS line for serial
2 - Active low Reset input. Normally a 3.3V digital DTR line goes to this to program
P2 - The 3.3V I2C Interface
SCL and SDA both have 4.7k pullps. Pinout supports different types of OLED displays.
Note that trace cuts and bridging R13 and R14 allow for Vdd/Ground reversal
1 - Gnd/Vdd Default is ground. Cut the 'x' by this pin and solder-bridge R14 for Vdd
2 - Vdd/Gnd Default is Vdd (3.3V). Cut the 'x' by this pin and solder-bridge R13 for Gnd
3 - I2C SCL (clock) line. This is a 3.3 Volt I2C interface. This is GPIO22
4 - I2C SDA (clock) line. This is a 3.3 Volt I2C interface. This is GPIO 23
P3 - Mostly Analog I/O Connector
1 - Ground
2 - ADC0 analog input. This is the SENSOR_VP input. Also goes to P9 pin 4
3 - ADC3 analog input. This is the SENSOR_VN input.
4 - ADC4 analog input. This is also GPIO32
5 - ADC5 analog input. This is also GPIO33
6 - DAC1 analog output. This is also GPIO25
7 - DAC2 analog output. This is also GPIO26
8 - Vdd (3.3Volts)
P4 - Main Power Input (pre-regulator)
1 - Ground
2 - Vcc. DC input. Keep this 6V max unless you know you have the non low drop out U1
P6 - The JTAG or Aux Input Jack (USE WITH CARE AS SOME SPECIAL PINS HERE)
1 - Ground
2 - MTMS This is GPIO14. I use this as input only
3 - MTDI This is GPIO12. I use this as input only
4 - MTCK This is TPIO13. This is also the WiFi LED drive line.
5 - MTDO This is GPIO15. This is also the PWM_2 line to P7 pin 3
6 - Vdd (3.3 volts)
P8 - Servo Power (To use 3.3 of the board you must solder-bridge R10)
1 - Ground. Use a thick ground to your main power if servos are big
2 - Servo Power. Allows powering servos for typically higher voltages than 3.3V
Note that your servos must operate with 3.3V control signals (Above TTL generally ok)
P9 - The PWM primary output pin
1 - PWM_0 pulse width modulated output. This is GPIO21
2 - PWM_1 pulse width modulated output. This is GPIO19
3 - PWM_2 pulse width modulated output. This is GPIO15 and also JTAG MTD0
4 - ADC 0 input and has pads near it for use of TMP36 temp sensor loaded from top
P10 - The QEI Encoder 0 input. An Up-Down hardware counter for wheel encoders
1 - Ground
2 - Vdd (3.3 volts)
3 - Quadrature encoder 0 input B. This is also GPIO34
4 - Quadrature encoder 0 input A. This is also LED4. This is GPIO4
P11- The QEI Encoder 1 input. An Up-Down hardware counter for wheel encoders
1 - Ground
2 - Vdd (3.3 volts)
3 - Quadrature encoder 1 input B. This is also GPIO35
4 - Quadrature encoder 1 input A. This is also LED5. This is GPIO27
P12 - The SPI Bus or Other IO if required
1 - Ground
2 - SPI CSO. Also GPIO18. I have used this for second serial port Receive
3 - SPI CLK. Also GPIO5. I have used this for second serial port Transmit
4 - SPI MOSI. Also GPIO17.
5 - SPI MISO. Also GPIO16.
6 - GPIO2 line which is also normally the LED for status blinking
Advanced FreeRTOS Development With Debugger
To develop more complex applications I use the esp32 SDK setup on my windows PC which can also be setup on a linux pc or a MAC. Refer to the
pages which are frankly very complete but is best done by persons used to cross compilers and command line interfaces.
As of mid 2018 I have not yet tried the newer Esp32 SDK version 3.0 but hope to use that soon.
As of this writting I am using the Esp32 sdk that I got in mid 2017. The readme shows not rev so I am not sure which one it is. I set it up on windows 7 system using the doc link in prior paragraph where it runs command line using 'mingw32' environment. The docs above explain how to set that all up.
I develop with Eclipse IDE on top of the mingw32 toolchain. To setup Eclipse is a complex issue that I cannot recommend except to those who have setup Eclipse embedded dev.
Many of my applications use FreeRTOS that is fully supported by the esp-idf environment. FreeRTOS allows a multi-threaded environment with semaphores and other embedded OS features that really make this Esp32 environment ROCK (IMHO). The FreeRTOS system is feature rich so refer to the
FreeRTOS Manual HERE
Quite a few C drivers for popular sensors are on my github in
You can develop fully command line based using the esp-idf environment (the SDK) OR if you wish to take advantage of the full IDE type of setup you may do as I have and setup the command line tools with Eclipse on top. The use of Eclipse, although a bit involved to configure, allows many nice editing dev features as well as a nice interface to the JTAG debugging available through use of J-LInk debugger and the JTAG port on this dev board.
Some Tricky Things (also explained in Esp32 docs but important stuff)
Once you have a sample project that you can use 'make' you tend to hook up the serial port Tx, Rx, DSR and RTS to the board and use 'make flash' to make and push code to the board.
BUT you are well advised to know of the 'make menuconfig' tool. This tool is a frontend to properly set loads of make variables in the 'sdkconfig' file a KEY file to know about.
The sdkconfig file holds the com port (windows) or dev (linux) that will be used for download. A host of other config parameters are in sdkconfig so it's best to at least use 'make menuconfig' and browse the menus to see the sorts of things to be configured. Sometimes support for some types of IO devices or modules you may use like Amazon AWS and other things have their setup parameters exposed through the 'make menuconfig' tool and then those parameters end up in the sdkconfig file. So do NOT ignore that file or special make that forms the file!
Mark-World - Tech Projects To Amuse The Curious
Esp32 Dev Board