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 Tree9Likes
Reply
 
LinkBack Thread Tools Display Modes
Old 07-14-2019, 04:34 PM   #41 (permalink)
Registered Users
 
Posts: 13,909
 

Join Date: Dec 2011
Default

Does the HW platinum V3 100A 6S have telemetry output? If so how is it connected?
Atomic Skull is offline        Reply With Quote Quick reply to this message
Sponsored Links
Advertisement
 
Old 07-14-2019, 05:22 PM   #42 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Quote:
Originally Posted by Atomic Skull View Post
Does the HW platinum V3 100A 6S have telemetry output? If so how is it connected?
Yes, it seems to be the same as my HWV3 50A. It's a servo connector for programming and telemetry

https://www.google.com/url?sa=t&sour...2D7v-y8rlVfmZY
DanielGA is offline        Reply With Quote Quick reply to this message
Old 07-15-2019, 03:58 AM   #43 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Quote:
Originally Posted by Atomic Skull View Post
What does uint8_t refreshRpm = 2; do exactly?
It is the refresh rate of the rpm telemetry sensor. Averaged telemetry value is sent to smartport every 200ms but instant values and averaging are being updated all the time

Quote:
Originally Posted by Atomic Skull View Post
Does uint8_t queueTemp = 5; mean that it is taking the average of 5 RPM telemetry values?
It is the number of averaging elements for temperature values

The averaging of the signal pwm out is defined in queuePwm. It is independent from queueRpm, which is the averaging of the telemetry rpm sensor (both queues are generated from the same input though)

Below configuration parameters explained:

Code:
struct Config {
  uint8_t protocol = PROTOCOL_HW_V3;  // protocol (PROTOCOL_HW_V3, PROTOCOL_HW_V4, PWM)
  bool voltage1 = false;              // enable/disable voltage1 analog reading
  bool voltage2 = false;              // enable/disable voltage2 analog reading
  bool current = false;               // enable/disable current analog reading
  bool ntc1 = false;                  // enable/disable ntc1 analog reading
  bool ntc2 = false;                  // enable/disable ntc2 analog reading
  bool pwmOut = false;                // enable/disable pwm out generation (governor)
  // max refresh rate 15 (1.5s)
  uint8_t refreshRpm = 2;             // telemetry rpm refresh rate (ms / 100)
  uint8_t refreshVolt = 10;           // telemetry voltage refresh rate (ms / 100)
  uint8_t refreshCurr = 10;           // telemetry current refresh rate (ms / 100)
  uint8_t refreshTemp = 10;           // telemetry temperature refresh rate (ms / 100)
  // max queue size 16
  uint8_t queueRpm = 5;               // rpm averaging elements
  uint8_t queueVolt = 5;              // voltage averaging elements
  uint8_t queueCurr = 5;              // current averaging elements
  uint8_t queueTemp = 5;              // temperature averaging elements
  uint8_t queuePwm = 5;               // pwm out averaging elements (governor)
};

Last edited by DanielGA; 07-15-2019 at 04:14 AM..
DanielGA is offline        Reply With Quote Quick reply to this message
Old 07-15-2019, 06:41 AM   #44 (permalink)
Registered Users
 

Join Date: Feb 2007
Location: England
Default

Daniel, - after yesterday's brain fade I now have 3 working set-ups with the latest V0.3 and phase sensors (I have yet to update my X360 that has the HW60 fitted) - all working well.

I have seen a couple of strange things - I get the occasional strange HS reading - e.g. - 2566, 2548, 2542, 3522, 2544 etc. - I'll keep an eye on that once I have done some "tweaking" of settings.

Also when I started setting up 168 cpu Mini there were not any default settings for the first few settings (e.g. protocol, Voltage1, voltage2 etc.) the fields were blank. By clicking into the field I was able to set the setting as I wanted it - but it was blank rather than having a default setting to start with. This was only for the 168 cpu version not the 328.

The only other thing that is different is that reading the settings into the LUA script and updating the settings take a few seconds, but I think that you know this - I am using the latest firmware and LUA.

Thanks again. Mike
Mikej is offline        Reply With Quote Quick reply to this message
Old 07-15-2019, 08:03 AM   #45 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Quote:
Originally Posted by Mikej View Post
I get the occasional strange HS reading - e.g. - 2566, 2548, 2542, 3522, 2544 etc
When the esc is powering up and beeping sends some pulses to the pwm out signal. Is it on powering up or any time?

Quote:
Originally Posted by Mikej View Post
Also when I started setting up 168 cpu Mini there were not any default settings for the first few settings (e.g. protocol, Voltage1, voltage2 etc.) the fields were blank. By clicking into the field I was able to set the setting as I wanted it - but it was blank rather than having a default setting to start with.
This is because 1 packet was lost. Most of the times it will read all packets. I'll add a check for each received packet rater than the last

