ESC telemetry to Frsky Smartport with Arduino Pro Mini

Electronic projects that are either related to the firmwares for the 9x, or simply great for radio control applications.
Post Reply
DanielGA
Posts: 34
Joined: Sat Mar 19, 2016 10:44 am
Country: Spain

ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by DanielGA »

This is a DIY project to send ESC telemetry and optionally other sensors to Frsky Smartport using an Arduino Pro Mini 168 or 328P (3.3v or 5v)
The input is either ESC serial data or PWM signal

ESC protocols implemented:

- Hobbywing Platinum V3: RPM
- Hobbywing Platinum V4, Hobbywing Flyfun V5: RPM, temperature, voltage and current
- PWM signal: RPM

Average cell voltage for HW V4/V5 is calculated for 3S,4S,5S,6S,7S,8S,10S and 12S batteries. Two seconds after power on cell count is autodetected and fixed (average cell voltage to be >3.8v for proper cell count)

Optionally you can add the following analog sensors:

- 2 x voltage divider can be added to read the battery voltage
- Current sensor
- 2 x temperature sensors (thermistors)

Image

The Arduino is configured from Opentx with a lua script (X7, X9, X-lite and Horus with Opentx 2.2 or higher)

Image

The project is available on Github:

https://github.com/dgatf/esc_smartport

[img]./images/top.jpg[img]
Video:

https://youtu.be/Mby2rlmAMlU

Cheers,
Daniel

Edit: v0.3.1 available

DanielGA
Posts: 34
Joined: Sat Mar 19, 2016 10:44 am
Country: Spain

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by DanielGA »

Version v0.4 available:

- Support for change_id_frsky to change the sensor id
- Support for I2C sensors
- Improved code quality and performance
- Smartport_library improved performance and abstract from the smartport protocol

Project name changed to MSRC
DanielGA
Posts: 34
Joined: Sat Mar 19, 2016 10:44 am
Country: Spain

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by DanielGA »

Version 0.5 available:

- Added support for castle link protocol
JimSorenson
Posts: 1
Joined: Mon May 25, 2020 9:25 pm
Country: -

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by JimSorenson »

I just found this, and I love projects like this! I previously did the DX5E module conversion for my Taranis Pro. This will be my next project so that I can get proper use out of the HobbyWing controller. Thanks for figuring this out.

- Jim
michel49
Posts: 193
Joined: Sun Oct 07, 2012 10:59 am
Country: -

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by michel49 »

Hi,

Do you think it will work with Super Brain/ Hifei Esc ?

DanielGA
Posts: 34
Joined: Sat Mar 19, 2016 10:44 am
Country: Spain

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by DanielGA »

Thanks Jim

Michel, no it doesnt support Hifei esc, but I could implement it. There are two options for this, either I get the protocol description (easier) or you can use the sniffer tool (under tools folder)to read the telemetry, send it to me and I'll try to reverse engineer it, like I did for the hw, this is the harder way. I'm assuming it is based on serial comm
Andrea76it
Posts: 4
Joined: Wed Apr 22, 2020 12:04 pm
Country: -

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by Andrea76it »

Hi, it's a very interesting project.
I would like to contribute, because I would like to add the HOTT Graupner ESCs. I analyzed the problem and I saw that the Graupner ESCs need a complete serial communication Rx and Tx. Now I study your libraries and update you.
Andrea
stefaanbolle
Posts: 4
Joined: Thu Dec 19, 2019 8:39 am
Country: -

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by stefaanbolle »

Great project!
How do you choose between serial and PWM signal for telemetry with the Hobbywing Platinum v4 pro? When using PWM signal, you can at the same time add a gps via the only available uart port to the board, correct?
It is not clear to me what lead to use from the Hobbywing to the Arduino mini pro to use PWM signal for telemetry.
DanielGA
Posts: 34
Joined: Sat Mar 19, 2016 10:44 am
Country: Spain

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by DanielGA »

stefaanbolle wrote: Mon Nov 09, 2020 7:59 pm Great project!
How do you choose between serial and PWM signal for telemetry with the Hobbywing Platinum v4 pro? When using PWM signal, you can at the same time add a gps via the only available uart port to the board, correct?
It is not clear to me what lead to use from the Hobbywing to the Arduino mini pro to use PWM signal for telemetry.
Answer on helifreak
stefaanbolle
Posts: 4
Joined: Thu Dec 19, 2019 8:39 am
Country: -

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by stefaanbolle »

Thanks!
Jogi
Posts: 1
Joined: Wed Apr 07, 2021 8:36 pm
Country: -

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by Jogi »

Thank you for this incredible project.
I use speed and voltage to display these values and generate messages. This is very helpful.
I use the HW V4 and the remark at Github confused me, because the program port is the telemetry connection here.
Best regards
User avatar
Hobby4Life
Posts: 11
Joined: Tue Oct 01, 2019 6:11 pm
Country: -
Contact:

Issue: No telemetry data Kontronik Jive.

Post by Hobby4Life »

Hi all, I have some issues getting a Kontronik Jive 100LV to work.

TX: Frsky X10S Express
RX: X4R (Smartport)

I have Smartport running, configured it with the lua script to use the Kontronik Protocol.
That works.. got all sensors discovered.

Connected the Jive to RX0 of my Nano.

I see there is data coming in (led on arduino blinks).. but not passed thru to smartport..

I know the telemetry port works, because I use a Jlog S32 logger to read out it's telemetry.

Am I missing something?

I also tried a Pro Mini 328 @ 3.3v 8Mhz as suggested but nothing..
Smartport YES - Kontronik readings NO

I have used the sniffer tool to monitor the jive output.
All baudrates except 115200bd show data.

I assume the jive's dont sent out telemetry @ 115200bd, but more like 9600bd
Gr. Björn
www.hobby4Life.nl
Meniu
Posts: 1
Joined: Thu Apr 22, 2021 8:05 pm
Country: -

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by Meniu »

Hello Daniel.

Very nice project congratulation.
I have TX RAdiomaster, RX FR sky X8R receiver
board Arduino Pro Mini,Atmega 328P

I Programmed board, opened Lua sript in TX.
But I have connecting and not connected and search new sensors.

What I do wrong?

Robert


DanielGA wrote: Mon May 13, 2019 9:22 am This is a DIY project to send ESC telemetry and optionally other sensors to Frsky Smartport using an Arduino Pro Mini 168 or 328P (3.3v or 5v)
The input is either ESC serial data or PWM signal

ESC protocols implemented:

- Hobbywing Platinum V3: RPM
- Hobbywing Platinum V4, Hobbywing Flyfun V5: RPM, temperature, voltage and current
- PWM signal: RPM

Average cell voltage for HW V4/V5 is calculated for 3S,4S,5S,6S,7S,8S,10S and 12S batteries. Two seconds after power on cell count is autodetected and fixed (average cell voltage to be >3.8v for proper cell count)

Optionally you can add the following analog sensors:

- 2 x voltage divider can be added to read the battery voltage
- Current sensor
- 2 x temperature sensors (thermistors)

Image

The Arduino is configured from Opentx with a lua script (X7, X9, X-lite and Horus with Opentx 2.2 or higher)

Image

The project is available on Github:

https://github.com/dgatf/esc_smartport

[img]./images/top.jpg[img]
Video:

https://youtu.be/Mby2rlmAMlU

Cheers,
Daniel

Edit: v0.3.1 available
offers
Posts: 81
Joined: Tue Jan 22, 2013 4:14 pm
Country: -

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by offers »

Hi
Just found the project and love it!
Will it support Jetti protocol?


Sent from my iPhone using Tapatalk
DanielGA
Posts: 34
Joined: Sat Mar 19, 2016 10:44 am
Country: Spain

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by DanielGA »

Yes. Jeti Ex Bus support has been added. Still may need some testing tough
cocoda36
Posts: 4
Joined: Wed Oct 21, 2020 5:23 pm
Country: -

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by cocoda36 »

Hi
It's a amazing project but I'm wondering for what?
The only thing who is not supported by frsky is RPM.
There are sensors for everything else from frsky!
User avatar
Kilrah
Posts: 11113
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by Kilrah »

Because why would you add more sensors with the associated costs and extra wiring when all the info's already available from the ESC?
cocoda36
Posts: 4
Joined: Wed Oct 21, 2020 5:23 pm
Country: -

Re: RE: Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by cocoda36 »

Kilrah wrote:Because why would you add more sensors with the associated costs and extra wiring when all the info's already available from the ESC?
Shure, this I don't think of it but it depends on the model you have.
The place in the model is for me a reason to think of it. I have a Crawler and enough room for extra wiring and sensors. But in a rc heli is less space to use!
cocoda36
Posts: 4
Joined: Wed Oct 21, 2020 5:23 pm
Country: -

Re: RE: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by cocoda36 »

DanielGA wrote:This is a DIY project to send ESC telemetry and optionally other sensors to Frsky Smartport using an Arduino Pro Mini 168 or 328P (3.3v or 5v)
The input is either ESC serial data or PWM signal

ESC protocols implemented:

- Hobbywing Platinum V3: RPM
- Hobbywing Platinum V4, Hobbywing Flyfun V5: RPM, temperature, voltage and current
- PWM signal: RPM

Average cell voltage for HW V4/V5 is calculated for 3S,4S,5S,6S,7S,8S,10S and 12S batteries. Two seconds after power on cell count is autodetected and fixed (average cell voltage to be >3.8v for proper cell count)

Optionally you can add the following analog sensors:

- 2 x voltage divider can be added to read the battery voltage
- Current sensor
- 2 x temperature sensors (thermistors)

Image

The Arduino is configured from Opentx with a lua script (X7, X9, X-lite and Horus with Opentx 2.2 or higher)

Image

The project is available on Github:

https://github.com/dgatf/esc_smartport

[img]./images/top.jpg[img]
Video:

https://youtu.be/Mby2rlmAMlU

Cheers,
Daniel

Edit: v0.3.1 available
Hi
Tell us please what hardware you are using in the video?
Thanks
DanielGA
Posts: 34
Joined: Sat Mar 19, 2016 10:44 am
Country: Spain

