LAN8710 vs Pro-EP10

Again I am not done routing, but I wanted to illustrate ca the space cost of adding an Ethernet Phy and why I was so interested in Pro-EP10. You can see Pro-EP10 footprint at left in green, while LAN8710 and RJ45 w/magnets build in is in blue at left. Using Pro-EP10 would be a huge space saving + the Linux means you can have things like Web servers on separate processors – which we also can since we have ESP32 for this purpose.

The drawbacks with Pro-EP10 is cost (ca 18.- USD), reduced bandwidth through a serial Interface and more complicated toolchain on an embedded Linux. The later is not really that limiting because the MCU’s we use will struggle with higher bandwidth, so it will work out. I already have a Pro-E10 and it will cost me a bit of time and ca 20.- USD to do a demo Hat, so lets see. I am actually considering adding Pro-EP10 to XPortHub.

That said HLK-7688 is much better beacause it offers Wifi and 5 Ethernet ports with a 150Mbps bandwidth switch build in – assuming I can use the SPI as I want and get control over the toolchain. The later is the main drawback with these Linux options. ESP32 on the other hand is well supported and have an excellent, easy to use Toolchain.

Wifi/Ethernet Hat

Not routed the Hat yet, but got all components on the PCB and it looks possible. Using an optional 2.4Ghz antenna on this one. It will take ca 1 week and I probably have the first draft routed. It tends to og fast once I start. What I usually do is to do a bit now and then and suddenly it’s done. I have mentioned this before that I find PCB Routing like a relaxing mind-game.

Wifi/Ethernet Hat Drafts

Getting on with my ESP32 based Wifi/Ethernet Hat. First draft of schematics below. This is the first time I try LAN8710 so all bets off. I am most worried about the 100Mhz signals here. The next picture show components before I place and route the PCB. This looks tight tbh.

LANEnable will switch power on/off enabling me to run with only Wifi or only Ethernet. The rest is IO for Ethernet RMII Interface. I have ordered some breadboards to Experiment With this before I see any point ordering it.

Ethernet Hat’s ESP32/HLK-7688A

I decided that I want to make 2 different Ethernet/Wifi modules With different purpose. With Raspberry PI it will be 3, but RPI and ESP32 overlap in functionality.

ESP32 with Ethernet/Wifi/Bluetooth is a very attractive “Connector” solution where I can add more connections by adding multiple Hat’s. I can sadly only add a single Raspberry PI since it only support Half Duplex Master on the SPI. 

HLK-7688A is attractive because it is a switch/router. I can probably do this with Raspberry PI as well, but with HLK-7688A it was straight forward to connect with the OpenWRT package. I am not so sure with interconnection to the backbone, but that is work to do. I have to admit that I am still a bit undecided on HLK-7688A because support and information is not that great, but we will see. And even if Raspberry PI can be used as a Switch/Router it still have to deal With the Ethernet/Wifi IO bandwidth. It maked perfectly sense to offload this to a HLK7688A based module.

The main attraction with HLK-7688A is the switch/router capability. If I connect using Ethernet or Wifi I will need that regardless and having it as part of a control module is very attractive.

HLK-7688A Suit Prolific driver not working

I recently purchased an small dev kit for HLK-7688A (above) and noticed that it has a Prolific USB-to-Serial port. Connecting it I get this message:

Windows detects the port, but the driver will not open it. I assume this is a fake chip issue again. I have had this issue with Prolific before – which is why I try to avoid devices with Prolific on. I will see how I can get around this.

I respect that fake chips are a problem, but it is not my problem! My respond on things like this is that I add Prolific to the list of companies I avoid. 

In this case I might need to grab the UART TTL signals and use a CH340 circuit so I can use the dev kit if I can’t get the Prolific junk driver to work. I will also ask the vendor to ditch Prolific and use CH340 to avoid the problem. In this case I might very well have picked up a copy as this is an open dev kit.

3KW Thunder Stick

This is my 3KW 3-Phase Motor Driver Rev 1.3. Revision 1.0 and 1.1 had air wiring, 3 current sensors and output at right. Rev 1.2 lacked RS485 while Revision 1.3 have CAN and RS485 + 2 temp sensors between MOSFET’s + I solder on cobber wires directly on PCB for 60V and GND to sustain 50-100A. The actual rating for the MOSFET is 160A per MOSFET, but my math indicate we can sustain 50A continuous due to PCB and Heat dissipation.