Quote:
Originally Posted by Mikej View Post
The only other thing that is different is that reading the settings into the LUA script and updating the settings take a few seconds, but I think that you know this - I am using the latest firmware and LUA.
I know. Yesterday I made an improvement to lua in this regard but probably you're using it already. I'll try to reduce it more
DanielGA is offline        Reply With Quote Quick reply to this message
Old 07-15-2019, 08:21 AM   #46 (permalink)
Registered Users
 

Join Date: Feb 2007
Location: England
Default

Quote:
Originally Posted by DanielGA View Post
When the esc is powering up and beeping sends some pulses to the pwm out signal. Is it on powering up or any time?
Nope - when running / flying

Quote:
Originally Posted by DanielGA View Post
This is because 1 packet was lost. Most of the times it will read all packets. I'll add a check for each received packet rater than the last
OK - makes sense

Quote:
Originally Posted by DanielGA View Post
I know. Yesterday I made an improvement to lua in this regard but probably you're using it already. I'll try to reduce it more
I'm on the latest, thanks
Mikej is offline        Reply With Quote Quick reply to this message
Old 07-15-2019, 09:09 AM   #47 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Quote:
Originally Posted by Mikej View Post
I get the occasional strange HS reading - e.g. - 2566, 2548, 2542, 3522, 2544 etc
This only happens with pwm protocol, right?

Maybe the call to millis inside the interrupt function is taking too long and it misses 1 pulse, so increases the average value. I'll try an alternative solution. The call to millis is to force rpms to 0 when motor stops

Last edited by DanielGA; 07-15-2019 at 09:22 AM..
DanielGA is offline        Reply With Quote Quick reply to this message
Old 07-15-2019, 09:38 AM   #48 (permalink)
Registered Users
 

Join Date: Feb 2007
Location: England
Default

Quote:
Originally Posted by DanielGA View Post
This only happens with pwm protocol, right?[/B]
I have only tried it recently in PWM - I'll flash the arduino on the HW60 heli and try that

Quote:
Originally Posted by DanielGA View Post
Maybe the call to millis inside the interrupt function is taking too long and it misses 1 pulse, so increases the average value. I'll try an alternative solution. The call to millis is to force rpms to 0 when motor stops
I still get some non-zero rpm values after the motor has stopped..
Mikej is offline        Reply With Quote Quick reply to this message
Old 07-15-2019, 09:58 AM   #49 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Quote:
Originally Posted by Mikej View Post
I still get some non-zero rpm values after the motor has stopped..
Those values stays constant after motor stops or goes to 0 after few seconds? If the latter is normal due to the delay produced by the averaging
DanielGA is offline        Reply With Quote Quick reply to this message
Old 07-15-2019, 10:54 AM   #50 (permalink)
Registered Users
 

Join Date: Feb 2007
Location: England
Default

Quote:
Originally Posted by DanielGA View Post
Those values stays constant after motor stops or goes to 0 after few seconds? If the latter is normal due to the delay produced by the averaging
No - keeps cycling through random (low) numbers. It does it before starting the motor as well. I don't think that it used to do this, I was playing with averages earlier - but I think that it is back to 5....
Mikej is offline        Reply With Quote Quick reply to this message
Old 07-15-2019, 12:13 PM   #51 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Some improvements:

- Lua checks that all packets are received
- Lua faster read config
- Firmware: increased rpm trigger for pwm in to avoid random values when motor is stopped (similar as in previous versions)
- Firmwate: pwm in interrupt function optimized (to avoid missing pulses at high rpms)
DanielGA is offline        Reply With Quote Quick reply to this message
Old 07-15-2019, 02:38 PM   #52 (permalink)
Registered Users
 

Join Date: Feb 2007
Location: England
Default

daniel,

Just tried the latest and this is what I am getting

LUA - definitely faster, but possibly not as reliable. I have to exit and restart LUA often as it is not connecting every time

HW60 V4 - I just get a constant value for EscR, it varies if I change the ratio setting but not with HS - stays the same

PWM (Phase Sensor) - seems better, but it appears that it still get the occasional value when then motor is off. So I will get 0,0,0,0 324, 175, 74, 0,0,0
Mikej is offline        Reply With Quote Quick reply to this message
Old 07-15-2019, 08:57 PM   #53 (permalink)
Registered Users
 
Posts: 13,909
 

Join Date: Dec 2011
Default

Quote:
Originally Posted by DanielGA View Post

It is the number of averaging elements for temperature values

I copy pasted the wrong line and didn't notice I meant to copy paste PWM.


Does changing the value of this have any effect on PWM out?


Quote:
uint8_t refreshRpm = 2;

Or is that calculated independently?


What is the actual refresh rate of the telemetry value sent by the ESC?


I ordered this from Ebay to measure the actual RPM with.


https://www.ebay.com/itm/Digital-Tac...53.m2749.l2648


Been needing one of these for a while anyway.
Atomic Skull is offline        Reply With Quote Quick reply to this message
Old 07-16-2019, 05:25 AM   #54 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Quote:
Originally Posted by Mikej View Post
LUA - definitely faster, but possibly not as reliable. I have to exit and restart LUA often as it is not connecting every time
Fast and reliable as previous versions

