ESP32 Command Station

Atani Dec 10, 2017

  1. Lormedy

    Lormedy TrainBoard Member

    17
    1
    4
    Hi Mike,
    I like your PCB and all your sketches around the ESP32. You have the good solutions except for the PSU. I use a mini switching PSU that replaces a 780x pin for pin but with a better yield and its input range from 7VDC to 25VDC. The price is lower than one buck! Look at there: https://www.aliexpress.com/item/329...75#373_4452#3098#9599#814_4452#3564#16062#848
    The enable pin should be connected to the input pin and if you flatten it on your PCB, it will be easier to connect the USB plug.
    Forget the 2576 that is more expensive, so you will save some space on your PCB. It also means less issues for you.
    Regards,
    Lormedy
     
  2. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    Thanks, they are all pretty much a WIP with room for improvement in many areas but they are generally stable now.

    This looks like a great solution it has one critical problem, delivery time from AliExpress is at least two months for most orders. On the IO board I am using this instead and it arrives within three or four days from order placement, which considering there are a few components for the CS PCB as well that come from Mouser it seems like a great option to use here as well.

    I currently have a supply of them but I agree in general. It is great for throughhole components but not so great in the current iteration since almost everything else has moved to SMD.

    So far I have found two issues which require rework on the LM393 ICs (just above the ESP32 board) with the LM393 on the right side needing to be removed from the PCB so I can trace down what appears to be a short underneath it (most likely stray solder paste).

    Also as noted above, I'll be reviewing the LM2675 and inductor usage in the bottom left corner and see what I can do to replace both of these as these are some of the few through-hole components left (outside of the LMD18200 and PTC fuses for the same)
     
  3. Lormedy

    Lormedy TrainBoard Member

    17
    1
    4
    Yes, you need to order earlier before you need parts from AliExpress but prices are so cheap. Time is money and reverse. Order them now.
    I buy them by bunch of 10 and I use them as distributed PSU along my layout. So locally I provide a good +5VDC out of a bad +12VDC.

    Throughhole components are very usefull in some special cases. You do not need to add many vias because SMD+vias can become a nigthmare with power supplies and connectors. For all other needs SMD components, but not too small, are a good solution as long as you can replace them at home. This small switching PSU has a lot of advantages: SMD but with pins easy to unsolder, cheap to replace and efficient, short protected...
    To avoid shortage of parts you can put 2 components per function on your PCB, the best one and the back-up. Delivery time will decide what component will be used. This switching PSU only needs 3 more holes, easy!

    Solder shorts happen time to time, it is a bad luck. DIP socket is not recommended with PSU IC because it adds unwanted inductance. Do not forget to add a heat sink to the LMD18200. To reduce the PCB size you can put some components underneath the ESP32. I also recommend to add a 4-pin green connector for I2C bus SCL/SDA/VCC/GND because plenty of small devices can be used ranging from the LCD to the 16-servo interface. You know what I mean. I see a good free location at the bottom of the PCB. I display IP address and RSSI on my LCD, it helps when things go wrong.

    By the way, you are on good tracks.
     
  4. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    The CS has two I2C headers and there are currently only two types of devices supported: OLED and LCD. I don't plan on adding more at this time to the CS. I'm considering adding an I2C header onto the IO board specifically to support the PWM module.

    Yup, already planned on adding one. It's more of a matter of selecting the optimal one at this point since the components are spaced such that almost any will fit. The only concern is having mounting holes on the PCB for it since there are traces on the underside to the left of the LMD18200.

    I had considered this on the CS PCB but not the IO board. I may move a few things inside the footprint of the ESP32 on the CS PCB but I don't currently have plans on moving any components to the backside of the PCB.

    Cheap doesn't always make for the best quality. I've found many listings on AliExpress over the years that were sub-par components even when listed as genuine (even received a few!). Also my last shipments from AliExpress were ordered in May and arrived during July (various days with the last one being the last week of July). I had considered ordering a few things on AliExpress but with the delays and shipping cost to get them sooner it was cheaper to order on Mouser, not to mention some components are not on AliExpress in any substantial quantity.

    Very true. On the CS PCB I mostly use the through-hole components to act as the via but there are a few cases where vias are used.

    Yeah, it's especially frustrating with the 0.5mm pitch components or QFN packages.

    Thanks, these were all manually routed and then reviewed and rerouted a few times before ordering. I'll very likely adjust a few more of the traces once I have the current boards tested fully.
     
  5. Lormedy

    Lormedy TrainBoard Member

    17
    1
    4
    Sorry but I did not see your header in the shadow of the ESP32. I believed it was for an E2PROM SO8 socket.

    As I do not have your schematic, I watch the picture of your assemby. Then I notice around the LMD18200 some wide traces that suppose big current flow. But you end these traces with a single via. Do not rely on a via to transport several Amp, it may become a fuse after many short circuit. Single vias are good enough for signal but not for power. Use a bridge made with a piece of wire with 1mm holes (a tail of chemical capacitor) and solder both side of the PCB. Use the same technic for a single through hole. It will be safer for your PCB lifetime.
     
  6. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    Yeah, the lighting was not that great unfortunately and I also did not have the pin headers mounted in the holes yet since the board is still being tested.

    You can review the schematic here, it is not linked to the main site yet due to the PCB not being generally available. The BOM is also available though there is a correction to be published for U3 and U4 where the VDD and GND pins were reversed (4 and 8 IIRC swapped).

    I had not thought of the case of a shot and the vias. I see a couple vias that can be removed with a bit of rework of the traces for the OPS A/B traces from the PTCs to the screw terminals. I can also see one via in the 12v LDO (u8) supply that might be possible to drop with rerouting of the OPS A/B traces.

    Thanks for the suggestion on this, if I can not find a clean way to route the traces while avoiding the vias this may be one option.
     
  7. yousmellthatpal

    yousmellthatpal New Member

    3
    0
    3
    Hi Mike,
    I was able to get the release version to build and upload to a WEMOS LILO32 with OLED and works fine.
    I am now trying to build the 1.5.0Alpha3 and get this error:

    "message": "no matching function for call to 'openmrn_arduino::Esp32WiFiManager::Esp32WiFiManager(const char*, const char*, openlcb::SimpleStackBase*&, openmrn_arduino::WiFiConfiguration, const char [9], wifi_mode_t&, std::unique_ptr<tcpip_adapter_ip_info_t>::pointer, ip_addr_t&, int)'",
    "startLineNumber": 200,
    "startColumn": 53,
    "endLineNumber": 200,
    "endColumn": 53

    this is using VSCode on Ubuntu.
    Any idea on what i'm doing wrong?

    Thanks,
    Ron
     
  8. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    Are you using esp-idf v4.0?

    Sent from my ONEPLUS A5010 using Tapatalk
     
  9. yousmellthatpal

    yousmellthatpal New Member

    3
    0
    3
    Thanks for the quick reply!

    4.1
     
  10. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    I haven't tested with 4.1 yet as it was just released. I've done most of my testing on 4.0 and 4.2/master. I'd suggest downgrade to 4.0 for now while I fix up the compilation issues for 4.1.

    Sent from my ONEPLUS A5010 using Tapatalk
     
  11. yousmellthatpal

    yousmellthatpal New Member

    3
    0
    3
    I'll give it a try.

    Thanks
     
  12. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    @yousmellthatpal IDF v4.1 is now working on ESP32CommandStation master code. There may be a few bugs with it still though. I'm going to keep testing with it further before recommending it as a default.
     
  13. Gregory Gee

    Gregory Gee TrainBoard Member

    10
    2
    5
    I chose releas/4.0. The installer downloaded 4.0.1. Is that an issue?
     
  14. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    That will be fine. If you encounter issues please let me know.
     
  15. Gregory Gee

    Gregory Gee TrainBoard Member

    10
    2
    5
    Nuts. it is complaining about missing gzip.

    CMake Error at CMakeLists.txt:59 (message):
    Unable to find 'gzip' program

    During install it asked for location of python and git, but didn't ask about other tools.
     
  16. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    That would be the IDF component installer. GZip is not required by IDF.. I should have it called out in the how to build page...

    If you are on windows you can use: http://gnuwin32.sourceforge.net/downlinks/gzip-bin-zip.php. You will want to extract it to "C:\bin" or similar as that is the path the CMakeFiles.txt will look for it in, adjust the path to whichever drive the CS code resides on.
     
  17. Gregory Gee

    Gregory Gee TrainBoard Member

    10
    2
    5
    That worked. I waiting 3 months for my esp32 to arrive. Got lost somehow. So I have to catch up on what's happened here. Are the defaults in the menuconfig fine? Also, I haven't used idf/esp before.

    idf.py menuconfig
    idf.py build
    idf.py -p COM6 flash ??

    What's after that? Your webite stops at the menuconfig step, unless I missed a page.
     
  18. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    If you are using the "Uno" form factor ESP32 with an Arduino Motor Shield (includes most clones) then yes the defaults should work fine. You will likely need a pair of jumpers if you use the defaults as the "Uno" esp32 board puts two pins under A0/A1 which are not very usable. The jumpers you might need are A0 -> A4 and A1 -> A5.

    Sorry looks like the page is poorly formatted and doesn't provide the full set of commands. Here are the commands you will want to start with:
    1. idf.py menuconfig
    2. idf.py build
    3. idf.py flash monitor -p {port}
    Once the CS is up and running it should print out an "uptime" string every ~45sec to the serial monitor. It should also print out a few other useful details such as the IP address of the CS once it connects to your WiFi network or it starts the SoftAP.

    Once things are working in the test env you can move it to the layout and test it there.
     
  19. Gregory Gee

    Gregory Gee TrainBoard Member

    10
    2
    5
    Are the posts I see online true that I need a capacitor to flash the board? My board has a reset button but I don't see a boot button. It's a UNO style board (espduino).
     
    Last edited: Sep 21, 2020
  20. Atani

    Atani TrainBoard Member

    1,460
    1,697
    36
    You should only need a USB cable.
     

Share This Page