Fun, Learning, Friendship and Mutual Respect START  HERE


Unregistered
Go Back   HeliFreak > R/C Electronics Support > HobbyWing ESC's


HobbyWing ESC's HobbyWing ESC Support


Like Tree4Likes
Reply
 
LinkBack Thread Tools Display Modes
Old 09-10-2020, 09:42 AM   #181 (permalink)
Registered Users
 

Join Date: Aug 2007
Default

That is great Daniel !

But do I need an Atmega32u for that or does it work with the 328P as well ?
And if an 328P is ok; is an Arduino nano-board than sufficient, since I have that lying around already ..?

regards, Andre
hazes is offline        Reply With Quote Quick reply to this message
Sponsored Links
Advertisement
 
Old 09-10-2020, 10:25 AM   #182 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

It works with the 328. I've found a better way to implement the protocol for this mcu. I recommend the arduino pro mini (without usb) as I've found issues reading the esc serial with the nano

Last edited by DanielGA; 09-10-2020 at 11:01 AM..
DanielGA is offline        Reply With Quote Quick reply to this message
Old 09-11-2020, 03:43 AM   #183 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

But as you are going to use castle protocol, which is not serial, the nano should be ok (I haven't tested though)
DanielGA is offline        Reply With Quote Quick reply to this message
Old 09-13-2020, 01:05 PM   #184 (permalink)
Registered Users
 
Posts: 2,111
 
My HF Map location
Join Date: Jun 2004
Default

I have a question about the Lua script.
I have a Horus X12 running OTX 2.3.9



It seems that anything inside the rectangle seems to flash rapidly, alternating between the two. When the scroll wheel is moved, the selection moves, but still flashes between the selected and the previous selection.


When the enter key is pressed, it still flashes rapidly (100ms or so as an estimate) but doesn't alternate.


I have spent a couple hours looking through the Lua to see if I could come up with a fix, but I am rather inept at Lua and was unsuccessful. I do, however, suspect it has to do with anything that getflags() doesn't search the element string for "btn", because the "UPDATE" button at the bottom of the screen works flawlessly.


This doesn't render the function unusable, however, it does make it difficult to use.


If there is any more info you need, please let me know, I will try to get it for you.


And, thanks for the work you have done on this. It is a superb project and extremely useful!
__________________
I came, I saw, I hovered
Ivan is offline        Reply With Quote Quick reply to this message
Old 09-16-2020, 08:15 AM   #185 (permalink)
Registered Users
 

Join Date: Dec 2019
Location: Bratislava - Rača
Default

Quote:
Originally Posted by DanielGA View Post
I recommend the arduino pro mini (without usb) as I've found issues reading the esc serial with the nano
These issues can be easily fixed with simple non inverting amplifier connected to RX pin e.g. built using two npn transistors. Main issue there is that HW ESC does not have enough power to pull RX pin down.
L2-Max is offline        Reply With Quote Quick reply to this message
Old 09-16-2020, 01:53 PM   #186 (permalink)
Registered Users
 

Join Date: Feb 2007
Location: England
Default

It's a great little solution - I now have them in about 5 or 6 helis and 3 planes. For the cost of the Pro Mini (about $2 - 3) I can have a simple voltage sensor in my planes or full-house volts / rpm / current in the helis.

Thanks again Daniel
Mikej is online now        Reply With Quote Quick reply to this message
Old 09-18-2020, 03:19 PM   #187 (permalink)
Registered Users
 

Join Date: Sep 2020
Location: Mexico
Default Castle Link compatibility

Has someone been able to make this work with a castle ESC? i am trying to use it on a Talon 90, Horus X12 Express, I have some issues with the sensors not reading correctly, using with a 6s setup Voltage varies between 24,23,22v. When the motor is running i get values jumping all over the place like, 13, 18, 16 ,25,23, all at the same throttle input. I am somewhat new to Opentx so i dont know what i can do to fix this issue.Also i am using an arduino nano is what i had on hand for this project.
Emilioeer is offline        Reply With Quote Quick reply to this message
Old 11-09-2020, 02:14 PM   #188 (permalink)
Registered Users
 

Join Date: Dec 2019
Location: Belgium
Default

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.
stefaanbolle is online now        Reply With Quote Quick reply to this message
Old 11-09-2020, 10:10 PM   #189 (permalink)
Registered Users
 
Posts: 13,512
 

Join Date: Dec 2011
Default

Quote:
Originally Posted by DanielGA View Post
It turned out that the voltage and current transformations for HW V4/V5 are more tricky than expected...

- At least there are two voltage dividers, depending on the model, one for LV models and other for HV models

- Current is a shunt/diffamp sensor and has different offsets for V4 and V5

- Temperature is ntc resistors and seems to be the same circuit so far

Due to this now there are four options for HW V4/V5:

- HW V4 LV
- HW V4 HV
- HW V5 LV
- HW V5 HV

Thanks to Commodore8888 for looking into some HW V4 PCBs to check characteristics of the sensors

Also I made some improvements on the castle link protocol

v0.5 released

- Added castle link protocol
- Improved voltage and current transformations for V4/V5. Added different models
- Fixed wrong number of averaging elements for V4/V5

Maybe something similar with Hobbywing Flyfun HV vs LV ESCs and the RPM data? That could explain why the RPM PWM signal generated from telemetry on the HV units is wrong while it woks fine with the LV units.
Atomic Skull is offline        Reply With Quote Quick reply to this message
Old 11-10-2020, 12:28 PM   #190 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Quote:
Originally Posted by stefaanbolle View Post
How do you choose between serial and PWM signal for telemetry with the Hobbywing Platinum v4 pro?
From lua config script select PWM as Protocol and press UPDATE

Quote:
Originally Posted by stefaanbolle View Post
When using PWM signal, you can at the same time add a gps via the only available uart port to the board, correct?
Correct

Quote:
Originally Posted by stefaanbolle View Post
It is not clear to me what lead to use from the Hobbywing to the Arduino mini pro to use PWM signal for telemetry.
Use the yellow lead from the esc and connect to arduino pin 8
DanielGA is offline        Reply With Quote Quick reply to this message
Old 11-10-2020, 12:50 PM   #191 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Quote:
Originally Posted by Emilioeer View Post
Has someone been able to make this work with a castle ESC? i am trying to use it on a Talon 90, Horus X12 Express, I have some issues with the sensors not reading correctly, using with a 6s setup Voltage varies between 24,23,22v. When the motor is running i get values jumping all over the place like, 13, 18, 16 ,25,23, all at the same throttle input. I am somewhat new to Opentx so i dont know what i can do to fix this issue.Also i am using an arduino nano is what i had on hand for this project.
Sorry for the delay...

What about the other sensors readings: BEC voltage, temperature and RPM? Are they correct?

Nothing to do with opentx, except for the lua config

Arduino nano should be ok (not tested though) as long as you are not using serial Hobbywing protocol (see previous comment 185)

It can be an issue related to telemetry reading. Check pin2 and pin 10 (including the pullup) connections

From lua config script change sensor averaging to 1 and check if you are getting 0 values sometimes

Last edited by DanielGA; 11-10-2020 at 01:35 PM..
DanielGA is offline        Reply With Quote Quick reply to this message
Old 11-10-2020, 12:59 PM   #192 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Quote:
Originally Posted by Atomic Skull View Post
Maybe something similar with Hobbywing Flyfun HV vs LV ESCs and the RPM data? That could explain why the RPM PWM signal generated from telemetry on the HV units is wrong while it woks fine with the LV units.
Could be... Is the deviation linear (I mean could be fixed by a multiplier/divider) or is non linear?
DanielGA is offline        Reply With Quote Quick reply to this message
Old 11-10-2020, 01:18 PM   #193 (permalink)
Registered Users
 

Join Date: Dec 2019
Location: Belgium
Default

Quote:
Originally Posted by DanielGA View Post
From lua config script select PWM as Protocol and press UPDATE



Correct



Use the yellow lead from the esc and connect to arduino pin 8

Thanks!
stefaanbolle is online now        Reply With Quote Quick reply to this message
Old 11-10-2020, 02:13 PM   #194 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Quote:
Originally Posted by Ivan View Post
It seems that anything inside the rectangle seems to flash rapidly, alternating between the two. When the scroll wheel is moved, the selection moves, but still flashes between the selected and the previous selection.

When the enter key is pressed, it still flashes rapidly (100ms or so as an estimate) but doesn't alternate.
Flickering is normal. Can be improved though

Regarding the alternate issue, I can't reproduce. Are you using the last lua version 0.7?
DanielGA is offline        Reply With Quote Quick reply to this message
Old 11-10-2020, 02:36 PM   #195 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Quote:
Originally Posted by Ivan View Post
At any rate, it would take more programming and a throttle signal input for the arduino to handle the issue, but I am under the assumption that there's not much more memory available after flashing the current code.
Curves for diffamp and ntc have been implemented for HW V4/5 and may be adjusted in escHW4.h if needed. Circuit values are required though:

Code:
const float voltageDivisor_[4] = {11, 21, 11, 21};
const float rawCurrentOffset_[4] = {15, 15, 660, 660};

#define ESCHW4_NTC_BETA 3950.0
#define ESCHW4_NTC_R1 10000.0
#define ESCHW4_NTC_R_REF 47000.0
#define ESCHW4_DIFFAMP_GAIN 13.6
#define ESCHW4_DIFFAMP_SHUNT 0.25 / 1000
Alternatively, if no circuit values are available or esc firmware is buggy and doesnt follow the expected the curves, it can be aproximated by measurement points but this increases the required flash for each curve and as you pointed there is not much free flash

Last edited by DanielGA; 11-11-2020 at 02:15 AM..
DanielGA is offline        Reply With Quote Quick reply to this message
Old 11-12-2020, 06:04 AM   #196 (permalink)
Registered Users
 

Join Date: Dec 2019
Location: Belgium
Default

I am going to try an all-in-one sensor for my 470LM (to replace 3 different FrSky sensors and interconnecting cable bundles)
Pending deliveries:
- Arduino Mini Pro 328p 3,3V with FTDI board
- BMP280
- BN220
- Hobbywing ESC Platinum v4 (already installed) connected to Arduino via PWM

In a second phase I'll add to the board additionally:
- 6S voltage measurement
- 100A/XT60 current measurement (considering HGLRX XT60 board)

Looking forward to use your code, thanks for sharing!
stefaanbolle is online now        Reply With Quote Quick reply to this message
Old 11-12-2020, 12:40 PM   #197 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Great! Keep us informed
DanielGA is offline        Reply With Quote Quick reply to this message
Old 11-16-2020, 07:37 PM   #198 (permalink)
Registered Users
 

Join Date: Mar 2017
Location: Canada
Default

hello,

i got a handful of Arduino pro minis 3.3v
I want to get ESC temp and RPM (headspeeds) from my Hobbywing V4s. to my frsky/open tx . only frsky sensors I use are the FVLSS
im confused on where to start to be honest.
did I miss a step by step setup guide? or do i need to speak the language to implement this?

thank you.
__________________
Goblin 770S - eXo 500 - HD 502 - Oxy FE, MEG - Few Fixed wings

Spartan VX1n/e, Frsky RX, RT Blades MKS/BK, Hobbywing
Danker16 is offline        Reply With Quote Quick reply to this message
Old 11-16-2020, 11:48 PM   #199 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

See the project on github
DanielGA is offline        Reply With Quote Quick reply to this message
Old 11-17-2020, 11:32 AM   #200 (permalink)
Registered Users
 

Join Date: Mar 2017
Location: Canada
Default

Quote:
Originally Posted by DanielGA View Post
See the project on github
Awsome missed that page.
__________________
Goblin 770S - eXo 500 - HD 502 - Oxy FE, MEG - Few Fixed wings

Spartan VX1n/e, Frsky RX, RT Blades MKS/BK, Hobbywing
Danker16 is offline        Reply With Quote Quick reply to this message
Reply




Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the HeliFreak forums, you must first register.
Please enter your desired user name, your REAL and WORKING email address and other required details in the form below.
User Name:
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself. Use a real email address or you will not be granted access to the site. Thank you.
Email Address:
Location
Where do you live? ie: Country, State, City or General Geographic Location please.
Name and Lastname
Enter name and last name here. (This information is not shown to the general public. Optional)
Helicopter #1
Enter Helicopter #1 type and equipment.
Helicopter #2
Enter Helicopter #2 type and equipment.
Helicopter #3
Enter Helicopter #3 type and equipment.
Helicopter #4
Enter Helicopter #4 type and equipment.

Log-in


Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Copyright © Website Acquisitions Inc. All rights reserved.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.

SEO by vBSEO 3.6.1