That's about it, make sure the zener is in the right place and right way round. Will you be trying the sketch later?
All, Here's my cheap and simple set up for testing projects with the ESP8266. I bought a few of these as they are relatively cheap and available locally. I.E. don't have to wait for a 3 week slow boat from China. The 2 part module is known as the "Witty Cloud" development board. It's not breadboard friendly but is on a 0.1" pin pitch and down the page you can see how I got around that. Here's the assembled 2 part module. It has 3 push buttons on board and 2 micro usb connections. One is for programming via the built in serial interface on the lower board. There's built in voltage regulation too so we can power up from 5v usb. . My Breadboard rig is as simple as can be. I get to the pin-outs by bending the jumpers and plugging in to the area under the board. I have a preset pot on there, but a 220 ohm resistor will do. You can just make out the zener diode that drops to the ground rail. That is all you need for additional hardware, this is a very low cost no solder solution. Once you got programming done. Separate the two boards and plug in to your breadboard. Power up again from the boards independent micro usb, a phone charger is good. Again the top board has built in voltage regulation. You're good to go. These things were on promotion as they were new to market in January. Mine cost less than US $8.00 each including shipping from a UK supplier. Price is for the whole 2 part module. Other features are an on-board RGB LED and an Ldr. If your not keen on my breadboard idea, then customise by sawing down the centre groove and stick the two halves wider apart on a piece of hardboard. Or get 2 breadboards, detach the power rails on one edge and stick down, spaced wide enough apart accordingly. Steve.
I found this and thought it could be useful for anyone playing with the esp8266. https://leanpub.com/ESP8266_ESP32
Here is something also of interest since we are talking about Wifi stuff: http://www.arduino.cc/en/Main/ArduinoMKR1000
just a note on the UNO it is available with a higher power regulator 7805 in TO-220 form factor goot for 2 to 2.5 amps with a heatsink. here's one found on ebay, there should also be some Megas with the same regulator. http://www.ebay.ca/itm/121835091377 Steph
Dave I am having the darnedest time getting an ESP8266 to load UK Steves sketch using either the Arduino IDE or NodeMCU-Flasher ( I think it might be a current issue with my breadboard power supply, yet its specs comply) or just the unstable and unreliable nature of the ESP8266 ...I have tried on 6 different ESP 8266 units. I am awaiting some Motor shields before giving up as I think I may have successfully loaded one of them (got the LED to flash during upload and no errors). In the meantime, have any of you experts written a controller sketch using an Arduino Ethernet shield to run a DCC++ base station using Engine Driver or other existing controller software? Thanks Steve F
Steve - When I program the ESP8266 using the IDE I have two buttons on the board - one for reset and one for program - I hold both buttons until it says UPLOADING - then I release the reset button and continue to hold the program button until dots start displaying showing that it is programming at which time I release the program button and let it finish up. see notes here: http://trainelectronics.com/WiFi-esp8266/Setup/ Hope that helps dave
Dave Traced it down to a loose solder connection on my breadboard ESP8266 adapter (which is why the one ESP worked out) ..... I now have 6 ESP826 units loaded and waiting for my motor shields to arrive. You always seem to help .... even by inspiration and osmosis. Thanks again Steve F
Good to hear, Steve - once all of the bugs & other gremlins are removed all you have left is success! dave
Hi Steve, Pleased you got sorted with your ESP's, are you building a batch of units or something? On the Ethernet question, it's been done quite some time ago with various software. I guess it all depends what you would like from your set up. In the case of my mobile controller, I wanted a quick, any device (that runs a web browser) plug in throttle app that sets up in a minute or two and can be used by anyone. And importantly did not need a desktop or laptop computer to get a few trains moving. The beauty of the ESP8266 is that we can now do that as a very low cost addition to the system. Just recently, I've been tidying up the code and think we can call the result v1.0. I'll be revisiting the ESP webserver concept (controller page served from the ESP) shortly too. So where next, well I think I'm going to take a cue from Gregg's DCC++ Controller app and do an Html version. Briefly that will be something like a 10 channel (read trains) Throttle app, With session backup and other neat things, I've got lots of ideas, just need the coding skills. But it's doable for sure. If you need a few pointers on different software and connection configurations just shout. Oh and I did once connect Gregg's app via WiFi using just an ESP, without a router in the system. Steve.
Dave/Steve K If only that were true! ...... I have my stack (Uno/Motor Shield/ ESP Shield) assembled.. everything powers up with an external 5V power supply . Using an IP scanner I show the ESP at 10.0.0.7 ...... my router indicates that the ESP device at 10.0.0.7 is online (the ESP does not show up in "Network") .... (I have both my SSID and WEP pswd within the quotes in the DCCpp Websockets sketch, before up loading to the ESP) Using Chrome ws://10.0.0.7:81 reports that the website is not available. (FireFox just erases the ws: address and goes nowhere) ..... I am open to all suggestions on how to proceed. Thank you Steve F
Hi Steve, As I read things then, your ESP is connecting to your home network and is assigned 10.0.0.7 by your router. That's good, as the sketch is working as it should. It won't show up in 'Network' as it's not shouting it's ID as a computing device like a phone or TV or what ever. Now when you say using Chrome, for sure you have the correct format for the connection. But first you need an instance of the controller page open in a window here http://trainelectronics.com/WiFi-esp8266/Setup2/indexDCC++/indexDCC.html then alter the address in the top white box and hit the Connect button. The built in serial monitor will confirm things from there. Have fun. Steve.
Steve Realized that this AM and went to the controller page .... hit connect ... get response "Welcome Server ready" ..... power on ... enter cab # ... advance throttle ..... NO response from loco. So it looks like your sketch etc etc is working as it should but I am not getting power to the track. I have tried with another Uno..and another Motor Shield .. still nothing. I know it's not your area at this point, but if you could offer some suggestions from here I would be most appreciative. Steve F
Steve, Can you confirm that the Base Station (Arduino) is sending back replies to Mobile Controller serial display, i.e. you get something like <T1 35 1> when you move a throttle for example. If that's OK then we can confirm all connections are good from Browser>Esp8266>Arduino. Next is your Motor shield, are the 4 LED's lit on the output connections when you switch the power on in Mobile Controller? If that is all good, the next is track connection and the loco it's self. Just to clarify, responses from Base Station will be in angle braces <p1> etc. Other messages are from the ESP. You can get a status report from Base Station by using the <s> button. Steve.
Steve I get T1 and T2 when adding cab numbers but nothing else when I move a throttle. No, the motor shield LEDs do not light ... so no power is getting to the motor shield. I get Fn, new cab # and emergency stop responses but nothing in response to throttle changes Steve F
OK that narrows it down a bit. The orange coloured messages are the 'serial monitor' they will continually scroll by as you use the Controller. My best guess is that the serial connections from ESP8266 to Arduino are not configured correctly. Arduino TX RX labelling can be confusing check Pin0 is arduino RX. Pin1 is TX Steve.