ESP8266 MQTT Client

Special solutions for outdoor model railroading.

Re: ESP8266 MQTT Client

Postby gramels » 22.01.2017, 07:57

Hi Dagnall,

I presented your solution at the Rocrail User meeting in Speyer with great feedback and increased interest. Keep up the good work. I will make an instruction page in the rocrail wiki soon.

Please find my slides at
viewtopic.php?f=82&t=12546&start=30#p135538

Thanks for the great work.

Lothar
openDCC - MultiMaus - (MERG RFID) - testing a planned garden layout in IIm -
gramels
 

Re: ESP8266 MQTT Client

Postby Dagnall » 15.02.2017, 14:09

I thought you might like to see my "Station" wiring using the NodeMCU.
I have connected cheap ebay modules together very simply using standard breadboard push connectors. There is a Dual Motor driver, an AC-DC 5V regulator and a NodeMCU.
These are all located on a 3d printed "plugboard". http://www.thingiverse.com/thing:2079062
I then added four long 3 way extensions, (2 servos and 2 sensors). these plug neatly on the 5V regulator, with additional short wires to connect to the relevant ESP8266 pins.
There are then two ESP outputs sent to the two motor drivers (one each, ..no reversing!..).
I use the PWM drivers to adjust some filament lights in the servo points.
The 5V regulator has been modified to send "raw" DC to the motor driver, but that (and a correction to the 5V regulator circuit (!)) was the only real soldering.

Perhaps we can persuade Peter Gilling to improve on this to make a PCB for it that is smaller and neater ? :wink:

IMG_1167.JPG
You do not have the required permissions to view the files attached to this post.
Dagnall
 

Updates to ESP8266 MQTT Client

Postby Dagnall » 10.10.2017, 13:12

I have updated my ESP8266 NodeMCU client.
It now reports that it has a Pi 02 and a Pi 03, rather than a random selection!. (although you can easily change it so it reports neither if you prefer!)
{FYI, the hardware supports 8 I/O that can each be programmed as digital IO (like a Pio2), or as Servo/PWM (like a Pi03).}

I have significantly improved the servo codes, as the previous versions were very slowed down by some debug serial messages.
I have also added a debug that works over MQQT, so you can easily see which nodes are on line and when they send messages. (useful for debugging).
I have added Over The Air software updating , This works with the Arduino interface and means that you do not have to kneel in the mud with a USB interface to update the nodes in the garden!.
I have also updated the Mobile part of the code and it works as a single channel controller for a Loco with front and rear lights and a servo controlled motor. (with 4 spare I/o for other things if you need them).
IMG_1691.jpg

My hardware now uses the "L293D Motor Shield Module", easily available from E-Bay and other places.
As well as providing some screw terminals and the L293 IC, this useful and inexpensive module takes all the NodeMCU ports out and provides them on a row of standard servo type 3 pin interfaces. --- Unfortunately it supplies the V+ to this row from the NodeMCU 3.3V regulated output, so it is not immediately useful for standard 5V servos, but a very simple cut of one track on the back of the board isolates the V+ on this row and allows you to connect these instead to "Vin". BY then adding a simple external 3 terminal 5V regulator between the +12V and "Vin" screw terminals, you can use the module with a single 12V power source, provide +5 regulated to the NodeMcu (and the servos/ sensors). The ModeMCU ports D1- D4 are connected to the inputs of the L293 and can be used for two motors or PWM (12V) outputs.

NodeMCU Mods.jpg

IMG_1682.jpg


Code is still at https://github.com/dagnall53/ESPWIFIROCNET
Cheers
Dagnall
You do not have the required permissions to view the files attached to this post.
Dagnall
 

Previous

Return to Garden Railroads