Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 18th October 2006, 02:30 PM   #1
Default New to PICs

Hi All.

I've just discovered PIC Micros. Aren't they great!

Now I'm trying to use them for something practical, like a tachometer to connect to my motorbike. I can easily handle all the programming/maths and the LCD circuity is readily available on the internet.

I'm stuck at how to get the ignition pulses from the motorcycle which is 12v into the PIC which is 5v. Sorry if this is a really silly question.

Cheers Rik.
quickrik is offline  
Old 19th October 2006, 05:04 AM   #2
Default

most folks I know that have done this kind of stuff, use an opamp precision rectifier and buffer for the input and a ferrite clamp on transformer for the plug lead to sense the spark...
tunedwolf is offline  
Old 19th October 2006, 05:37 AM   #3
Default

Lots of ways to do this:
- opamp as wolf said. use a schmitt trigger as the buffer.
- resistive divider with a low pass filter into a schmitt trigger.
- NPN as an emitter follower, a low pass filter, schmitt trigger


what is the source of your 12V ignition pulses? If it is truely just a 12V pulse train, I'd probably use the divider/filter/ST

schmitt trigger is for cleaning up the pulse and avoiding noise induced pulses. you could use a comparator as an ST if you want.

note that low pass at 2-3X your max pulse frequency is important as noise can wreak havoc on a frequency counter.
philba is offline  
Old 19th October 2006, 08:58 AM   #4
Default

Most bikes these days already have a digital instruments, fed from the ECU, so although I haven't scoped it (I don't have a ocilloscope) I'm fairly sure it will be a good clean pulse, just 12v.

I afraid to admit my knowledge of electronics is really basic so I'd really appreciate a diagram and part numbers.
quickrik is offline  
Old 19th October 2006, 09:56 AM   #5
Default

If it's a clean 12V squarewave (personally i would advice checking with a scope though), you can simply feed it directly to a PIC pin via a current limiting series resistor (try 10K or 22K), the protection diodes on the PIC will clamp it to 5V. Ensure you choose a pin with the protection diodes though, consult the datasheet to check.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 19th October 2006, 04:34 PM   #6
Default

even if its clean, I'd still use a lowpass and schmitt trigger. cheap insurance in a rather dirty environment. also, pay attention to the power supply. I'd use a diode inline before the voltage regulator to prevent battery reversal damage.
philba is offline  
Old 20th October 2006, 02:34 AM   #7
Default

The last implementation of this kind of thing I have seen, was on a Go-Kart

The problem area turned out to be massive noise injected into the power supply from the engine and various inductive loads etc
The eventual cure was to power the circuit from a good quality dc-dc convertor and use a seperate amplifier for the pick-up with an optocoupler in the input of the meter board. All sorts had been tried to cure the problem, like ferrites, chokes etc etc, all had little effect because of the varying nature and harmonics in the noise. So the first thing I would do if I were you, is check the cleanliness of what you are going to power it from...

As you say, most of the modern bikes now have digital instrumentation, but unless it actually has a tacho that you are going to replace, you won't find anything to use that is straightforward in the ECU other than the odometer ticker, and that's driven off the gearbox and of no use for a tacho.
If you are lucky, perhaps your bike either has a tacho fitted, or can be as an optional upgrade, in which case you may be in luck
tunedwolf is offline  
Reply

Tags
pics

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Linking PICS GatorGuy Micro Controllers 18 22nd June 2005 04:31 PM
Where to buy PICs in the UK?? 2camjohn Micro Controllers 1 7th March 2005 07:01 PM
PIC Programmer with 18F PICs Timmymna Micro Controllers 5 22nd October 2004 01:44 PM
I am interested in PiCs but dont know much about them cubdh23 Micro Controllers 2 10th July 2004 08:07 AM
progam low voltage PICs and programo on board juanchute Micro Controllers 8 13th August 2003 04:56 PM



All times are GMT. The time now is 09:34 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker