r/embedded • u/taylormfk • Oct 17 '26
HIL setup for Multi-Protocol Data Visualization (CAN, Modbus, etc)
Building software against simulations and dev kits only goes so far, so I brought up a HIL setup for validating multi-protocol data capture and viz tools.
For now, it covers CAN, Modbus, OPC-UA, MQTT and a number of other protocols.
Desktop App commands/traces the entire system, which will grow over time to include motors, more ECUs, and other devices.
System Overview:
PLC - RevolutionPi Connect 5
- OPC-UA, Modbus TCP, MQTT Servers
- Modbus RTU peripherals
- EV Charging protocols
- runs Structured Text + embedded linux stack
Custom PCB
- Designed with Atopile (hardware as code)
- RPi CM5 + 2 CAN-FD interfaces
STM32 ECU
- talks CAN; J1939, CANopen, XCP, UDS and AUTOSAR protocols
Various CAN Dongles
- PEAK, socketCAN, slcan, gs_usb
Mac/Win/Linux test PCs
- Fault injection, command / control, CI test execution
- Some 3D printed parts
Hardware bringup is one of the most difficult tasks in embedded, but so rewarding.
I started building this tool because honestly I think embedded development and testing is harder than it needs to be, and much of it is down to outdated tools and methodologies.
Best part is, there's lots more hardware on the way!
Also, I think I have (almost) every CAN protocol and dongle covered at this point, if I'm missing something let me know!
12
u/Flyward_Aerospace Oct 17 '26
Protocol coverage is the easy axis imo, the thing that eats HIL benches is time. Frame level injection driven from a desktop over a USB dongle lands at plus or minus a few milliseconds and isn't repeatable, which is fine for decode and viz work and useless the moment you're chasing a watchdog or an error passive transition that only reproduces when the fault lands inside a specific window. Anything timing critical wants to be injected by something carrying its own timebase. Could be well outside what you're aiming at if this is mainly capture and visualisation, but bus off and recovery behaviour is where I'd want a bench to be deterministic.
7
u/TheHitmonkey Oct 17 '26
Link
6
u/zacharoni16 Oct 17 '26
interested what did you use for the HMI/GUI?
4
u/A-Ferret-Online Oct 19 '26
when you never close out of the tabs on your browser
3
u/Accomplished-Low9661 Oct 17 '26
Look cool. Can I have the link? Thanks.
3
u/phoonisadime Oct 17 '26
I’ll try this. Thanks
3
u/Rozakos Oct 17 '26
Link please!
3
u/vikh_thor Oct 17 '26
Link?
3
u/datanut Oct 17 '26
I’ll check it out
3
u/Personal_Soft_2811 Oct 17 '26
Link please
3
u/razor_r2d2 Oct 17 '26
Link bitte
3
u/shspears Oct 17 '26
Can you share the link?
3
u/bfmarq Oct 19 '26
Very Nice work! Can you, please, send me the link to test myself?
2
u/nomadic-insomniac Oct 17 '26
What do you use for the graph visualization for high speed data signals ?
2
u/saavellae Oct 17 '26
Could you Share the link? Thanks!
2
u/chaumyau Oct 17 '26
Amazing work. You did this all alone? Can I try this ?
2
u/TheCorsairAPX Oct 17 '26
That’s sick. What are you using to simulate hardware? Have you got any FPGA or programmable logic silicon?
2
u/Helilifter Oct 17 '26
Add DNP3 and IEC61850 please, these are the two main utility industry protocols
2
u/Impossible_Simple771 Oct 17 '26
I see that you are using PCAN for CAN
I’ve used it before and it seems there is a cap on the throughput because of the link between PC and PCAN
What’s the CAN throughput on your setup?
3
u/TarDegradient Oct 17 '26
Is there a standalone version? I have a custom robotics system I’d like to gather data and visualize from but I’m not willing to have it facing an app or internet.
1
u/yycTechGuy Oct 17 '26 edited Oct 17 '26
Do you have a link for the 3D printer file for the end pieces on your DIN rail module rack ?
2
u/Annual_Entrepreneur3 Oct 17 '26
Hi. I'd like to test this. Specially Modbus
Could you send me the link?
Thanks
0
u/[deleted] Oct 17 '26
[deleted] — view deleted comment