Reading voltage, current and RPM from ESC32 with an Arduino?

Info and Discussion about the ESC32 hardware and software

Reading voltage, current and RPM from ESC32 with an Arduino?

Postby Trnquill » Fri Sep 19, 2014 7:12 pm

I'm planning building a test rig for different motors and propellers. I need to measure current, motor RPM, voltage and thrust in real time. Thrust is measured with a load cell connected to an Arduino board but I was thinking what would be an easy way to measure the rest. Sure measuring voltage and current are easy with Arduino and few external components, but RPM is a bit trickier. Then it occured to me ESC32 has all these measurements built in! But how to get them out?

I remember reading the ESC32 telemetry is sent via CAN bus. Is there any other (easy) way to access it? If not, any pointers on how to read the CAN data?
Trnquill
 
Posts: 158
Joined: Thu Jun 06, 2013 9:35 am

Re: Reading voltage, current and RPM from ESC32 with an Ardu

Postby chschmid » Fri Sep 19, 2014 8:52 pm

I made such a tool with an arduino due and a small PC app with CLI for the arduino due.
If you are interested in the details, I can send them to you. It took me quite a while to get it right.

Best
Christof
Attachments
image4 small.jpg
chschmid
 
Posts: 1800
Joined: Wed Jul 11, 2012 7:41 pm
Location: Herrliberg, Switzerland

Re: Reading voltage, current and RPM from ESC32 with an Ardu

Postby jave-mtr » Mon Oct 13, 2014 6:24 pm

Yes, I have a similar problem. All the measurements you mentioned exist internally in ESC32 (except thrust of course), but how to get them out? I'm primarily interested in a fast measurement of commanded RPM to actual RPM.
What would be an easy way to measure this with a decent sample rate (at least 200Hz)? Thanks!
jave-mtr
 
Posts: 8
Joined: Wed Apr 03, 2013 9:21 pm

Re: Reading voltage, current and RPM from ESC32 with an Ardu

Postby chschmid » Tue Oct 14, 2014 6:29 am

The binary protocol of ESCC32 should allow you to read at up to 1000Hz.

Best
Christof
chschmid
 
Posts: 1800
Joined: Wed Jul 11, 2012 7:41 pm
Location: Herrliberg, Switzerland

Re: Reading voltage, current and RPM from ESC32 with an Ardu

Postby tuloski » Fri Nov 28, 2014 12:44 pm

Hi, is there an example for the binary protocol to do this?
Where can I find some documentation about this?
Thanks
tuloski
 
Posts: 10
Joined: Wed Nov 05, 2014 3:02 pm

Re: Reading voltage, current and RPM from ESC32 with an Ardu

Postby Astudillo » Fri Nov 28, 2014 2:38 pm

chschmid wrote:I made such a tool with an arduino due and a small PC app with CLI for the arduino due.
If you are interested in the details, I can send them to you. It took me quite a while to get it right.

Best
Christof


Are these the machines you build for that?





Cheers,

Ray
Astudillo
 
Posts: 139
Joined: Thu Apr 25, 2013 8:23 am
Location: Amsterdam, The Netherlands

Re: Reading voltage, current and RPM from ESC32 with an Ardu

Postby chschmid » Sat Nov 29, 2014 12:01 am

tuloski wrote:Hi, is there an example for the binary protocol to do this?
Where can I find some documentation about this?
Thanks


Have a look at the ground tools in the ESC32 repo.

Cheers
Christof
chschmid
 
Posts: 1800
Joined: Wed Jul 11, 2012 7:41 pm
Location: Herrliberg, Switzerland

Re: Reading voltage, current and RPM from ESC32 with an Ardu

Postby chschmid » Sat Nov 29, 2014 12:05 am

Hi Ray

Yes these where the first steps.
Here is the final linear machine:

DSC01255.JPG


Cheers
Christof
chschmid
 
Posts: 1800
Joined: Wed Jul 11, 2012 7:41 pm
Location: Herrliberg, Switzerland

Re: Reading voltage, current and RPM from ESC32 with an Ardu

Postby tuloski » Tue Dec 02, 2014 4:08 pm

chschmid wrote:
tuloski wrote:Hi, is there an example for the binary protocol to do this?
Where can I find some documentation about this?
Thanks


Have a look at the ground tools in the ESC32 repo.

Cheers
Christof


Yeah I tried that, but there are zero comments and zero documentation. I just need to read RPMs and amps, not to command rmp or set paramenters...
Is it ok to send:
esc32SendReliably(BINARY_COMMAND_TELEM_RATE, 200.0, 0.0, 1);
esc32SendReliably(BINARY_COMMAND_TELEM_VALUE, 0.0, BINARY_VALUE_RPM, 2);
esc32SendReliably(BINARY_COMMAND_TELEM_VALUE, 1.0, BINARY_VALUE_AMPS, 2);

to obtain rpm and amps telemetry at 200 Hz? I still don't get what BINARY_COMMAND_TELEM_VALUE is used for...is it to decide the order and which data of telemetry I need?
And what will I get back? A string like: "AqT"+number of rows(char)+number of coloumns(char)+data(floats)+CRC1(always zero)+CRC2(always zero)? What rows and column means?
tuloski
 
Posts: 10
Joined: Wed Nov 05, 2014 3:02 pm

Re: Reading voltage, current and RPM from ESC32 with an Ardu

Postby marrod » Fri Dec 19, 2014 12:00 pm

Hello guys!,

I am working on a twin propeller arm, i have to design a control systems that rotates and maintains the arm pivoted in the middle to a desired angle.

Controller: Arduino DUE
ESC: ESC32 from AutoQUAD (Power selected to Vb)
Angle: IMU 9DOF from Spark Fun

When interfacing the ESC32 with QGroundControl and a FTDI cable a can read de ESC32 Parameters, Tune it, start it etc... it seems to work.

With the Arduino DUE a could interface another ESC ("Afro ESC 30A") even with 3.3 V (servo library), nevertheless the ESC32 does not react to the PPM signal even with a level shifter to 5.0 V. According to QGroundControl, following values are shown:
-Min Valid PWM: 750
-Max Valid PWM: 2250
-Min Throtle: 1100
-Max Throtle: 1950
-Motor Start: 1100

What i am doing: I initialize the system and send a PWM of 1000 to the ESC32, i would expect the ESC32 recognizes this signal as a valid signal and should arm, but this is not happen, the red led continius blinking.

Someboy any Idea?
marrod
 
Posts: 1
Joined: Fri Dec 19, 2014 11:29 am

Next

Return to ESC32

Who is online

Users browsing this forum: No registered users and 10 guests

cron