View previous topic :: View next topic |
Author |
Message |
Youngster Guest
|
Automatically resetting my project |
Posted: Thu Mar 31, 2005 8:10 am |
|
|
Hi,
I want to use a LM2676 with my PIC, I want the PIC to be able to reset the entire circuit by pulling the ON/OFF line of the LM2676 and giving a nice 4 second delayed startup (allowing things to power off and stop what would be a spike in the supply), I have a 5.1v voltage limiting diode on my DC input line (8v-40v) and I'm using a RC combination to create the delay. I have tried to draw it below but I don't know what it will look like when posted
I'm young and new to electronics but you lot appear to be gods on just about everything so I hope you can help, please feel free to comment as I'm not even sure the a self-resetting project is even feasible.
VCC----+-------------------------------------
/ RESET output from PIC
\ 1k |
/ |
+-----------
| |
___ ___
/\ 5.1v ___ 100uf
| |
| +---------------ON/OFF of LM2676
| |
| /
| \ 300K
| /
| |
GND------------------- |
|
|
Youngster Guest
|
Well that answers that. |
Posted: Thu Mar 31, 2005 8:12 am |
|
|
Look like my little diagram didn't work. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Mar 31, 2005 8:17 am |
|
|
Use the code button and it will keep the formatting |
|
|
Youngster Guest
|
Thanks for tip |
Posted: Thu Mar 31, 2005 10:02 am |
|
|
Here it is again...
Code: |
VCC----+-------------------------------------
/
\ 1k
/
+------------ +
| |
___ ___
/\ 5.1v ___ 100uf
| |
| +-----------+----ON/OFF of LM2676
| | |
| / |
| \ 300K RESET output from PIC
| /
| |
GND--------+------------+
|
|
|
|
Youngster Guest
|
Update to diagram |
Posted: Thu Mar 31, 2005 1:50 pm |
|
|
When I say RESET pin I mean just an I/O pin not the actual reset pin on the PIC |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Thu Mar 31, 2005 3:15 pm |
|
|
I don't quite understand what you want to do. Does the LM2767 supply the VCC, or does it regulate from the VCC to supply something else?
Do you want the PIC to be able to cut its own supply, and come back four seconds later when the RC decays?
The LM2676 sources about 45uA from the On/Off pin. With a 300k load it will ramp up to over 5V. The protection diodes on the PIC will have to clamp this current. That is within their spec, but not usually considered good practice. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
Youngster Guest
|
Sorry. |
Posted: Thu Mar 31, 2005 5:35 pm |
|
|
Sorry I didn't explain properly and made a mistake in the diagram, VCC should read +8v-40v (battery supply)
So, yes the PIC cuts it's own supply and comes back on 4 seconds later (this is to allow other hardware to reset also) I'm probably being over the top with four seconds but its a start value. After the PIC resets it's self by pulling the ON/OFF low the C charges back up over a four second period and powers the circuit once more.
Have I made some reall idiots mistakes, is that why it looks wrong?
Thanks for your help |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Fri Apr 01, 2005 9:22 am |
|
|
You will need to swap your cap and resistor in your RC network. After charging, the ON/OFF line will be low, as currently configured, and will cause the supply to turn off again. You will need to verify the status of the pin on the PIC. Look at the data sheet for the particular PIC you will be using. It should tell you how it should be configured on power-up, the pin that is, because you don't want the PIC resetting the regulator as soon as it starts running.
This seems a bit unconventional, having the PIC kill it's own power. I might have the PIC controlling the power to the rest of the circuit and then, if needed, have the code issue a reset_cpu() command to get the PIC started fresh again.
Ronald |
|
|
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Fri Apr 01, 2005 9:28 am |
|
|
Code: |
Vin--------------------------------------
| |
| _|_ _____________TO ON/OFF (PIN7)
/ REED | | |
3M3 \ RELAY | | °\ NORMAL
/ |_| ° CLOSED
| | |
| NPN / |
|---------| |
| \ |
___ | |
___ 10uF | |
| | |
| | |
Gnd---------------------------------------
|
If what you want is a power-up delay of n seconds, using a PIC will be more
dificult than using discrete components. Your proposal is a trivial task for a PIC that
can de acomplished using a single NPN transistor, an RC delay and a reed relay.
Feed this circuit directly from the unregulated Vin, wire the RC in the base circuit and
conect the reed relay coils in the collector circuit.
At power up the transistor is in OFF state so the NORMAL CLOSED contact of the
Reed Relay keep grounded the LM2676 ON/OFF pin wich will go to OFF state.
Once the voltage acumulated in the capacitor reach the switch on condition
of the transistor, the relays contacts open and the LM2676 will start running again.
Hope this help you.
Humberto |
|
|
Youngster Guest
|
Oops |
Posted: Fri Apr 01, 2005 4:30 pm |
|
|
Thanks rnielsen you are correct I did the diagram wrong, it's hard trying to express your thoughts on a forum isn't it!
Code: |
VCC----+-------------------------------------
/
\ 1k
/
+------------ +
| |
___ \
/\ 5.1v / 600k
| \
| /
| |
| +-----------+----ON/OFF of LM2676
| | |
| ___ |
| ___ 100uf RESET output from PIC
| |
| |
GND--------+------------+
|
So now this looks better I am going to check the PIN on the PIC, the reason for doing it this way is I do want to be able to reset the circuit but I don't want to add another regulator for the PIC and have all that supply curcuit involved in this, I could use a R and D to make a dirty 5v but I think in a car this would not suffice (pelase comment anyone), so everything is supplied via the LM2676, and yes it resets itself.
Thanks everyone for your help so far. |
|
|
|