In debug mode it might not work properly as smarport communications are delayed

Quote:
Originally Posted by Mikej View Post
HW60 V4 - I just get a constant value for EscR, it varies if I change the ratio setting but not with HS - stays the same
Bug fixed

Quote:
Originally Posted by Mikej View Post
PWM (Phase Sensor) - seems better, but it appears that it still get the occasional value when then motor is off. So I will get 0,0,0,0 324, 175, 74, 0,0,0
Changed trigger to previous versions value (8000)

Also now it can be adjusted in Esc.h line 12: #define PWN_IN_LENGHT_TRIGGER_MICROS 8000

This is the maximum microseconds between pulses to take into account for rpm calculation

Defined as 8000us:

eRPM = 60000000 / 8000 = 7500

With 3 poles and gear ratio of 12, the minimum readable HS is 208 rpm

It is a compromise between false readings when motor is stopped and minimum readable rpm

I've made other changes that might allow to increase PWN_IN_LENGHT_TRIGGER_MICROS to 20000 or so and be able to read very low rpm, but in the end very low rpms are not much relevant

Those false pulses appears to happen with phase sensors and not with esc pwm signal
DanielGA is offline        Reply With Quote Quick reply to this message
Old 07-16-2019, 05:34 AM   #55 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Quote:
Originally Posted by Atomic Skull View Post
Does changing the value of this have any effect on PWM out?

uint8_t refreshRpm = 2;

Or is that calculated independently?
It is independent. Instant values and averaging are updated all the time, regardless the telemetry refresh rates

Quote:
Originally Posted by Atomic Skull View Post
What is the actual refresh rate of the telemetry value sent by the ESC?
Esc serial telemetry sends one packet every 20ms. If no packet is lost rpm is updated every 20ms

With pwm signal from esc or phase sensor, rpm is updated every pulse

Last edited by DanielGA; 07-16-2019 at 05:45 AM..
DanielGA is offline        Reply With Quote Quick reply to this message
Old 07-16-2019, 07:49 AM   #56 (permalink)
Registered Users
 

Join Date: Feb 2007
Location: England
Default

Daniel,

Much better - the LUA connects very quickly AND reliably.

The V4 bug is sorted (I don't get the rogue values with the V4)

The PWM is better for rogue values at 0 HS, though I still get a few in use - but now that the LUA is more relaible I can play with teh averaging to see if I can minimise the impact....

Thanks for this,

Mike.
Mikej is offline        Reply With Quote Quick reply to this message
Old 07-16-2019, 11:03 AM   #57 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Quote:
Originally Posted by Mikej View Post
Much better - the LUA connects very quickly AND reliably.
... even faster now

Quote:
Originally Posted by Mikej View Post
The PWM is better for rogue values at 0 HS, though I still get a few in use
I've modified the filter

Now there're two parameters

The previous parameter, maximum duration between two pulses: PWM_IN_TRIGGER_MICROS

I've increased it to 30000 because I believe the second parameter will work much better:

PWM_IN_TRIGGER_PULSES which is the number of readings different than 0 rpms to actually start measuring rpms

There is no delay due to the filter

Tested and working on esc pwm signal, not tested with phase sensor yet

Last edited by DanielGA; 07-16-2019 at 12:30 PM..
DanielGA is offline        Reply With Quote Quick reply to this message
Old 07-16-2019, 01:14 PM   #58 (permalink)
Registered Users
 

Join Date: Feb 2007
Location: England
Default

Excellent, I'll see if I can do any back-garden hovers later....

Slight change to the LUA status ...

Heli 1 HW60 V4 protocol, 5V 328, X4R-SB - connects every time )I think)
Heli 2 PWM Phase Sensor 3.3V328, R-XSR - much less reliable connects 50% or less of the time....
Mikej is offline        Reply With Quote Quick reply to this message
Old 07-16-2019, 01:50 PM   #59 (permalink)
Registered Users
Thread Starter Thread Starter
 

Join Date: Feb 2019
Location: Zurich
Default

Quote:
Originally Posted by Mikej View Post
Excellent, I'll see if I can do any back-garden hovers later....

Slight change to the LUA status ...

Heli 1 HW60 V4 protocol, 5V 328, X4R-SB - connects every time )I think)
Heli 2 PWM Phase Sensor 3.3V328, R-XSR - much less reliable connects 50% or less of the time....
Ok, back to previous lua version (fast as well). Packets are sent twice. Firmware is the same
DanielGA is offline        Reply With Quote Quick reply to this message
Old 07-16-2019, 02:07 PM   #60 (permalink)
Registered Users
 

Join Date: Feb 2007
Location: England
Default

Daniel,

I think that we may have got out of sync with our messages

I have downloaded the latest version 19:43 my time, 20:43 your time I think, still fast still problems for the Arduino with the Phase Sensor to communicate (less than 50% - the same).

I am not sure that it is anything to do with your code - it might be the arduino board, so I will build another set-up with a Phase Sensor and test that with the same heli to remove an issue with the arduino board as the cause.
Mikej 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