Finally received the PCB for the Train Control System and the Utility Driver. I decided to solder the Utility driver because that has the CG340G USB connection. Soldered the PSU & CG340 was straight up. I am actually impressed by CH340G as it always work and connect to Windows. Soldering ESP32 was straight forward, but first attempt to get it working failed.
A quick look at schematics and swapping RX/TX did however do the job. A trick is to use Boot first time you load from Arduino IDE and it also help having a working reference like a breakout board.
Finally the Wifi scan works from my utility driver. I will solder up the rest of the circuit and start programming servo’s tomorrow. My first usage of this will be on my 12 legged robot.
These two last pictures show the Train Control System. We can play with that later. Actually I need to get my act together and buy a test track. As said my ambitions are limited to a track around the x-mas tree – ok maybe 2,3,4 or 5 tracks 🙂
The LMR14206 ripple was a bit much for my taste. It worked, I had 12V out, 3V3 out and the MCU ticked. But, it’s not a design I can live with. For now I continue on a different board and avoid mounting the DC/DC because I also realized that I could not really bypass it they way I had set up the jumpers. I decided for a 78M05 in TO252 format that gives 0,5A. But, for now I will use 12V directly.
This will work for now. I will return to DC/DC later, but looking at other peoples postings and the lack of LMR14206 popularity I get the picture.
The supercap in the schematics works well, but I probably need to add a bit of circuitry like I did on on PLC Com module. I use a 0.33F due to the size.
LMR14206 with 12V output to a LM1117 3.3V regulator. This is the 3.3V – 350mV ripple – not good. I need to work on that a bit. This is from my Motor Controller with MCU ticking.
I probably need to add another coil on the 3.3V, but that add a lot of space, so I am starting to think that a 7812/317 regulator is a better shoice. Will see how much is needed to fix this.
Regardless a bit impressed over my DS1054 Rigol Oscilloscope. I have an expensive Techtronics at work and to be honest I would gladly replace it with my Rigol costing only 10% of the price for a Techtronics.
This is my LMR14206 DC/DC regulator with R1=15K and R2=1K which gives 12.2V out. The white wire is the PCB error I wrote about earlier.
This is basically only the reference diagram – just be aware that the datasheet and demo schemtics mess up R1/R2 a little. Myself I use E values, so by setting R2=1K I can adjust voltage out by changing R2.
You need ca 2V drop, so the input for 12V out is 14-42V. I will get back with updated schematics and values for 3V3 matching E24 series later. I also want to have a look at the ripple that need some improvements.
I finally got around to assemble my 3V3 DC/DC converter and it did not work. Somehow I have switched off all checks in the EDA and managed to send it out like this – notice pin 6 is not connected …
Luckily this is the first time I stepped into a bug in the PCB. The project check usually pick everything up – if it is switched on…
I started to loose track of all designs so added a Project page. Counting 22 designs that I have made in 2 years. It is actually more, but some was rejected after design.
Not that many days since I ordered this, so was happy to see it. Caused me to work to 04:00 this morning and voila – Arduino IDE is running smooth. I am not sure I want to continue using Arduino IDE, but was nice to see that it works with ESP32 even if they still have things left.
To code a few lines and suddenly be on Wifi – cool! I also know that my 2 designs are in mail – exiting.
The power of Arduino is that you plug in the chip, start Arduino IDE, write a few lines and woops – it works. I will give many arguments for not using Arduino on more complex systems, but it is great for prototyping.
As for the Model Train Controller and Model Train Utility Driver I will support Arduino on them. My own model train plans are limited to a track around next years x-mas tree, but I think it’s a huge number of hobbyists out there that would benefit from these designs and enjoy a bit of coding themselves.
I bought this robot arm a few years back for educational purposes. It’s great fun, but a bit limited in what it can do. The robot consist of 5 DC motors, but no sensors indicating position, so it is basically remote operated with no option for automation. I did create a RPI Hat dedicated for this one, but even that require a RPI that add to it’s size. ESP32 is so much neater as it replaces both RPI and the IO MCU.
This block diagram is based on the Train Utility Driver as I just remove the PWM signals and increase the number of H-Bridges to 5+ 1/2.
If you compare with the Train Utility Controller you will see that this have 6 H-Bridges on right side. It actually is 5 H-Bridges and 1 PWM signal. The illustration show right angle connectors, but this will mostly use straight connectors.
That said I want to wait a bit with this one until I get the others back and get a bit more experience with ESP32.
This picture show a single Gauge on a form to illustrate how HMI Designer & Browser works. In this case we have a rotating needle that needs to be associated with an input value. What we do is to save this form as an XML and include it in a device.
But, we also need to associate this needle with a variable on that device. This is no coding, only a few clicks -job done.
The next that happens is that we start HMI Browser on Windows, Linux, OSX, iOS, Android or whatever. It contact our device, upload the HMI XML and we have a working HMI with a gauge showing the value of the variable we selected.
No coding involved, just a few click & plays on the screen and job done. No more need for hours by hours from expensive C#, Java, C++, HTML5 developers- no more need for specialised HMI/GUI skills – just a few clicks & play.
And I have not even got to the best part yet…
Early mornig fun. Just changed the driver to use USB (CH340G) and added a separate 12V supply and some jumpers to select power Source. It can now be driven from 12V or 5V and you can use 12V for PWM’s while using USB 5V for ESP32 etc to have some isolation. Also added pull-up for Boot/Reset and jumper to use them.
A bit more labels and TVS diodes on the left 12 x IO and we’re done. I must admit that this little fellow will see some usage.
My 12 legged robot comes to mine as this is a very small, compact alternative for this one. But, I need some experience with using ESP32 before I continue.