I assume you've seen this then, since you've searched quite hard, but just in case : My "shutdown controller" circuit
I have been searching high and low for a circuit diagram that does something similar to Jeff's shutdown controller - but without any luck...
Does anyone have a circuit diagram so I can "roll my own"
Its much easier to adopt the ITPS shutdown controller based in PIC 12C508, if you have a programmer that is. Ill say its cheaper too.
cool stuff aultl.
Are you rewriting the PIC code?
I done my PIC 12F675 coding, Im just having abit of problem with the "LOW BAT" sensor.
Heres a summary :
The PIC will wait for the IGNITION to come on for atleast 1 sec. Check if PC is already on, if not on then wait 1 sec, turn RELAY on, wait 1 sec then push PCBUTTON.
I thought its important the controller knows that the PC is already on since you may want to refuel and have left the PC on...otherwise your controller will turn off the PC when you wanted it on...this can happen on most controller since theres noway of knowing the PC is already on.
With the car running, the controller will look for IGNTION and must stay off for 30 sec before pushing the PCBUTTON. It will then look if the PC has shutdown, if it has then the RELAY will goes off after 1 sec. If the PC didnt shutdown after 3 mins then it may have locked up, this then just cut the relay off and set an error code.
If the PC is already off then just cut the power...the user might have already switch the PC off before turning the ignition off. I wanted this feature as I might not need the PC on while driving.
When refuelling or you gonna be away for lets say 1 hour, you can initiate a 1 hour before shutdown by leaving the key in ACC for 1 sec before turning the IGNITION off completely...I guess a lot of people want this feature. A normal 30 sec before shutdown will just require you to turn the car off quickly. Useful if you stall the car as some poeple tend to switch off the car completly before recranking the car. I may change this to indefinite on until the battery goes low.
If your battery goes low then the controller will shutdown your PC and set an error code.
I also included an INDICATOR LED, the function is :
Flash every 1 sec on shutdown countdown.
Stays on when the controller has already push the PCBUTTON and just waiting for the PC to goes off.
Flash evey 2 sec when the 1 hour before shutdown is initiated.
Flash the SHUTDOWNLOCKUP and LOWBAT error codes, at different speed of course.
All in all the PIC code is working, it just need some optimising. I may also convert the code for 12C508 and use a separate LOWBAT detector.
Any feedback will be appreciated
No. Well, maybe. It has been 7 years since I wrote any kind of Assembly language.Originally Posted by Ricky327
How are you going to determine if the pc is on? Since mine will be in the same case I would probably build a simple current sensor on the power led or just connect the power led to one of the other inputs and use this to tell the pic when the PC is on. Of course this means reprogramming the PIC. This also breaks if you set your pc to hibernate as I believe the power LED stays on.Originally Posted by Ricky327
How are you going to display the error code? Have the PIC set a different output to make a amber LED come on and stay on? Then attach a momentary switch to another input to reset the error LED. Just make sure you add up all the inputs and outputs you are going to use as that PIC has 14 input/output pins and five are already in use leaving 9 left. I just suggested using two more making 7 pins left.Originally Posted by Ricky327
This will not work without a lot of thought/programming. You would have to monitor the battery as well as the ignition line so you would know when just the ignition is on (Batt = 12V, IGN=12v), if the car is running (BATT=13.8V, IGN=12V), or if the car is off (BATT=12V, IGN=0V). You would also have to account for the battery being old/low and while cranking when the battery drops to 10V.Originally Posted by Ricky327
Again this would require the aforementioned battery monitor. Also the error display/LED would have to be powered by some other source. If your battery dies then the power to the circuit will die losing the error code state.Originally Posted by Ricky327
This would just be a matter of adjusting the PIC code and using the existing status LED or using the aforementioned Error LED, or perhaps both.Originally Posted by Ricky327
I hope this is enough . I am by no means saying this is impossible because that word does not exist in my vocabulary, I am just thinking it will take some time to implement. And I am sure you would have a lot of people from this board wanting one when you get it finished. Let me know if you need any more feedback. I have a Bachelors Degree in Electronics, however I have not used my electronics knowledge since I graduated, I when straight into the computer field and have been there ever since.Originally Posted by Ricky327
Status: [20%] - Aquiring parts
Thanks for the feedback aultl
How are you going to determine if the pc is on?
Ill be using the POWER LED of the PC, yes true they do flash. For its state to become valid it must stay off for more than 2 secs before the s/w consider it as off. A flashing LED is still considered as a PC being on. The testing are all done by s/w of course. I believe the LED may flash differently for different PC, its probably safer to use the USB power, infact anything with a "HIGH" when the PC is on is fine to use.
How are you going to display the error code?
By having an INDICATOR LED, a rapid flash means a shutdown lockup error has occured, a very slow flash means the pc was shutdown due to low battery...atleast you already know you have a low battery. Since theres only one LED, the low battery have the priority being displayed as an error. The error is cleared when you restart the engine. I know what you are saying about having different LED, but I wanna make everything simple...infact I only got 6 I/O on the PIC (12F675) ...im already 1 short something else can be done though yes I think multicolour LED is a good idea, Ill rather have that than 2 LED.
This will not work without a lot of thought/programming. You would have to monitor the battery as well as the ignition line so you would know when just the ignition is on (Batt = 12V, IGN=12v), if the car is running (BATT=13.8V, IGN=12V), or if the car is off (BATT=12V, IGN=0V). You would also have to account for the battery being old/low and while cranking when the battery drops to 10V.
This is where I havent decided yet, because my target is to burn on 12C508 Ill use a voltage comparator compared to a "lowbat" voltage reference, a simple 741 perhaps. The output is then fed to the controller as a "LOWBAT". Yes you might say "so what happen during crank"? well it can be setup such that the LOWBAT must stay active for more than 1 mins before it get considered as LOWBAT, very unlikely you be cranking for 1 mins non stop.
Also the error display/LED would have to be powered by some other source.
The PIC works with a low current 5V supply, so even down to 6V through a regulator the error code can still flash. After that then I guess we wont care much about it...car wont start anyway.
This would just be a matter of adjusting the PIC code and using the existing status LED or using the aforementioned Error LED, or perhaps both
Yes the plan is to only have one LED, the error are flashed at different speed, shutdown delay flash at 1 per secs, the idefinite on keeps the LED on. I guess its a matter of taste now.
I am just thinking it will take some time to implement.
Its mostly done, it took me about 1 week to implement and think about all the other possiblity. I have done assembly programming but its my first time in PIC so im a real nooby here. Maybe theres still alot of problem as I havnt tested it live...but on the testbench everything looks fine
Once again thanks for the feedback, let me know how you get on with your home build controller.
I have a Bachelors Degree in Electronics, however I have not used my electronics knowledge since I graduated, I when straight into the computer field and have been there ever since.
Working is not really good for the brain
You are more right than you know, most of my free time I spend trying to keep up with technology, it changes really often, moore's law and all . I recently found I have ADD, which is why I am really good at computers; They seem to be the only things that move as fast as I my attention span. I should be starting on my power supply and controller after the holiday's are over. Retail during the holidays is a ****** .Originally Posted by Ricky327