Countdown timer for a UV exposure box

Discussion in 'The Projects Forum' started by bance, Jan 24, 2013.

  1. bance

    Thread Starter Member

    Aug 11, 2012
    315
    34
    I know this has been done a million times, well maybe not a million times, but there are many examples of this type of project out there for sure!

    However I want to use this as a way to learn to programme PICS...

    So these are my goals:-
    • Create an accurate timer to count down from 10 minutes to 0.
    • Have user input to create time limit.
    • Have the last five user set values saved.
    • When the target time has elapsed switch off UV's and alert user.
    I will add to this list as the project develops.

    Some of the functionality that I would like to add,

    Have the set time increment quickly, say 5 secs then 1 min at a time if the button is held down for a prolonged period. And decremented equally. Scroll between saved times.

    Include monitoring the UV exposure and comparing it to the quality of the resultant board. (since that is a qualiative comparison I'm not sure how that might be achieved,) but the Lux could be measured and logged.
    (At least I think that may be possible, if there is a sensor out there that can measure UV.)

    This implies communicating with a PC.

    I'm sure that there are sensors to measure the density of paint so I suppose they can be adapted to give a representation of the density of ink. Then all that is required is an algorithm to relate them and hey presto! To take that a step further, it may be possible to say, scan the photo mask and predict how much exposure is required.

    I want to use, as small a pin-count as possible, and use assembly as the programming language.

    What this teaches me:

    1. Flash an LED.
    2. Create an accurate time-base.
    3. Implement a counter, then multiple counters.
    4. Multiplex 7 segment LED displays or an LCD.
    5. Use interrupts.
    6. Debounce buttons.
    7. Multiplex buttons.
    8. Create PWM to drive an alarm.
    9. Use EEPROM.
    10. Interface with sensors.

    OK, so far I have realised this much:

    • Flash an LED (I've got a four digit LED display, and the colon flashes.)
    • Create an accurate time-base (it flashes at 1Hz.):D
    • I have a counter for seconds (0-9)
    • When I push the button it increments the counter and outputs 0-9:)
    • When it gets to 10 the output is not as it should be.(tens and ones both are lit and incremented....):eek:
    • I have a debounce routine based on TIMER0 interrupts.
    • I have a multiplex routine also based on TIMER0 but it doesn't work properly.:(

    What I need........ Encouragement, pointers towards what may be done differently (better,) examples and explanations of code, ideas to improve my project (I'm a realist and if I only get as far as a working countdown timer before I pull my hair out, what little there is of it anyway:p,) I'll be happy because I'm sure to have learned lots on the way.

    Thanks for reading this far, and thanks in anticipation of your help and encouragement,

    Steve.

    P.S. will make another post in 'embedded' with code etc. etc.
     
Loading...