Some electrical signals in an engine, such as the ignition signals, change frequency in proportion to the RPM of the engine. A microcontroller, connected to a coil wrapped around an ignition wire of an engine, can be programmed to measure engine RPM by sensing the frequency of ignition pulses. Microcontrollers offer a variety of input types, flexible programming and built-in peripherals that make a microcontroller-based engine RPM circuit relatively easy to build with few external electronic components required.
- Skill level:
Things you need
- Circuit components
- Wire for coil
- Oscilloscope (optional for testing)
Build a coil circuit to sense engine ignition signals. The voltage on an ignition wire is typically too high to be directly measured by a microcontroller, which is a low voltage device. So, the ignition signals need to be sensed indirectly by induction using a coil. A coil is an inductive electrical component that can be as simple as a piece of wire coiled around the engine ignition wire. The signal produced by a coil can be conditioned by a simple circuit prior to being measured by a microcontroller. The output of the conditioning circuit is fed into the microcontroller.
Connect the coil circuit to your microcontroller. The coil circuit can be built to provide a signal to the microcontroller in the same voltage range as the microcontroller operates in. This signal will indicate a low voltage (or logic low) when the ignition wire is not active and will indicate a high voltage (or logic high) when the ignition wire is active.
Connect a display to your microcontroller. A variety of display types can be used with a microcontroller. There are LED segment displays, LCD displays and others. Some microcontrollers come with built-in display drivers, which can make interfacing to a display easy and fast. You'll need a display with enough digits to display RPM values in the range you are trying to measure.
Program the microcontroller. The microcontroller will need to monitor the input pin, count the frequency of ignition pulses and display the frequency. The microcontroller program can use an interrupt technique, where the processor is idle until it senses a change on the input pin, or a polling technique, in which the program code executes in a loop to check the pin status repeatedly. The program will need to be compiled and transferred to the microcontroller according to the manufacturer's instructions.
Test the circuit. Connect the coil circuit to an ignition wire (or a bench simulation of an ignition wire) and then power up the microcontroller circuit. Activate the engine and attempt to measure and display the RPM value. If there are problems, check the circuit and microcontroller software and retest.
Tips and warnings
- You can test your circuit on a bench by using an adjustable signal generator to generate a signal similar to that produced by the coil circuit.
- It can be easier to troubleshoot a circuit when you test it in sections. First example, test the coil circuit separately before you connect it to the microcontroller.
- Engine ignition wires can carry dangerous high voltages and/or high currents. Use caution when working around these wires and do not connect them directly to microcontroller circuits.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for