I’m with you on that Max. It’s always very difficult to follow someone else’s code and my background is in hardware so my code tends to be thrown together in a way that works for me.
Leichen is right that using an external transceiver is simpler, but I enjoyed the challenge of getting this working with the minimum of external components. Since the hall emulator only needs to transmit we don’t actually need a transceiver but it would be a better solution if reception is added for decoding other messages. I got around this by attaching the UART receiver to just the D+ signal, which works fine, but an external transceiver would offer better noise protection.
Same here, I really appreciate you sharing your experience and explaining every details.
Actually, if I didn’t see your post I would probably not even try converting the z6 mower.
It’s been a huge inspiration and help. Thank you and keep up the good work
The battery percent remaining and voltage are accurate but I’m not too sure about the current. I suspect the value in the Ego messages may be percentage load, rather than Amps, but it’s a useful representation of the battery load. I also send the ESP32 internal temperature in the battery temperature field.
This feature requires reliable decoding of the Ego messages so I switched to using an RS485 transceiver, as suggested by leichen. All this, together with some very large mission files, was starting to stretch the limits of the original flight controller so I upgraded to a Pixhawk 6C.
Finally I had to switch from using a basic ESP32 to the C3 version. This was because the basic ESP32 doesn’t support I2C clock stretching, which is required for smart battery emulation.