Need help with my winter project.
It's a error check/monitor/diag tool for my old Willys Jeep -56.
The set up are:
Fuel pressure (Pressure Transducer)
Oil Pressure (Pressure Transducer)
Charging (Voltage divider)
and Engine RPM (Hal effect senor & magnet).
As for now it will be shown on serial.
Fuel/Oil Pressure and the Charging will/can be checked a few times a second....
But when it comes to add in RPM I'm a bit lost because that needs to be read over time to get the RPM value.
so my guess I need interrupts for checking the sensors ?!?!?
And I have no clue how interrupts works never used it in any of my small programs i have been doing.
Up to now I have been doing small programs that reads a senor or 2
But when it comes to add in RPM I'm a bit lost because that needs to be read over time to get the RPM value.
Why? If I whack you upside the head twice, can you determine the frequency (number of times per minute) I am whacking you? What do you need to know to determine that?
so my guess I need interrupts for checking the sensors ?!?!?
Only the hall effect sensor.
Up to now I have been doing small programs that reads a senor or 2
How did you connect the senor to the Arduino? Duct tape?
RPM can be measured two different ways depending on update speed and rpm of the device - for slow things, measuring the time between revolutions (or parts of a revolution if you have multiple pulses per revolution). For something like a car engine, counting revolutions for a period of time is fine - you don't need to do a minute - for example, 600 RPM is 10 revolutions/second - multiply by 60 to get correct display. As for using interrupts, start by checking out the "blink without delay" tutorial. The problem with simple programs using the "delay()" function is it does that by spinning in a tight loop and not bothering to listen to anything else which means you promptly ignore other inputs. It is much better to have a timer interrupt you can use for delay counters running off interrupts so other things get worked at the same time. Do NOT put things like print statements inside an interrupt service routine (ISR) or you will hang the whole works up