DIY - RPM and Temperature Data Logger
© Mark Qvale - July, 2019
DIY Test Tool |
Introduction
Folks on RCGroups and FB have asked about some of the test tools I use to get the recommendations, charts and numbers I use in my posts. This article describes the build of a tool to measure and log the RPM of a brushless motor plus two temperature probes.
This DIY tool came from a need to be able to test components at steady state power, current and RPM levels to fully understand the loads being placed on the components. The first version of this device served to regulate the RPM at a steady state regardless of voltage supply to test battery packs and ESC's. I then re-configured the tool to regulate the current pulled from the ESC to further test battery packs in a controlled environment without the need for an expensive lab quality power supply.
The latest effort, shown here, is to make this a stand-alone in-flight tool as a means to help with choosing the best motors & props for maximum flight efficiency on an FPV fixed wing project. The goal is to have the ability to set the RPM, like a cars cruise control, then fly for a short period (5 minutes) and capture the logging info. Doing this on several different props running the same airspeed in every case will give excellent real-world comparison information.
One Issue
First, I am not an expert at writing or optimizing code. I am also not an electrical engineer (I am a retired Mechanical Engineer however) so if you see something that doesn't make sense or could be done differently with better results, please don't hesitate to contact me (bottom of this page) and let me know your thoughts.
Now the ONE ISSUE
The one issue that drove me crazy while trying to get this to work in a plane is the fact the HobbyWing RPM sensor is massively affected by any 1.2G VTx. I chased this problem all over the map until I finally (simply) connected the RPM sensor to my oscilloscope on the bench and watched what happened when I turned on a 1.2G VTx which was in a plane at a distance of ~6 feet (2m). There were no connections at all between the plane and the bench test set-up. On the other hand a 5.8G, 600mw VTx has no affect so that is what I will use in testing.
Tool Description
The tool captures RPM and two temperature values and logs them to a Micro SD card as a CSV file type which can be read and analyzed in MS Excel.
- RPM is captured using a Hobbywing RPM sensor which is the same as the Eagle Tree and Spektrum RPM sensors.
- RPM can be set using the TX while flying as either direct pass-through or regulated rpm.
- Temperature is captured using two glass bead NTC3950 thermistors commonly found on 3D printer set-ups.
- One temp sensor is epoxied onto the motor cross mount and the other is slipped under the ESC shrink cover on the MosFet side.
- One extra radio channel is needed to activate the pass-through/regulated functions.
First flight set-up |
Parts
The following are the parts used in the latest version of this tool-
- 1. Arduino 5v/16mhz Pro Mini Board
- 2. Omron 5v SPDT Signal Relay
- 3. Hobbywing RPM Sensor
- 4. NTC3950 Thermistors
- 5. Pin headers
- 6. Double Sided Prototyping PCB
- 7. 2x 100k Ohm, 1/4 watt resistors
- 8. 2x 10nF (103) capacitors
Part Selection
Arduino Pro Mini - I wanted a small board with enough IO to handle all the tasks. The Pro Mini or the Arduino Nano both easily fit the bill as does the Teensy LC board. The Pro Mini was finally selected because it works and I can find them for around $5 each.
Omron Relay - After trying many different software attempts to create a smooth pass-through mode for the signal from the flight controller directly to the ESC, I finally decided to use the normally closed side of a relay to accomplish this task. There are two reasons for this-
- 1. If the board fails for some reason the relay will close to direct pass-through making it possible to continue flying the plane.
- 2. Having a direct, hard wired pass-through makes it completely smooth which is important in how the regulated section of the software works.
- 3. Inexpensive ($1.79)
HobbyWing RPM Sensor - I actually started with an early Eagle Tree unit that had an issue with how the power wires were from the factor - Black = Positive, Red = Negative. While looking for a replacement I found the HobbyWing version which according to my O-scope produces the same output. Bonus is they are less than a quarter of the price of the Eagle Tree units ($4.49)
NTC3950 Thermistors - I selected this type of temp sensor because I had them already and they are really inexpensive ($1.40 ea). Also they are very easy to attach to the motor and ESC because of their size.
All together then, the parts for a single build cost me ~$18 plus any shipping.
Schematic
The schematic for this build can be seen here-
- Power for the Arduino board, RPM sensor and Micro SD shield (MSD) is supplied from the ESC. In the event the ESC is an Opto type, a separate 5v supply will need to be used.
- Power to the temp sensors is supplied from the Vcc pin on the Arduino board.
- The mode switch input is a single signal wire from the chosen switch channel on the RX.
- Throttle-in comes from the flight controller or RX in the case where no flight controller is used.
Board Builds
Here are some images of the first few versions and close-ups of the latest build-
Some of the proto set-ups
|
Current board (top) |
Current board (bottom) |
Code
Copy the following into a new Arduino sketch and load to the board-
Results
Below is a chart showing a 30 minute run using a 4S Li-ion battery pack which was charged to 15v and run down to 12v (3v/cell). It was started at an RPM set-point of 5075 rpm which consumed 55 watts of power. You can see the RPM is maintained at a relatively steady state with a variation of +/-50 RPM for the entire run. This is as good a resolution as I can get with the equipment used and my programming abilities. You can also see the current increases as the voltage drops which is a good indication of the power (in watts) into the ESC/motor was also steady state.
30 minute test run |
See Also
Comments? Questions?