Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

AVR tachometer

Status
Not open for further replies.

WilliamN

New Member
I did a little more research and made a few changes to the schematic, I decided to go with a maxim7219 to drive the led display, sure makes things a lot simpler. Here is the new schematic, tell me what you think.
 

Attachments

  • Tachometer_Schematic.GIF
    Tachometer_Schematic.GIF
    19.1 KB · Views: 5,768
I'll assume you've wired the Maxim part correctly. Two questions, at this point, do you really need the mega8? You can certainly use a much less sophisticated part. Second, I would put the tachometer pickup into the input capture rather than the external interrupt pin. This way, as soon as the interrupt occurs, the counter value is latched into a register. In this case, you get the time of the event rather than the time that your ISR serviced the interrupt. There are other configurations as well such as using your input to trigger the clock signal of one of the timers, using the internal prescalers, etc. One thing you should consider is how you will handle very low speed operation such that you dont get interrupts very often.
 
I agree with Crust, and also believe that the AtMega8 is overkill for such a simple application. Also, I would suggest putting a 0.1u cap from the resst pin to Gnd, and another one from the Vcc line to Gnd close to the uC.
 
Is this a tach for a car? I'm assuming this because of the opto pickup.

Assuming it's a tach for a car, 6 digits is overkill.
I don't know the AVR at all, but like someone mentioned above, you should be able to start a 16bit timer on each pulse and count the time to the next pulse. It would be simple to calibrate the rpm based on the timer value. You don't need to worry about too slow a signal, since the rpm will have a minimum value (other than zero: stopped) of about 25hz (assuming 4cyl and input is an ignition wire) when idling. The problem with this is that sample rate is as fast as the incoming pulses and the lowest digits on your display are just going to become a blur without some kind of averaging or smoothing.

Otherwise the simple schematic is about the same as what I use, except I'm using a MAX6955 chip. ..and like mentioned before, put some decoupling caps in there.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top