SMALL - espritmodel.com SMALL - Telemetry SMALL - Radio
Reply
Thread Tools
Old Feb 23, 2009, 04:10 AM
We want... Information!
Bruce Abbott's Avatar
Hastings, New Zealand
Joined Jan 2001
5,182 Posts
Discussion
Brushless rpm Sensor

Here's a circuit I developed for measuring the rpm of a brushless motor with my Wattmeter.

It consists of a passive attenuator and band-pass filter, followed by an opamp which is configured as a Schmitt Trigger. To connect to one phase of the motor, I soldered a pin onto the end of the input wire. The pin is simply pushed into any one of the ESC's motor wires.

The output is a square wave whose frequency equals the motor's commutation speed. To convert to actual rpm the frequency must be divided by the number of motor poles (ie. magnets) divided by 2. A 2 pole motor reads directly (divide by 1), whereas a 14 pole motor's output needs to be divided by 7. In my wattmeter this is set by the 'blades' parameter, which is otherwise used for measuring propeller rpm with an optical sensor.

Compared to an optical tach, this method has a number of advantages, including:-

1. No light source is required and it is unaffected by room lighting.

2. The motor's true no-load rpm can easily be measured (no reflective tape, felt pen markers or tiny sticks required!)

3. Reliable measurements can be achieved in situations where it is hard to get a good optical reading, eg. EDF installed in a snaky duct, in-flight recording.

There are a few limitations:-

1. It only works on brushless motors (you still need an optical tach for your brushed motors, glow engines, rubber powered models...).

2. You need to know the number of poles in your motor. Outrunners are usually easy to determine (just count the number of magnets around the inside of the bell). If you don't know the number of poles in an inrunner, choose the divider which gives an rpm reading most closely matching the motor's specified Kv.

3. Some controller/motor combinations may produce a lot of commutation 'hash' which can cause false rpm readings. A clean signal is usually achieved at full throttle, whereas at part throttle the PWM and backemf waveforms are harder to filter out.
Bruce Abbott is offline Find More Posts by Bruce Abbott
Reply With Quote
Sign up now
to remove ads between posts
Old Feb 23, 2009, 05:17 AM
Registered User
Almaz's Avatar
United States, IL, Chicago
Joined Nov 2006
1,693 Posts
Looks pretty nice. I remember I did something similar but without filter and op-amp. I just used the wire with resistors to read the frequency. Do you think a simple method just by using resistors will be as good as using Op-Amp? Frequency is not that high.
Almaz is offline Find More Posts by Almaz
Reply With Quote
Old Feb 23, 2009, 06:44 PM
We want... Information!
Bruce Abbott's Avatar
Hastings, New Zealand
Joined Jan 2001
5,182 Posts
It might work if your tachometer has filtering built in, but the waveform usually has spikes and noise which could cause incorrect readings. If you can't trust the measurement then there's no point taking it!

The oscillogram below shows 1-1/2 cycles at part throttle. You can see a big spike at the start of each cycle, and lots of PWM spikes.
Bruce Abbott is offline Find More Posts by Bruce Abbott
Reply With Quote
Old Feb 23, 2009, 07:10 PM
Registered User
Almaz's Avatar
United States, IL, Chicago
Joined Nov 2006
1,693 Posts
What about doing everything in software? Instead of using filter we can tell the software not to count until frequency goes above X amount to get rid of the low frequency noise. Also I can get RPM reading using average results instead of real time. Let's say from 10 reading it makes 1 average reading for RPM. I'll be using internal flash memory to log the results which should be enough for about 15-90 minutes (depends on interval and how much data will be stored) The only reason I'm asking these questions because I wanted to build simple RPM and Voltage logger with less components as possible so people can assemble one without even making PCB for it.
1 PIC
1 LDO 5v
a few resistors
1-2 caps or maybe even none.
Connector for serial port output.
Almaz is offline Find More Posts by Almaz
Last edited by Almaz; Feb 23, 2009 at 07:15 PM.
Reply With Quote
Old Feb 24, 2009, 03:13 AM
We want... Information!
Bruce Abbott's Avatar
Hastings, New Zealand
Joined Jan 2001
5,182 Posts
You can implement filtering in software, but to be effective it will probably be very CPU intensive and may interfere with other parallel tasks. The analog filter consists of just 3 resistors and 2 capacitors. At least 3 of these parts are probably required anyway, to get the signal level into a range which suits the PIC's input port.

