bogdan
- 5th February 2009, 01:22
Objective:
-to take one cigarette every 2 hours
Mechanical description:
-the cigarettes will be on a sliding tray who slide out of the box
-the tray will be locked bye a latching solenoid
-the box will have a “dumb” LCD to display the countdown “timer” (999 to 000)
-The sensor (switch) will be normal open and will close when the tray is all the way out
Parts:
-microcontroller
-latching solenoid
-h-bridge
-optoisolators
-“dumb” LCD
-spst switch
Requirements:
-The box (including the solenoid) should be powered by one 9v battery
-The pcb shouldn’t be bigger than 1” diameter
Logic:
1.Configure the microcontroller, variables, …
2.Lock the box
3.Start the count down
a.For LCD=999 to 0
b.GoSub display_to_LCD
c.Add delay 2hours/999
d.Next
4.Unlock the box
5.Display_to_LCD
6.END
Questions:
-Do you think the pic16F913 is suitable for this application?
-Should I use external interrupts (by the switch) or just power on reset will be enough?
-Should I use external or internal clock source (the 5% timing tolerance is acceptable)?
Any recommendation regarding the circuit and programming are welcome
Thanks in advance guys
… from a newbie who try to quit smoking
-to take one cigarette every 2 hours
Mechanical description:
-the cigarettes will be on a sliding tray who slide out of the box
-the tray will be locked bye a latching solenoid
-the box will have a “dumb” LCD to display the countdown “timer” (999 to 000)
-The sensor (switch) will be normal open and will close when the tray is all the way out
Parts:
-microcontroller
-latching solenoid
-h-bridge
-optoisolators
-“dumb” LCD
-spst switch
Requirements:
-The box (including the solenoid) should be powered by one 9v battery
-The pcb shouldn’t be bigger than 1” diameter
Logic:
1.Configure the microcontroller, variables, …
2.Lock the box
3.Start the count down
a.For LCD=999 to 0
b.GoSub display_to_LCD
c.Add delay 2hours/999
d.Next
4.Unlock the box
5.Display_to_LCD
6.END
Questions:
-Do you think the pic16F913 is suitable for this application?
-Should I use external interrupts (by the switch) or just power on reset will be enough?
-Should I use external or internal clock source (the 5% timing tolerance is acceptable)?
Any recommendation regarding the circuit and programming are welcome
Thanks in advance guys
… from a newbie who try to quit smoking