Showing posts with label Difficult. Show all posts
Showing posts with label Difficult. Show all posts

18 March 2015

Engine Temperature Display circuit for motorbike or car

3 Digit Engine or Engine oil Temperature monitor

For long way touring motorbikes, the engine or engine oil temperature monitor is a must have add-on. As temperature increases, biker can control the engine temperature by decreasing accelerator or stop for few hours, That may helps in engine seizure. So lets get started.

Circuit diagram


Components


    lm35-pin details
  • IC1:PIC16F684
  • J1 connector to LM35
  • R1 to R3: 1K ohm
  • R4 to R10: 330 or 470 Ohm
  • D1: 5V1 Zener diode.
  • T1 to T3: BC547
  • DIS1 to DIS3: Common cathode 7 Segment display.

Description

The PIC microcontroller's RA0/AN0 pin is set to analog input. LM35 temperature will gives 0.01V for 1'C so for 20'C=0.20V. this voltage is fed to the ADC of PIC, the 10-bit ADC output is converted into Celsius form and distribute them to 3 7 segment displays
ADC to integer form converson (10 bit): ((adc_i/P)*500)/1023;

PCB, Project files & HEX file



I have tried my best to provide all the information, if you feel difficulty, Ask me for anything


16 March 2015

3 digit battery voltmeter (0 to 20VDC) for cars and motorbike

voltmeter

Easy and Simple Voltmeter Circuit

In every automobile info cluster, everyone needs to know about their battery status, some cars/motorbikes having that features but i don't think they all are showing in volts. some times we need to know about battery charging voltage for overcharging, over draining etc. it will helps user to troubleshoot their electrical systems as well.

Circuit:

voltmeter circuit

The Above figure is circuit of voltmeter, I have used bus over there (blue color) to simplify the work.
  • Note: Before connecting high voltage to the network, Make sure of configuration of input voltage divider network (ADC input pin connection) they are R12,R14,R14. After confirming voltage at the junction of R13 & R14 is < =5.1V, connect to microcontroller input.

Components: (some components in circuit diagram is not same as real parts)

  • IC1:PIC16F684
  • IC2: 7805 (I recommend Filtered voltage regulator circuit)
  • R1,R2,R3: 1K Ohm.
  • R5 to R11: 330Ohm or 470Ohm.
  • D1:5V zener diode.
  • T1,T2,T3: BC547
  • DIS1,2,3: Common cathode 7 segment display.

Description:

This voltmeter can show voltage from 0.1V to 20.0V
The battery voltage is fed to the resistor voltage divider network to reduce voltage for 20V range to 5V range. That reduced voltage to the ADC of PIC microcontroller. the controller will convert ADC Hex value and show them in multiplexed 3 digit 7 segment display.

PCB,Project files and .HEX files


Arduino sketch and circuits are coming soon...

I tried my best to simplify and provide all the information, If you feel problem in any ask me for solutions.



08 March 2015

Revealing of Digital RPM meter Technique


The digital RPM meter calculates Revolution of piston or flywheel. The technique behind this is CCP (Capture and Compare) and Pulse width.
This is give away of "MMD ramper" secrets ;-)

INPUT:

  • All motorbike or Car engine is provided with fry-wheel with pulsar coil to activate spark plugs. these pulses can be taken for RPM reading.
  • The spark plug sensor can also be applied, but the problem is unwanted high level spike and distortions, and also not that accurate as previous method

CCP: 

This includes 3 modules in microcontrollers they are, Capture and compare/ PWM/PPM, we need only Capture and compare here.
Capture and compare the name itself says capturing pulse and comparing them, This module takes pulses as input. If one pulse occurs, the timer will starts for either rising edge of pulse or falling edge (whatever programmer specified) and waits for another pulse to occur, after second pulses specified edge it gives the timer outputs in form of bits ( say timer of 16 bits it gives output like 65535-lapsed bits). That means you got period (1/frequency) of pulse.

Conversion:

Got pulse frequency in bits form for calculations

Actual formula

f = clock(32MHZ)/(8(prescaler)*(65536-timer value))

My formula by trial and error:




Pulse:

I have differentiated pulse pattrns for motorbike and car,
  • For motorbike
    • 4 stroke: you will get 1 pulse per 2 rotation of fly-wheel 
    • 2 stroke: 1 pulse per 1 rotation
  • But car having 2 to 4 pistons (cylinders), 
    • Car with 2 cylinders (cylinders) gives pulses same as 4 stroke motorbike.
    • Car with 4 cylinders will give 2 pulses per 1 rotation.

Sensor circuit




Output

You can get output in forms of 7 segment, Alphanumeric LCD or even led graph.

My suggestion:
PIC18F26k22 (40 pin)
2 - 7 segment display (not multiplexed) with 13 LED bargraph.


RPM meter working video


Happy Programming,

Correct me if i'm wrong,

sources:
  • http://www.microcontrollerboard.com/pic-timer1-tutorial.html
  • http://www.mikroe.com/chapters/view/53/chapter-5-input-capture/
  • http://www.mikroe.com/chapters/view/6/chapter-5-ccp-modules/