Re: RE: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by DanielGA »

cocoda36 wrote: Mon Oct 25, 2021 10:25 pm Hi
Tell us please what hardware you are using in the video?
Thanks
There I used an Arduino Pro Mini. Unless you use with Castle Link or need to add a second serial sensor like gps, the Pro Mini is enough. The esc is a Hobbywing V3 and the radio system is Frsky. That was test for the pwm out generated from the serial rpm
zatalian
Posts: 4
Joined: Mon Aug 11, 2014 6:29 pm
Country: -

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by zatalian »

Hi,
just found this project coming from OpenXSensor, but I want to use a atmega32u4. Just testing on a leonardo for now.
I tried compiling/linking/uploading the code with just voltage 1 & 2 enabled for the frsky smartport protocol.
I get the following error saying my sketch is to big...

Code: Select all

De schets gebruikt 32384 bytes (112%)  programma-opslagruimte. Maximum is 28672 bytes.
Globale variabelen gebruiken 1110 bytes (43%) van het dynamisch geheugen. Resteren 1450 bytes voor lokale variabelen. Maximum is 2560 bytes.
text section exceeds available space in board
Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.
Fout bij het compileren voor board Arduino Leonardo
I tried commenting out the includes that are not needed in msrc.h but that didn't change the size...
DanielGA
Posts: 34
Joined: Sat Mar 19, 2016 10:44 am
Country: Spain

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by DanielGA »

zatalian wrote: Mon Nov 01, 2021 11:27 am Hi,
just found this project coming from OpenXSensor, but I want to use a atmega32u4. Just testing on a leonardo for now.
I tried compiling/linking/uploading the code with just voltage 1 & 2 enabled for the frsky smartport protocol.
I get the following error saying my sketch is to big...

Code: Select all

De schets gebruikt 32384 bytes (112%)  programma-opslagruimte. Maximum is 28672 bytes.
Globale variabelen gebruiken 1110 bytes (43%) van het dynamisch geheugen. Resteren 1450 bytes voor lokale variabelen. Maximum is 2560 bytes.
text section exceeds available space in board
Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.
Fout bij het compileren voor board Arduino Leonardo
I tried commenting out the includes that are not needed in msrc.h but that didn't change the size...
I've fixed few issues with ATmega32u4 boards regarding serial and flash size. Should be ok now
jasc
Posts: 2
Joined: Thu Nov 15, 2018 1:27 pm
Country: -

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by jasc »

DanielGA wrote: Mon Oct 25, 2021 1:59 pm Yes. Jeti Ex Bus support has been added. Still may need some testing tough
for people searching for it:
Jeti EX has not been implemented as ESC protocol ... sadly :-(
Carlou
Posts: 2
Joined: Sat Aug 31, 2024 8:50 pm
Country: -

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by Carlou »

Hi,

This is a great project and thanks for sharing it.

I manage to make it work but I have two issues:

1. Status led of the board blinks for a while and I can see telemetry values in my radio. But it stops and does not send telemetry data to the radio anymore. If I press the reset button, it will start sending telemetry values again. After some time it will stop again.
2. the current reading is always showing zero.

Does anybody knows how to fix these issues. Hre's my setup.
MRSC.png
(137.1 KiB) Not downloaded yet
Regards,
Carlou
Last edited by Carlou on Sat Aug 31, 2024 11:28 pm, edited 2 times in total.
Carlou
Posts: 2
Joined: Sat Aug 31, 2024 8:50 pm
Country: -

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by Carlou »

Just an update on this issue. If I disconnect the TELE wire from the Hobbywing ESC to the RP2040 board, the sending of the telemetry data from the RP2040 board to the receiver does not cut-off (does not stop). If I put the TELE wire back, then the issue is back wherein it will only send data for aproximatly a min then it stops (Blue LED stops blinking). I looks like the root cause is coming from the hobbywing ESC. I already tried loading older firmware version of this ESC but it did not solve the issue.

From the debug screen, the board always stops at cell count all the time as shown in the screen shot. Or maybe its jsut coincidence.
Debug.png
(91.88 KiB) Not downloaded yet
Kindly help.
Last edited by Carlou on Mon Sep 02, 2024 4:01 am, edited 2 times in total.
DanielGA
Posts: 34
Joined: Sat Mar 19, 2016 10:44 am
Country: Spain

Re: ESC telemetry to Frsky Smartport with Arduino Pro Mini

Post by DanielGA »

Carlou wrote: Sat Aug 31, 2024 10:11 pm Hi,

This is a great project and thanks for sharing it.

I manage to make it work but I have two issues:

1. Status led of the board blinks for a while and I can see telemetry values in my radio. But it stops and does not send telemetry data to the radio anymore. If I press the reset button, it will start sending telemetry values again. After some time it will stop again.
2. the current reading is always showing zero.

Does anybody knows how to fix these issues. Hre's my setup.

MRSC.png

Regards,
Carlou
This has been fixed with commit

Flash updated binary

Post Reply

Return to “General RC Electronic Projects and Discussion”