Collecting battery data
#1
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.

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.

#2
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.

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.

#3
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.
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 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
#4
#5
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.
Last edited by gigaplex; 01-09-2022 at 08:16 PM.
#6
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.
#7
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.





5Likes
