Netherlands
Offline
Sr. Member
Karma: 0
Posts: 414
|
 |
« Reply #15 on: August 22, 2007, 04:19:54 am » |
IC, but brushless motors work very differently then the motor used in fans: http://en.wikipedia.org/wiki/Brushless_motorAnyone that can say if it would be possible to measure rpm for brushless motors as described in the link above (using 3 wires)?
|
|
|
|
« Last Edit: August 22, 2007, 04:20:33 am by jds »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 36
Arduino rocks
|
 |
« Reply #16 on: August 22, 2007, 10:29:02 am » |
From the wiki article: Consumer devices such as computer hard drives, CD/DVD players, and PC cooling fans use BLDC motors almost exclusively. The picture they have of the coils is from a PC fan as well. The third wire I was using was from the hall effect sensor to measure rpm (used in brushless motors to control 'firing'). It sends a pulse twice every rotation on the third wire.
|
|
|
|
|
Logged
|
|
|
|
|
Netherlands
Offline
Sr. Member
Karma: 0
Posts: 414
|
 |
« Reply #17 on: August 22, 2007, 03:35:50 pm » |
Ok, point taken, but I want to use it with motors used in model aircraft and those motors don't use 1 wire for sensor. All 3 wires are used to turn the motor.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 221
|
 |
« Reply #18 on: August 22, 2007, 04:55:56 pm » |
Ok, point taken, but I want to use it with motors used in model aircraft and those motors don't use 1 wire for sensor. All 3 wires are used to turn the motor. Ha I'm trying to do the same thing. The model airplane motors are synchronous, so the motor controller must know the RPM of the motor through the three wires. It should be possible to find the RPM by checking the pulses on the wires, since that's what controls the motor speed. Wouldn't it be easier to check the RPM with a photo interrupter or a small magnet on the shaft and a hall effect switch? -Z-
|
|
|
|
|
Logged
|
|
|
|
|
Netherlands
Offline
Sr. Member
Karma: 0
Posts: 414
|
 |
« Reply #19 on: August 24, 2007, 07:55:03 am » |
I have been thinking about this a little more and came up with this idea: I think you only have to count pulses on one of the wires. Since there are 3 wires, you can multiply the pulses on one wire and multiply them by 3.
Edit: Now, how to tap into one of the wires. We are talking about 3-20 (and in some cases even more) volts and sometimes high amps.
|
|
|
|
« Last Edit: August 24, 2007, 07:57:37 am by jds »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 6
Arduino rocks
|
 |
« Reply #20 on: January 30, 2009, 06:31:42 pm » |
just thought i would check in to see if any one made progress towards measuring rpm through the pulses.. i am trying to measure RPM's on a mode car using arduino... but the code posted before does not seem to give consistent rpm output...
i am using novak gtb ESC with 7.4v lipo batter to power a 3.5r brushless motor...
any thoughts?
Thank you!
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 8
Arduino rocks
|
 |
« Reply #21 on: March 01, 2009, 02:54:34 pm » |
Can someone please post how to connect the RPM wire properly to an arduino duemilanove. I have seen some fuzzy pictures that show a resistor and a led but no description of how to connect them to the arduino. I want to try and get a fan to act as a POV like the harddrive POV. thanks demir57
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 0
Posts: 221
|
 |
« Reply #22 on: March 01, 2009, 07:31:32 pm » |
The 10K is a pull up (or down?) resistor, you connect it from the RPM pin to either the positive or negative wire, I can't remember. The LED is just there to show something is happening, you don't need it. The RPM pin goes to interrupt pin on the arduino.
-Z-
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 25
Arduino rocks
|
 |
« Reply #23 on: June 01, 2010, 06:41:45 pm » |
I can not get this to work. I have tried 4 different fans including a CPU fan I know has a working RPM sensor. As it is right now the arduino is just printing random RPM numbers out to the serial console. I can stop the fan with my fingers and nothing changes. Disconnecting the fan all together from the arduino makes no change in the serial output. Here is how I have tings wired up.  And this is the sketch I am using. (found on page 1 of this thread) volatile byte NbTopsFan; int hallsensor = 2;
void rpm() { NbTopsFan++; }
/***************************************/ void setup() { // pinMode(hallsensor, INPUT); Serial.begin(9600); attachInterrupt(0, rpm, RISING); };
void loop () { NbTopsFan = 0; delay (1000); NbTopsFan = NbTopsFan * 30; Serial.print (" "); Serial.print (NbTopsFan, DEC); Serial.print (" rpm");
};
|
|
|
|
« Last Edit: June 02, 2010, 06:29:35 pm by TheMakersWorkbench »
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15316
Measurement changes behavior
|
 |
« Reply #24 on: June 01, 2010, 07:26:29 pm » |
Here is how I have tings wired up. Your drawing shows only a single wire going to the RPM sensor. A circuit requires two wires to make a complete circuit path. You need to wire the circuit common (sometimes called ground) of the fan sensor assembly to a Arduino ground pin. Think of wiring a simple lamp to a single cell battery, can you do it with just one wire? Lefty
|
|
|
|
« Last Edit: June 01, 2010, 07:28:08 pm by retrolefty »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 25
Arduino rocks
|
 |
« Reply #25 on: June 01, 2010, 07:54:23 pm » |
So I need to wire the ground wire from the fan to the arduino ground? Damn how did I not see that.
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15316
Measurement changes behavior
|
 |
« Reply #26 on: June 01, 2010, 08:12:13 pm » |
darn how did I not see that. Ah, it comes with experiance grasshopper. 
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 25
Arduino rocks
|
 |
« Reply #27 on: June 01, 2010, 08:27:20 pm » |
Thanks for the help!
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
The Netherlands
Offline
Sr. Member
Karma: 1
Posts: 287
don't panic...
|
 |
« Reply #28 on: June 02, 2010, 03:57:03 am » |
Just remember that when you want to PWM the pc-fan as well the story changes.
I'm playing with the TOVn interrupt (Interrupt on Bottom) to time when to detect a rising or falling edge on the rpm wire. That is; check if the rpm wire is high/low when there is a high on the pwm pin.
This works fairly well for rpm's above 1000 upto 11000 (didn't test any higher) Problem is with lower rpm's. The rpm signal doesn't go low enough to sense a low on the arduino.
Hope this helps a little. For a different explanation just ask. The English speaking part of my brain is a bit slow today.
Jeroen
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 25
Arduino rocks
|
 |
« Reply #29 on: June 02, 2010, 05:07:05 pm » |
Ok I connected the fans ground to one of the arduinos ground pins and I am still getting noting but random rmp numbers. Did I connect the resistor wrong? Does the sketch look right? This is how I have it wired currently. and the code volatile byte NbTopsFan; int hallsensor = 2;
void rpm() { NbTopsFan++; }
/***************************************/ void setup() { // pinMode(hallsensor, INPUT); Serial.begin(9600); attachInterrupt(0, rpm, RISING); };
void loop () { NbTopsFan = 0; delay (1000); NbTopsFan = NbTopsFan * 30; Serial.print (" "); Serial.print (NbTopsFan, DEC); Serial.print (" rpm");
};
|
|
|
|
« Last Edit: June 02, 2010, 06:56:31 pm by TheMakersWorkbench »
|
Logged
|
|
|
|
|
|