Rocket Timer |
If you have any questions or comments about this project or PIC's and electronics in general, please email me at cybrown@cp-tel.net More projects can be found at http://www.pasqualy.com |
Operation |
Power: The Rocket Timer connects to any 12 Volt power source via two alligator clips at the bottom of the enclosure. The power supply connection is reverse voltage protected. The power source will only need to supply less than 100ma during normal operation but there is a large current draw during ignition of the rocket motor. A battery with low internal resistance (such as a sealed lead-acid battery) should be used. Timer Operation: After displaying a brief startup display routine the timer is set to 10 seconds. The user can adjust the time by incrementing hours up and down with the red adjustment buttons or minutes up and down with the black adjustment buttons. These buttons adjust the time values once per press or will auto repeat when held down. Once the desired time is set, the user initiates the countdown by pressing the Start/Stop button. An alarm will sound when the button is pressed and the Power Good LED will begin flashing as a visual warning. During the last 10 seconds of the countdown the alarm will give a brief alarm every second and then a steady alarm for the last 3 seconds before ignition. At ignition time the PIC activates a 12V relay that completes the circuit (along with the Safety Switch) to the Rocket Ignition Terminals. Minimum time value is 10 seconds. If the user selects anything less than 10 seconds, the timer will start at 10 seconds when the Start/Stop button is pressed. The user can stop the countdown at any time by pressing the Start/Stop button. Current time is held when the countdown has stopped and can be readjusted and started again. If the time left is less than 10 seconds the timer will revert to 10 seconds when the start button is pressed. Audio Alarm: The user can turn off audio alarms with the Sound On/Off Switch. During the last 10 seconds of the countdown the alarm will give a brief alarm every second and then a steady alarm for the last 3 seconds before ignition. Safety and Fire Switches: The Safety Switch must be set for ignition to occur. When the safety switch is in the off position the circuit to the Rocket Ignition Terminals is broken. The countdown will still occur but the internal relay AND the safety switch must be active for the Rocket Ignition Terminals to be energized. The Manual Fire Switch is bypasses the timer relay to energize the Rocket Ignition Terminals. The Safety Switch must be on for the Manual Fire Switch to complete the circuit. Timer activity has no effect on the Manual Fire Switch. |
![]() |
|
Code |
I wrote the code for this device using PICBASIC Pro. This was only my second major PIC based project so some of the methods may seems strange to an experienced PIC programmer. I certainly would have done things differently now but there is no need to go back and make changes since the device works well. The code consists of two major parts, button polling, and the countdown routine. On startup the PIC displays a short light show on the SPI display then begins polling the user input buttons. Hour/Min button changes simply increment/decrement the appropriate value and then call the display update function. Hitting the Start/Stop button sends the PIC to the countdown routine. In the countdown routine the device simply counts down the time while updating the display and polling the Start/Stop button. At this point in my PIC experience I hadn't touched interrupts so I made sure everything is done in short incremented loops that poll the Start/Stop button often. It should never take more than 10ms or so for the code to realize the button has been pressed. If the button is pressed the countdown is stopped and the code returns to the button polling loop. If time runs down to 0, then the Fire subroutine is called. The display routine simply shifts out bits to the HC4LED display (getting all the bits right was the hard part) The fire routine activates the 12V relay that energizes the rocket ignition terminals. RocketTimer.bas - Project code written in PICBASIC PRO |
Circuit and Design |
The RocketTimer's job is to simply provide power to a model rocket igniter. The typical model rocket igniter is a fuse that generates a spark to ignite the powder inside of the rocket motor. The RocketTimer can do this via the Manual Fire Switch or the timer countdown relay. The Safety Switch breaks the circuit to the igniter so it must be on for either the manual fire or timed fire to have any effect. Generous capacitors help keep the device from resetting during the large current draw during relay activation and rocket ignition. There is a large capacitor providing backup power to the overall 12V system and a separate capacitor for the regulated 5V system that powers the PIC. I've gotten a few requests to post the schematic of the circuit. You can find a scanned image of some of my old notes below. Please beware when using the schematic, it is provided as is and may contain errors (and it probably does). Review it before using it and make sure you test your own device before hooking up your model rockets.
|
Images and Video |