Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] How to turn on a power supply circuit using PIC 18f452?

Status
Not open for further replies.
it was juts to see if program is running .. you can remove it ..
so, at least, what was the problem ?
 

the problem was...that i didn't connect 30V battery to relay primary coil.....
one more thing...is it necessary to MOSFET? can i use fast switching diode or a transistor?
if i can use then in what configuration i should put it? if im using transistor as in..BJT 2N2222..then how? will it affect the working of the circuit or will it work the same way...?
 

i have intefaced IR sensor instead of a switch for the above circuit. but my output LED is toggling.
1. IR remote as input signal.
2. IR sensor senses the high or low pulse and sends 0 or 1 signal to PIC.

Problem:the output shouldn't toggle when the remote button pressed. it should hold the signal either LOGIC 1 or LOGIC 0. my output led is toggling. i cannot use wireless transceiver as my tasks is to make it work with IR sensor only.
 

hello,

use a RC filter on PIC input ..
RC constante must be larger than IR Trame duration
so transform pulse into DC average .. when pulse disaperas DC average goes to Zero..
but you need to use a Trigger of schmit circuit to avoid erratic transitions.

what kind of protocole on your IR emitter RC5 ,SONY ?
better way is to decode IRC5 , reconize a code command and act on output when receinving this "special code"
example here
 

before to write or define some algirithem for you, give answers !
How do you send the IR signal ?
what kind of protocole on your IR emitter RC5 ,SONY ?
What is the reference of you IR sensor ?

how shall i write the code to hold the positive value of output?

wich output ?
it could be an output of IR sensor ..so an input for your PIC ?
or the output to drive the relay ?
show us on a schematic ..
 

Capture.JPG

its ir remote..im guessing its rc5..because its not sony. these kind of remotes sends burst signal to ir sensor...the ir sensor has a digital output..0 or 1. these are interfaced to uC and from the other pic..the output is given to relay..and the output of relay is given to lamp...relay board has its own transistor so need to worry about making the relay work as it is working efficiently...the main concern is the burst signal..i want to hold the positive value of burst signal and keep the light on...and how to turn off the light once it is off
 

hello

so, if your IR commande use RC5 protocole,
juste decode the trame and use 2 differents order : exmple UP (Realy ON) and DOWN ( relais OFF)..
you can us**broken link removed**
with very little change to adapt to your case..
and simplifie it , remove all other unused orders..and UART output..

Execution sur terminal VBRAY
Projet : IRC5_18F252.c
IRC5_18F252.c 13-04-2011
MikroC V4.60
Test Marrantz Telecommande
Device = 0 Commande = RIGHT T 0
Device = 0 Commande = RIGHT T 1
Device = 0 Commande = LEFT 0
Device = 0 Commande = DOWN T 0
Device = 0 Commande = DOWN T 1
Device = 0 Commande = UP 0
Device = 0 Commande = RIGHT T 0
Device = 0 Commande = RIGHT T 1
Device = 16 Commande = VOLUp T 2
Device = 16 Commande = VOLDow 0
Device = 0 Commande = VOLDow T 0
Device = 0 Commande = VOLDow T 1
Device = 0 Commande = VOLUp 0
Device = 0 Commande = VOLUp 1
Device = 0 Commande = DOWN T 0
Device = 0 Commande = UP 0
Device = 0 Commande = UP 1
Device = 0 Commande = DOWN T 0
Device = 0 Commande = RIGHT 0
Device = 0 Commande = RIGHT 1
Device = 16 Commande = VOLUp T 0
Device = 16 Commande = VOLUp 0
Device = 16 Commande = VOLDow T 0
Device = 16 Commande = Unknow 34 0
Device = 16 Commande = Unknow 22 T 0
Device = 16 Commande = Unknow 22 T 1
Device = 16 Commande = OK 0
 

i cannot reprogram remote firmware....but i need guidance with respect to interrupts in pic18f452...so that i can hold the positive burst signal as long as possible
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top