Rpm hall effect sensor 3144


try to measure rpm of an bldc with that patch and using a Hall effect sensor 3144:

I measure the time of one revolution (exampel - 0,135sec) Then I devide 1sec/0,135sec so I get a value of ~7,40 revolution per sec, multiply that by 60 I got 444rpm so far. (Node greater 15 is to get less values). But that patch woks not so fine as expacted.
When the speed increases I get unclean values; like you can hear that the rpm increase but the values decrease. I also found a great exampel from adruino IDE but it’s not easy to rebuild that in xod. There is an interrupt with rising, I do not have any idea howe to solve that in xod. Maybe anyone of you guys have an idea?

example Ardu IDE:

//project done by www.theorycircuit.com
//code by Crenn from http://thebestcasescenario.com thank you!
//Varibles used for calculations
int NbTopsFan; int Calc;

//The pin location of the sensor
int hallsensor = 2; typedef struct{

//Defines the structure for multiple fans and
//their dividers
char fantype;
unsigned int fandiv; }fanspec;

//Definitions of the fans
//This is the varible used to select the fan and it’s divider,
//set 1 for unipole hall effect sensor
//and 2 for bipole hall effect sensor
fanspec fanspace[3]={{0,1},{1,2},{2,8}}; char fan = 1;

void rpm ()
//This is the function that the interupt calls
{ NbTopsFan++; }

//This is the setup function where the serial port is initialised,
//and the interrupt is attached
void setup()
{ pinMode(hallsensor, INPUT);
attachInterrupt(0, rpm, RISING); }

void loop ()
//Set NbTops to 0 ready for calculations
{ NbTopsFan = 0;

//Enables interrupts

//Wait 1 second
delay (1000);

//Disable interrupts

//Times NbTopsFan (which is apprioxiamately the fequency the fan
//is spinning at) by 60 seconds before dividing by the fan’s divider
Calc = ((NbTopsFan * 60)/fanspace[fan].fandiv);

//Prints the number calculated above
Serial.print (Calc, DEC);

//Prints " rpm" and a new line
Serial.print (" rpm\r\n");

1 Like

I use flow meters with hall effect sensors in them using a 16 bit ADC along with a module that converts the pulse from the flow meter to an analog output. Calibrating it is time consuming, but once that’s done it’s easy and repeatable. Typically the digital output from the ADC is non linear, so you have to plot points and generate a polynomial to the 3rd order in excel. I’ve attached the circuit and PCB image, it’s based on the LM331 IC. If you are interested in the module I can send you more information. I order them from Easyeda. The 16 bit ADC node is in the library.