dgatf / msrc

Multi Sensor for RC with RP2040 - FrSky D, SmartPort, XBUS, SRXL, IBUS, SBUS, Multiplex Sensor Bus, Jeti Ex Bus, Hitec
GNU General Public License v3.0
168 stars 41 forks source link

APD ESC and Jeti telemetry #71

Closed gamingthemarket closed 2 years ago

gamingthemarket commented 2 years ago

I have an APD F120X ESC and Jeti radio and ATmega328. I want to decode the telem using PWM over a single wire. Can you help me with this diagram? I'm not sure about 5V and ground lines. Thanks kindly!

APD ATmega2

dgatf commented 2 years ago
gamingthemarket commented 2 years ago

You are defining the ESC T output (telemetry) signal as serial? Just to clarify, APD F series only use UART as input for firmware. I'll try the other pins. Thanks for a fast response F Series Wiring !

gamingthemarket commented 2 years ago

Also, I have read some people use an opto isolator, but I'm not sure if it's necessary on the APD F120X. My max load to the ESC is 150 amps and 35V.

dgatf commented 2 years ago

With Beta firmware it is feasible to send also full serial telemetry.

Depending on telemetry type, pins varies:

gamingthemarket commented 2 years ago

I'm not using DShot. I set the Telemetry to PWM in the APD config. Does Rx1 need a resistor?

APD ATmega2

dgatf commented 2 years ago

RPM output (PWM signal). Jeti to pins Rx and Tx. PWM signal to pin 8

It is highly recommended 1k resistor at Tx. Though it will work without it srxl_ibus_sb

dgatf commented 2 years ago

El sáb, 5 mar 2022 a las 7:55, gamingthemarket @.***>) escribió:

Ok we're getting closer. Does Rx1 need a resistor? [image: APD ATmega] https://user-images.githubusercontent.com/100990220/156883990-54fda99b-4977-49ee-879d-bf4efdafb93b.png

— Reply to this email directly, view it on GitHub https://github.com/dgatf/msrc/issues/71#issuecomment-1059759054, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIB62CSTY56EB2VA3FTCXNLU6NKU7ANCNFSM5P7KKKTA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

gamingthemarket commented 2 years ago

Still no signal but I flashed the card wrong by only uploading the config.h. Will report back!

APD ATmega2

My config.h:

ifndef CONFIG_H

define CONFIG_H

include "constants.h"

define RX_PROTOCOL RX_JETIEX

define CONFIG_ESC_PROTOCOL PROTOCOL_PWM

define CONFIG_GPS false

define GPS_BAUD_RATE 9600

define CONFIG_VOLTAGE1 true

define CONFIG_VOLTAGE2 false

define CONFIG_NTC1 true

define CONFIG_NTC2 false

define CONFIG_CURRENT true

define CONFIG_AIRSPEED false

define CONFIG_REFRESH_RPM 1

define CONFIG_REFRESH_VOLT 1

define CONFIG_REFRESH_CURR 1

define CONFIG_REFRESH_TEMP 1

define CONFIG_REFRESH_DEF 1

define CONFIG_AVERAGING_ELEMENTS_RPM 1

define CONFIG_AVERAGING_ELEMENTS_VOLT 1

define CONFIG_AVERAGING_ELEMENTS_CURR 1

define CONFIG_AVERAGING_ELEMENTS_TEMP 1

define CONFIG_AVERAGING_ELEMENTS_DEF 1

define VOLTAGE1_MULTIPLIER 1

define CURRENT_MULTIPLIER 1

define CONFIG_PWMOUT false

define PWMOUT_DUTY 0.5 // 0.5 = 50%

define SENSOR_ID 10 // Sensor Id

define DATA_ID 0x5000 // DataId (sensor type)

define CURRENT_THRESHOLD 25

gamingthemarket commented 2 years ago

APD F telemetry is PWM -> pin 8. Jeti Ex Bus output -> Tx. Wiring is the same as my prior post. I got the IDE upload working w/ the full library and config.h.

I tried this version: RX_PROTOCOL RX_JETIEX CONFIG_ESC_PROTOCOL PROTOCOL_APD_F

Also tried: RX_PROTOCOL RX_JETIEX CONFIG_ESC_PROTOCOL PROTOCOL_PWM

Jeti radio -> Apps -> Jetibox Emulator = no connection to MX for telemetry. Am I missing something?

dgatf commented 2 years ago

CONFIG_ESC_PROTOCOL PROTOCOL_PWM

This is the correct protocol for telemetry as RPM signal. Moreover, if you select PROTOCOL_APD_F, then Jeti would go other pins

You'll need to enter in debug mode

Change line 77 in constants.h to:

#define DEBUG_SERIAL softSerial

Connect arduino GND to programmer GND and arduino pin 12 to programmer Rx

Enable DEBUG_PWM in config.h and post output with serial monitor at 115200

Disable DEBUG_PWM and enable DEBUG_PACKET and post output

gamingthemarket commented 2 years ago

The ESC is faulty has to be replaced. I am going to table this project. Thanks for working with me amigo, and helping to push the hobby in a good direction.

dgatf commented 2 years ago

You're welcome