Go Back  R/C Tech Forums > General Forums > Radio and Electronics
Collecting battery data >

Collecting battery data

Community
Wiki Posts
Search
Like Tree5Likes
  • 2 Post By PDR
  • 1 Post By gigaplex
  • 1 Post By gigaplex
  • 1 Post By PDR

Collecting battery data

Thread Tools
 
Search this Thread
 
Old 01-07-2022 | 05:21 PM
  #1  
PDR's Avatar
PDR
Thread Starter
Tech Elite
iTrader: (31)
 
Joined: Oct 2008
Posts: 2,207
From: Sydney, Australia
Default Collecting battery data

Wanted to share some early data on a little project I put together. It's a compact logger that records battery voltage and throttle input. My driver was to collect data on the voltage of the battery over the course of a run, as well as response to short term load.

I've no doubt there are commercial options out there, but I learn through experimenting and this is fun. The current prototype is a microcontroller-based unit with a microSD card slot. I had tinkered with using WiFi, but it just seemed like a pain in the butt, so I decided to just collect raw data and chuck it into a spreadsheet. Again, there are probably better data analysis tools out there, so you can run with what you like. What tool can't be happy with a CSV?

Without wires, it's just on 4g so not a burden, but a y-cable for the ESC is needed and it uses two alligator clips to attach to the car's battery.

Anyway, on to the fun bit! Did my first run just now and it's quite interesting:


Each sample is 20ms apart (I'm pretty sure I can go much higher) and there is a bit of noise, so the chart above uses a 20-sample moving average of voltage.

You can see a definite sag under load as the throttle is applied and a recovery as the car hits speed. In future, I hope to compare different batteries to see if this changes. There's also a bit of jumpiness in my throttle - maybe my radio is getting old.

You may also notice I started with a fairly depleted battery. Soz - I didn't have patience to charge it

Anyway, as I get a chance to get to the track, I'll try to collect more data.


gigaplex and Alexv2024 like this.
PDR is offline  
Old 01-08-2022 | 05:05 AM
  #2  
gigaplex's Avatar
Tech Champion
iTrader: (2)
 
Joined: Dec 2015
Posts: 7,756
From: Melbourne, VIC
Default

What microcontroller are you using? I've written some Arduino code that reads the receiver output to use as a VRC dongle, and it also has similar jitter on a Sanwa M17. I suspect it's the timer resolution of the micro and the interrupt duration. I don't have an oscilloscope to measure it properly to confirm it's not the radio, but it seems unlikely for such a high end radio.

While it's a lot less DIY fun, my R1 Wurks ESC can log data to the WiFi dongle which you can download after the run.



PDR likes this.
gigaplex is offline  
Old 01-08-2022 | 06:10 PM
  #3  
PDR's Avatar
PDR
Thread Starter
Tech Elite
iTrader: (31)
 
Joined: Oct 2008
Posts: 2,207
From: Sydney, Australia
Default

Originally Posted by gigaplex
What microcontroller are you using? I've written some Arduino code that reads the receiver output to use as a VRC dongle, and it also has similar jitter on a Sanwa M17. I suspect it's the timer resolution of the micro and the interrupt duration. I don't have an oscilloscope to measure it properly to confirm it's not the radio, but it seems unlikely for such a high end radio.

While it's a lot less DIY fun, my R1 Wurks ESC can log data to the WiFi dongle which you can download after the run.

I'm using the built-in pulse-width timer (Timer B) of an AVR128DA48 which can run up to clock rate (24MHz), but I'm prescaling back somewhat for under 1uS resolution. It's completely independent of the core (triggered by the event/IO subsystem) and should be spot on. However, it may be susceptible to noise, so I'll explore that. The repeatability of the behaviour seems odd though.

The built-in logging of the R1 looks cool! Sadly, none of my ESC's have it

FWIW my M11X is old'ish - maybe ~10 years?

Last edited by PDR; 01-08-2022 at 06:14 PM. Reason: added note on radio
PDR is offline  
Old 01-08-2022 | 06:18 PM
  #4  
PDR's Avatar
PDR
Thread Starter
Tech Elite
iTrader: (31)
 
Joined: Oct 2008
Posts: 2,207
From: Sydney, Australia
Default

Originally Posted by gigaplex

While it's a lot less DIY fun, my R1 Wurks ESC can log data to the WiFi dongle which you can download after the run.


The throttle line is weird here. Is this a bench run? 30 seconds without going back to neutral?

As a matter of curiosity, what's the sampling rate?
PDR is offline  
Old 01-09-2022 | 01:02 AM
  #5  
gigaplex's Avatar
Tech Champion
iTrader: (2)
 
Joined: Dec 2015
Posts: 7,756
From: Melbourne, VIC
Default

Originally Posted by PDR
The throttle line is weird here. Is this a bench run? 30 seconds without going back to neutral?

As a matter of curiosity, what's the sampling rate?
Velodrome speed run. I'm not exactly sure but I think it is 10Hz sampling rate. This was actually zoomed in on the graph, I think I went around 3 minutes before backing off the throttle in the full run.
PDR likes this.

Last edited by gigaplex; 01-09-2022 at 08:16 PM.
gigaplex is offline  
Old 01-10-2022 | 07:41 AM
  #6  
GerryH's Avatar
Tech Fanatic
iTrader: (29)
 
Joined: Nov 2009
Posts: 978
Default

There used to be a company, Eagle Tree Software, that made all sorts of data loggers and sensors. I have one of their later models that could do voltage, current, brushless motor RPM, servo positions, etc. Sadly they recently went out of business. I'm guessing it's a combination of this type of data logging being incorporated into things like ESC and lack of market. For those people who want this type of data, they will probably pick an ESC that has it built in as opposed to some extra device with a bunch of wires.
GerryH is offline  
Old 01-21-2022 | 02:52 AM
  #7  
PDR's Avatar
PDR
Thread Starter
Tech Elite
iTrader: (31)
 
Joined: Oct 2008
Posts: 2,207
From: Sydney, Australia
Default

Now with added accelerometer (because, why not). Weather has been terrible, so not much chance for data gathering, but... also have new batteries on the way and need to swap motors for the next race, so fingers crossed for decent weather this week.

GerryH likes this.
PDR is offline  

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not 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 Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.