Building engine RPM sensor

Thread Starter

gigakristjan

Joined Oct 19, 2010
5
Hy!

My name is Chris and i'm 15 years old. I have a motorcycle and it don't have RPM sensor. I'm curious anyway about microcontollers and electronics, so i decided to make on. Since my Physics is 5+ in the school and i've been working with LED's, soldering and general electronics repairing, i thought this can't be hard... well, i thought wrong. I've been searching for a few days from google about PIC's and microcontrollers, and how to write data on to them, and haven't found much.

Basicly, i want Microcontroller to calculate my RPM from impulses from my engine's coil(each impulse means that engine made 1 revolution). So, PIC/aTmel gets around 20,000Volts Per 1mS, depends on RPM. I want that microcontroller measures how many times it gets impulses in 100ms and calculates my RPM and sends it to LCD.

Can you guys please give me advice how to learn about PIC's, how to connect them to PC etc etc, basic stuff in other words. Oh, and i have 20 pin aTmel AT8902051, can i use it in my project? I know that my English isn't good, thats becouse i'm kinda foreign. ;)

Little scheme about my RPM idea:



Thank you,
Chris :)
 

Thread Starter

gigakristjan

Joined Oct 19, 2010
5
Can't i just make the PIC connecting board and connect it to the computer, write the data and done? Isn't there some general guide for that?
 

Thread Starter

gigakristjan

Joined Oct 19, 2010
5
Oh, sorry. I want to make a board to connect PIC/aTmel to PC, and I want some guide and program to write on the PIC/aTmel. That's it, i guess :) I have already aTmel AT89C2051, can i use this in my RPM project?
 

Kermit2

Joined Feb 5, 2010
4,162
It is most certainly 'do-able'. Yes you can use that chip or a multitude of other similar chips.

I personally can't help much with the programming part. I only just recently got into micro's myself, with the purchase of a 'PICkit 3' programmer and a 44 pin micro-dev board. Still waiting for a project in which I can use it.

:)
 

retched

Joined Dec 5, 2009
5,207
I know that my English isn't good, thats becouse i'm kinda foreign.
Is that like kinda pregnant? ;)

AVRfreaks.com will help get some info on the atmel coding and interconnections to the PC. They have alot of the info on site.

Just use the search option for the forum.
 

DonQ

Joined May 6, 2009
321
Hy!
I want that microcontroller measures how many times it gets impulses in 100ms and calculates my RPM and sends it to LCD.
Wrong thinking. At, for example, 1000 RPM, there are 1.666 'impulses' per 100mS. Since you can't count fractional 'impulses' with a micro-controller, you will read either 1 or 2. This will bump your display back and forth between 600 and 1200 rpm. In other words, reading the number of 'impulses' in 100 mS will only give you a resolution of 600 RPM. Even reading the number in an entire second will only give you a resolution of 60 RPM.

If, instead, you read the number of microseconds per pulse, your resolution can be less than 1 RPM. Reading the number of microseconds per pulse is the sort of thing that micro-controllers are good at. You have to invert the value to get RPM (time-per-pulse inverts to pulses-per-time), but again, that is something micro-controllers are good at.

You will still have to do some things like keeping track of large numbers for low RPM (greater than 2^16), and maybe some smoothing, but that's how it goes.

Also, putting a 20,000 Volt spark straight into a micro-controller is probably not a good idea. Perhaps some signal conditioning is in order?

If it were easy, everybody would be doing it.

Some people do this by using a one-shot and driving an analog meter. This way takes about 5 parts and maybe a couple of hours to do.
 

Thread Starter

gigakristjan

Joined Oct 19, 2010
5
Soo, again, i've been searching A LOT. I will be useing DonQ method, but can you tell me please more about this signal conditioning? Also, i haven't found programmer for my aTmel. In my country, programmers cost about $50, so it's kinda expensive, so can someone please explain me how to connect my microcontroller to PC, using parallel port, RS232 or USB? Here's picture about my MC, can you tell me which pin's connect where:


And another question, do i need somekind on clock too? I read somewhere, that you need clock too to make MC work. I have another picture which shows my MC and circuitboard. I got this circuitboard form my old LED picture. It had LED's on it and if you pushed button LED's began to flash, turned off, or just worked. (Crazy sentence, i know ;) )



Thanks again, you guys made me obsessed with microcontrollers. ;)
 
Top