The other function you need is a Schmitt trigger to eliminate any low level noise that gets through the filter. Some PICs have a Schmitt trigger on their external Interrupt input, in which case you just need to ensure that the signal is strong enough to reach the trigger threshold voltages (~0.2 and 0.8 x Vdd). However this is a pretty strong signal and also quite close to overloading the input, so you may need to fine-tune the input attenuator to suit different battery voltages.

If your PIC has an internal comparator then it could be configured as a Schmitt trigger, requiring only 3 external resistors (equivalent to R4,5,6 in my circuit). You might even be able to create the required hysteresis using the internal voltage reference and comparator interrupts (eg. comparator INT triggers when output goes high, reduce reference voltage, INT triggers when output goes low, increase reference voltage, etc.).

The advantage of using the comparator is that hysteresis can be made quite small, so it can handle a wide range of input signal amplitudes. The advantage of adding a few external components is that it makes the software design a lot simpler.
Bruce Abbott is offline Find More Posts by Bruce Abbott
Last edited by Bruce Abbott; Feb 24, 2009 at 03:23 AM. Reason: speling!
Reply With Quote
Old Feb 24, 2009, 06:44 PM
Registered User
Joined Nov 2007
892 Posts
The MC33039 part from On Semiconductor www.onsemi.com is designed to measure the RPM and output a voltage proportional to RPM. This part along with the MC33035 makes a control system for closed loop RPM control. See the AN1046D application note fron On Semi.
It is interesting that neither part has a micro, both are pure logic modules.

It appears that the MC33035 part with power FETs or IGBT's would be enough to control any size of sensored BLDC motors in open loop mode (no RPM control).
mjsas is offline Find More Posts by mjsas
Reply With Quote
Old Feb 27, 2009, 12:18 AM
Registered User
Vermont
Joined Apr 2007
352 Posts
Quote:
Originally Posted by Bruce Abbott
It might work if your tachometer has filtering built in, but the waveform usually has spikes and noise which could cause incorrect readings. If you can't trust the measurement then there's no point taking it!

The oscillogram below shows 1-1/2 cycles at part throttle. You can see a big spike at the start of each cycle, and lots of PWM spikes.
Bruce what would the filtering circuit look like? Any chance you could post a schematic? A few resistors and caps doesn't sound too complicated and it might then be easy to handle any remaining filtering with software.
Thanks.
soft2 is offline Find More Posts by soft2
Reply With Quote
Old Feb 27, 2009, 04:23 AM
We want... Information!
Bruce Abbott's Avatar
Hastings, New Zealand
Joined Jan 2001
5,182 Posts
In my circuit, the parts R1~R3 and C1~C2 form the attenuator and filter.
Bruce Abbott is offline Find More Posts by Bruce Abbott
Reply With Quote
Old Feb 27, 2009, 04:28 AM
Registered User
Almaz's Avatar
United States, IL, Chicago
Joined Nov 2006
1,693 Posts
From my understanding the filter blocks all the frequencies and comparator works as schmitt trigger to output only low and high voltages.
Almaz is offline Find More Posts by Almaz
Reply With Quote
Old Feb 27, 2009, 07:36 AM
Registered User
vintage1's Avatar
East Anglia, UK
Joined Sep 2002
29,703 Posts
You can do a much better filter with a high order Bessel type filter using more opamps.