The VESC (Vedder design) uses more powerfully MOSFET’s, but is also limited to 50A continuous due to heat dissipation. My design allow for a heat-sink on the back. My math indicate that I reach ca 1W dissipation at 35A per MOSFET, so I should be able to sustain 35A continuous on single channel. But, using a 3-phase you have 3 channels and as the limit here is dissipation per MOSFET it should be 35A *3 /2 which is 52,5A before I need a heat-sink. Adding the heat-sink I hope to reach closer to 100A continuous, but you have to take these numbers with a pinch of salt + With 100A continuous (which means average) I might be touching the 160A pulse limit and start overheating PCB lanes – so 50A is the target for a reason – for now. I have seen smaller designs that claim 5KW etc, but they kind of “forget” to mention that you need a shitload of heatsink/fan Attached. My objective is to achieve this with close to no heat-sink due to total size.

I have 3 motors I can test + a 4th on it’s way. Comparing this to the 3KW Universal Driver I have the opposite challenge – I actually could need far more power (Ampere) though this stick to drive more powerfully 3-phase motors available at decent cost.

I have renamed this to 3KW Thunder Stick – size is 100mm x 25mm which is perfect as I get finished heat-sinks and it is more or less an extension to the wires, easy to hide on a drone.

This shows the back-side where the heat-sink will be added. The MOSFET’s and DRV8301 both have pad’s underneath, so the heat-sink will cool them down as well as cool down the PCB itself. All wires (60V, GND and U,V,W will be added on top. power capacitor will be soldered directly on power cables. If heat-sink is not needed I can move the cables to bottom – I can also Mount a Shorter heat-sink on top thought I currently lack mountings holes to support that – but we will see.

I have delayed ordering this PCB because my backlog is so large, but I will order it now so I can test fundamental concepts + mechanical fittings.

Hat Summary

Its been a few Hat’s since I started the latest series using SPI as backbone, so it’s time to consolidate on those I want to finish first. I have a list of close to 40 different Hat’s I want to make. Key to them all is that I use STM32F405 as a reusable component to cover 90%+ of source code – once I have infrastructure and AL on one I basically have it on them all leaving only specialized libraries and a few lines of Hat depending soft-wiring.

  • XPortHub have a lot of the handy interfaces + storage memory and SD Card. This is my current Development base as well.
  • 32 x Servo/IO is mostly needed for Servo control.
  • 8 x DC is small DC motors.
  • 7 x 5 Wire Stepper is very handy for those low cost, small steppers.
  • NB-IoT gives me a way to communicate using global Telecom on very long distance as long as I have GSM, 2G, 3G or 4G coverage.
  • LoRa gives me free up to 12Km range.
  • 12xPWM is very handy for various reasons including solenoids, dc motors, small 3-phase motors and Nema17 style stepper motors.
  • Sensor Hat gives me an interface to various analogue & digital sensors.
  • Wifi & Ethernet Hat is not a priority since it basically cover the same as Raspberry PI, but I like ESP32 to much to not include it on the list + a majority of infrastructure needed here is made.
  • My 60V PSU Hat was not intended as a Hat, but it is a nice option if I use motors and have only one PSU.
  • 3D sensor & GPS is the latest Hat that I have not started on yet. I have GPS on LoRa as well, but decided to add GPS on the planned 3D sensor. I will need multiple of these on the larger drones.

In addition to the list above I have a range of motor controllers of which only one is in Hat format.

  • 3KW Universal Motor Driver
  • 3KW 3-phase motor driver
  • I do in addition have a smaller universal motor driver that I consider upgrading. This only cover ca 15A and is smaller not requiring specialized wiring as the 3KW one. I am a bit undecided on several issues around the Universal Motor Driver as mentioned below.

The 3KW Universal Motor Driver is cool and it’s powerfully as it can be extended with other Hat’s, but I have to consider if this is worth it. I have a new motor incoming to make it possible to test this, but to be honest motors in this category is either extremely expensive or 3-phase – and 50A is not much on a 3-Phase as I easily could need 200A on larger 3-phase drone motors. I like the universal drivers to much not to finish them at some point, but I realize that I am better off focusing on the 3-phase driver for larger motors. It is not many steppes that I can’t drive With the PWM card and even the smaller 250W Universal Motor Driver was troublesome to test. This is a very successfully and fun Project so far, but truth been said I might not have much real usage for it for now.

And lets not forget Raspberry PI that also need software once I am completed with XPortHub that I use as base SW factory.

We are talking about several test projects, but both a boat and airplane is on the agenda. Myself I really want to build an airplane-drone with VTOL capacity – basically take of and land as a drone and fly like an airplane to cover more distance. The showstopper is cost right now. I need a minimum size and that means expensive motor and frame. The boat is far more realistic.

The main challenge with these drones are that they need to be AI driven. As they get further from base communication will be limited and they need a minimum of self-contained navigation intelligence as well as sufficient AI to find their way back home.

Mentioning radio range – Lora is 868Mhz line of sight up to 12Km with a 1W Sender. I actually want to build a radio with larger range using long- or medium- wave signals. An AI based drone can manage with very low bandwidth if it can operate in automated mode only receiving commands and sending data then needed. With a long-range radio on 100Khz you can in theory radio half around the planet on a few watts. The main trouble is size on equipment and licensing to use frequencies.

Wifi/Ethernet Hat

This early draft uses ESP32 and a HR911105A RJ45 connector. I want to attempt using LAN8720A as Phy. The Hat will contain SPI as backbone, CAN as secondary control, an USB, Wifi, Bluetooth and Ethernet.

The schematics look straight forward, but I have a lot of reading up to do.

ESP32 is as fast as many of the modules I have shown and it can be extended to use modules with more Flash and RAM.

Ethernet Hat Options

I am as mentioned before looking for alternatives to connect to Wifi/Ethernet that don’t include a SD Card or going outside the Hat format. I also have an interest in making Ethernet available from embedded systems in general. The main reason is however to be able to Connect multiple Ethernet/Wifi Connections.

The block diagram above illustrate the most obvious solution. I replace STM32F405RG with STM32407Vx that is LQFP100 and have the Ethernet port. I need to find an external Phy and RJ45 connector. The advantage of this is that we use the same SPI as backbone. The disadvantage is lack of Wifi.

The 2nd option is to use ESP32 which have all required IO’s. It has Ethernet, Wifi, USB, SPI, CAN and Bluetooth. In fact, if ESP32 was better documented and had more I/O pins it would challenge STM32F405 as core to my system. I already have a Wifi board for this, but have yet to connect CAN and SPI on this + I need to test Ethernet here.

The 3rd option that I recently became aware off was HLK-7688A which is a Linux module with 128Mb RAM and 32 Mb Flash. I am a bit unsure about digging into another Linux computer + I have questions about it’s SPI. The advantage here is that this offers switch functionality as well as a Wifi. Other than that it needs to be tested.

Option 3 can also be used as a separate Ethernet Switch on a Hat as illustrated above. I am not fully convinced I can fit this on a Hat, but it is an interesting option.

The 4th option is to use STM32F405 + Wiznet W5500. This is a hard-wired TCP/IP stack, it lack Wifi and security options. The drawing actually show STM32F407, but never mind.

The 5th option is to use Pro-E10 which is a Linux computer in a RJ45 socket. I will need a STM32F405 in additional and connect on a 460Kbps UART. It has no Wifi option.

ESP32 and HLK-7688A are both very good candidates. At present I still believe I want to stick to ESP32, but I am very curious about HLK-7688A. Both of these have an unknown then it comes to half-duplex high speed SPI. However, the reason why I am not moving on this is because I already have Raspberry PI at core. As for multiple connections I must admit that multiple ESP32 Hat’s will do the trick and they support both CAN, Ethernet, Bluetooth and Wifi + no Linux, meaning they load in a sec and have a very nice MCU architecture.

STM32H743 Maturity

I managed to get STM32H743 running blinking some leds, but not without pain. STCubeIDE is able to download code, but fail on debugging. All in All I basically conclude that H7 is not sufficiently mature yet! This is not about the MCU, but tool, toolchain, drivers and everything around it.