# ESP32 being released in September



## Shdwdrgn (Dec 23, 2014)

I purchased an ESP8266-12E earlier this year to completely replace my large mess of an arduino plus separate ESP8266 for my HO locos, although because of Summer projects I haven't even had a chance to power it up yet. I had seen rumblings about the new ESP32, but since it hadn't been available I have not even looked at the specs before now. And boy, what specs it's got!

Starting with the pinout, the new board has 38 I/O pins, vs 22 on the 12e board. Of course you would think this would make the board a lot larger, but instead they kept it small and dropped the pin spacing down to 0.05" (1.27mm). The entire board is only 18x25.5mm...

This tiny beast is sporting a dual-core 160Mhz cpu, 512k of ram, and up to 16MB of flash memory. Every pin is now capable of PWM output, about half the pins can now to ADC at 12 bits, and they added a couple of DAC outputs. It also has SPI, I2C and I2S interfaces, and touch sensors. And in addition to the standard WiFi radio this series has always had, they have now added a bluetooth 4.2 radio. And I see they have also added a temperature sensor, an ethernet interface, and a CAN interface. As with previous models, this board also requires a 3.3v power source and likely needs at least 500mA of current.

There is no price set on the new unit yet, only that it will be "just a little more" than the esp8266 models. Considering I got my 12e for only $5, that likely puts this new model in a very nice price range.

All right, so how can you apply this massive bundle of power to model railroads? One of the limitations I ran into with the 12e was that it only had four PWM lines. I need two of those to drive the main loco motor forward and backward (although I might have been able to get that down to one line with more effort). I wanted to reserve another line for sound output, which meant the last line might be used to dim all of the loco's lights together. With the new esp32, I would be able to individually control the brightness of each light.

The touch sensors present an interesting feature. What if by simply touching a metal plate on the cab, you could signal a loco to stop? Touch it again and the loco resumes it's route? No need to have a controller handy, this would always be available.

I plan on adding a socket for a micro-SD card to the computer. On the 12e, this makes the package only 7mm thick, and provides for a huge amount of information storage, but it also greatly limited the available I/O pins. With the esp32, there's now plenty of extra pins, so I can add lots of individually-controlled lights, control the output of a smoker, or whatever else I might think of.

And what about that new bluetooth? A lot of people don't want to use bluetooth to control their trains because of the limited range, so wifi has been a more attractive offering. However what if you are stringing up multiple locos for a heavy load and want to gang them all together? Tie your controller to the front loco, and use bluetooth to let the rest of the locos sync their speed to the leader. What about using it as a distance indicator by monitoring signal strength? Have your crossing signals automatically run when the loco is nearby? Perhaps some kind of anti-collision control? Signal a loading dock to start stacking crate when the train is still a minute away? Multiple radios just means more options.

And finally, that shiny new DAC output (there's actually two!)... perfect for creating high-quality sound output (MUCH better than using PWM), and if you want even more realism, you could have a separate speaker on each side of the loco. Imagine hearing the chuff of a steamer in stereo.

So yeah, I'm really excited now about this board being released, just in time that I might be able to get one before the snow hits and see what all I can do with it over the Winter.


----------