The problems arise when e.g. a 12 pole motor is doing around 30k RPM..now I wouldn't normally do that, but some people do, that's a 7.2Khx commutation/RPM frequency..and if the PWM on the throttle is, itself around 8Khz, you have a problem..

Probably a 3-4 pole Bessel at around 3khz cutoff would give you a good clean sinewave at the commutation frequency and still function up to around 6-7kHz PRF..
vintage1 is offline Find More Posts by vintage1
Reply With Quote
Old Feb 27, 2009, 08:04 AM
Dieselized User
gkamysz's Avatar
Chicagoland
Joined Feb 2000
7,323 Posts
Is this how the Eagletree sensor is done?

I've measured my brushless motors with an RC filter and frequency counter for years.

Greg
gkamysz is offline Find More Posts by gkamysz
Reply With Quote
Old Mar 10, 2009, 06:38 AM
Registered User
Almaz's Avatar
United States, IL, Chicago
Joined Nov 2006
1,693 Posts
What is the formula to calculate RPMs? What I'm doing just getting the frequency out to Excel and I need to calculate formula. For example for 6 poles motor using 16bit timer, 1:1 prescaler ratio, CAPTURE mode every 16 rising edges and 8mhz crystal. Using the formula for frequency Xtal / 4 / by timer * 16 (CAPTURE mode every 16 rising edges) I get frequency output to excel now what is the formula to convert frequency to RPMs? Correct me if I'm wrong the formula should be Frequency / by number of magnets / 16 (capture mode every 16 rising edges) * 60 seconds ?
Almaz is offline Find More Posts by Almaz
Last edited by Almaz; Mar 10, 2009 at 08:45 AM.
Reply With Quote
Old Mar 10, 2009, 08:31 AM
Registered User
vintage1's Avatar
East Anglia, UK
Joined Sep 2002
29,703 Posts
I would image RPM = Hz *2 *60 /no of magnets.
vintage1 is offline Find More Posts by vintage1
Reply With Quote
Old Feb 02, 2012, 04:15 PM
Lift is cheap - Drag sucks
Tom Harper's Avatar
Socorro, NM
Joined Jul 2004
3,616 Posts
Leave out the 2 and it works:

RPM=Hz*60/#poles

or

RPM=60/(t*poles)

It also may depend on the ESC.

And if you measure t with a grounded emitter transistor, you will have to measure two periods and check to see if they are equal to avoid measuring the sense pulses.


Tom
Tom Harper is offline Find More Posts by Tom Harper
Last edited by Tom Harper; Feb 02, 2012 at 09:34 PM. Reason: dumb errors
Reply With Quote
Old Nov 21, 2012, 10:23 AM
Registered User
Joined Nov 2012
1 Posts
Can you please Explain a little about the circuit in Wattmeter http://homepages.paradise.net.nz/bha...wattmeter.html

1) In circuit diagram for PIC16f88, what are the probes +-SOURCE & +-LOAD how to connect this circuit with our BLDC motor controller.
2) In circuit diagram for Brushless RPM sensor, explain the connectivity of the probes.

Please do reply..
Thanks.
ElektroLearner is offline Find More Posts by ElektroLearner
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Brushless RPM Sensor/Tach from Eagle Tree Systems, LLC billpa Eagle Tree Systems 57 Apr 24, 2009 10:19 AM
Sold Eagle Tree eLogger V3 + Brushless RPM sensor oh_my_god Aircraft - General - Miscellaneous (FS/W) 4 Jun 05, 2008 09:31 PM
Question Brushless RPM Sensor Accuracy SpeedVision Eagle Tree Systems 13 May 06, 2008 07:04 PM
Discussion Brushless RPM Sensor FAQ billpa Eagle Tree Systems 0 Mar 05, 2008 08:47 PM
Discussion Brushless RPM Sensor/Tach from Eagle Tree Systems, LLC billpa Product Announcements 13 Dec 28, 2006 03:50 PM