Dear all,
I've build a tachometer which reads RPM on the Arduino's serial monitor. The RPM I need to measure are between 200 / 600 RPM and I get an impulse for every turn of the wheel as I have a single magnet positioned.
I'm using a NJK 5001 PNP sensor but I'm facing an issue.
To power the wheel I'm using a three phase electric motor of 18kW and I'm facing extreme magnetic interference with the Arduino while reading RPM.
I've now used a shielded cable between the sensor and Arduino and things got way better but sometimes the RPM still drops randomly for 1/2 seconds before getting back to the "normal/expected" RPM.
I'm using an arduino micro on pin 7 with the attachToInterrupt and I've wired the hall sensor directly to PIN 7, is there any pull up or pull down resistors I should use? Any resistor value to suggest? or any extra components you would add to make the system more stable?
If problem is wiring you could ground your shielding, keep wires short and far away from power wires.
Also you can add pull down/up (depending if your sensor is no or nc).
Also you could change no sensor(if that's what you have) to nc sensor and change interrupt to falling.
But first make sure that your interrupt code is not causing problems.
For the PNP model you should connect a 1K between the Arduino pin and GND
Connect the cable shield to Arduino GND do not connect the other end of the shield.
If you still have problems you may need to use a higher voltage.
I did, around 150/ 200 RPM the readings are accurate but when going faster then 200/250RPM since more current is absorbed by the motor the RPM readings start to be incorrect
Hello thanks for your help! I've already connected the cable shield to the Arduino GND on one end but also to the sensor's GND on the other end, you suggest I only keep the Arduino's GND connected to the shielding?
Also, how could I use higher voltages if Arduino only reads max of 5v? Could I try with a resistor voltage divider?
You read the Hall sensor. Feed it 5V, get back <= 5V.
A grounded piece of steel steel will soak loads of field. A hole in that will let some through though how big the hole would need to be depends on the magnet on one side and sensor on the other.
You can in essence shield the sensor from noise that way.
i'm working on a engine dynamometer an had the exact same problem. the fix for me was to raise the baud rate and also i ran the sensor ground to the arduino, i ran a separate ground from the arduino to the motor and connected the shielding to that same spot. and on the sensor side the shielding was connected to the body when was mounted indirectly to the motor so that grounded that side. all problems solved.