Showing posts with label LED. Show all posts
Showing posts with label LED. Show all posts

14 March 2015

LED Breathing circuit (PWM) for highpower LED, LED strip etc



LED breathing is one of the eye candy for every vehicles, LED fad in and fade out effect looks awesome with under body lighting.

We are using PIC microcontroller here, PIC12F683 is a small 8 pin circuit and having 1CCP module (PWM) in it, it wont cost too much, may be within Rs.60 (1$).we are using 1 pin for PWM output, 1 pin for button pressed feedback and another for button to vary breathing speed (delay between changing duty cycle of PWM), other 3 pins are left spare, you can use it for any other functions like blinkin.


Don't forget to get clean 5V DC power supply circuit before this

Circuit

LED PWM circuit
*The components used in this circuit diagram of same package of original components,  

 Components

IC1:PIC12F683
R1: 1K Ohm
R2: 4.7K Ohm
R3: 100 Ohm
R4: 10K Ohm
R5: 470 Ohm
T1: BC547
Q1: TIP127
Push button, LED.

PCB, Project files & .HEX files







Any problems?? Comment below


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/


Programmed LED strip strobe circuit (Multi type with 2 channels)

Mainly designed for police like light switching. This circuit works best with LED strips, High power LEDes, and also Applicable for Indicators.
Well Programmed, 3 Switchable patterns, 1 pattern includes 3 set of blink types
This circuit is made by PIC microcontroller, here I pre-programmed for 3 sets of 3 type functions, You can edit that program…
The given PCB is designed with SMD packages,The project also including schematic with normal components make PCB yourself.
This circuit is formally “MMD Blinker”, made by / made for “Mozambi Moto Digital

Schematic:


Components:

  • IC1: PIC12F675 (wrong in schematic, same package and pin-out)
  • IC2:LM7805 (wrong in schematic, same package and pin-out)
  • Resistors: 10K, 1K, 4.7K, 100 Ohm.
  • Capacitors: 0.1uF (tantalum recommended) .
  • Diodes:
    • D2:1N4007
    • D1: 5V1 Zener diode.
  • Q3,Q4: BC547
  • Q1,2: PNP high power any.

PCB layouts, Project files(Eagle & MikroC) and .HEX code


If any problems. comment below


06 March 2015

Modified 2 stage blinker circuit for LEDes and brakelight

This circuit is like an advanced version of first blinker circuit, it uses 2 astable circuits, not 2 IC. We can use 556 here. 2 Astable multivariator of Low and High frequencies are cascaded and gives good programmed pulse like 1 long pulse and 2 to 5 sort pulse (Depends upon setting).

The below circuit shows Multi-function blinker circuit

Components:

IC: U1A,U1B : LM556 (Duel timer IC)
Resistors: R1: 1.2K, R2:1K*, R3 750 Ohm, R5:220 Ohm
Pot: R4:1K Ohm, (R2:2K*)
Diode: D1,D2,D3: 1N4007.
Transistor: Q1: MJE200 or any power NPN transistor.
Capacitors: C1:100uF, C2,C4:10nF, C3:22uF.

Description:

  • The First stage multivibrator is set to 5 hz, 50% duty cycle (on off 5 times in second ;) ).
  • The second stage is a variable one. it varies from 15hz to 160hz
  • When first stage in OFF state the second stage is ON -> High only
  • When first stage is ON, The trigger circuit will activate second stage and low frequency pulses

Output graph:


PCB Layout & Project files:





If any problems, Comment below