I am using arduino's interrupt 0 to measure RPM of my motorcycle and using interrupt 1 to measure speed and distance
dont know why it happens that when I start my motorcycle, both the interrupt (both pins are open ) readings increases with the increase in throttle... If the engine is not running then there is no problem...
Hi,
I would suggest twisting the +ve and -ve interrupt wires around each other, I have done this in my RC Cars and its helped, easily done and worth a try.
With regards to the sensor itself, I recall seeing a suggestion to put a decoupling capacitor across the signal and ground pins on IR Receivers as a strategy to eliminate environmental noise so its possibly worth a try to put the same across your sensor to decouple any spikes coming from elsewhere on the bike - anyone care to offer a second opinion on this ?
Above you can see the home built board ...
A bunch of wires are running out of the board through that wide sleeve to a female 8 pin connector..
Of those wires there are two wires connected to Atmega's pin 4 and 5 which are the interrupts 0 and 1 respectively
One is used for measuring RPM and another is used to measure the speed with a HALL sensor..
You will notice another narrow sleeve which is the power supply for the board..When I connect the power supply to the motorcycle everything is fine, there is no noise in both the interrupts..
But as I will start the enging the interrupts will sense interrupts and show readings on the RPM and SPEED where the RPM and the Hall is not connected.. the readings even increase with the increase in throttle of the engine..
Hi,
My guess is that is Radio Frequency interference generated by pulses travelling through the motor bikes wiring, these pulses would be coming from the ignition which would be consistent with them increasing with revs.
I am not sure how your sensors work so if I can ask a stupid questions, where is the earth connection for the two interrupts ?
If they are not earthed, they will be liable to pick up any and all noise just like and arial.
As for twisting the wires, I twist any long pairs of positive and negative wires around each other, this should help to cancel any noise they pick up or emit.
Another method would be to put some shielding around that bundle of wires. As I have access to it I would get some braid from some coax cable and the ground it ONLY AT THE CIRCUIT BOARD END. You could also try some aluminum foil around the cable (wrap it with tape to insulate it from everything else) and ground it at the circuit board end.