Shop OBEX P1 Docs P2 Docs Learn Events
I could use help for a birthday party request. — Parallax Forums

I could use help for a birthday party request.

lockadoclockadoc Posts: 115
edited 2010-05-16 04:27 in Propeller 1
  • My brothers wife just asked me if I could make a countdown timer for her sons party next week.It seems her two sons are really into the " Minute To Win It " show. I have all the hardware needed·(Prop, Bs2,·Led Displays,·and so on) I have the time to make the case just not enough time to make a program and debug it. I've looked at the Object exchange and·searched the forums with no luck,even searched the NutNvolts back issues, only found one for a pic·or a nonprogramable design.
  • I know there must be one out there·that some-one came up with by now. All it need to do is Start a·display at 60 and count down until it reaches 0 then set of a buzzer.·If some-one could·point me to where I coud find one it would make two little boys very happy.



Thank you

··· BillS Louisville Ky.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life is fun with a Prop.



BillS
··· Louisville KY.

Comments

  • kwinnkwinn Posts: 8,697
    edited 2010-05-13 17:46
    A count down timer to go from 60 to 0 and set off a buzzer is very simple to do in spin. If you used 6 leds as a binary display it would be trivial, and using 2 7 segment displays only marginally more difficult.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-05-13 17:57
    Either a Prop or a BS2 could do this. The program depends mostly on what kind of display you're using. Remember that a LED display will probably need some kind of driver since the amount of current needed per segment for a large display is likely to be more than a Prop or Stamp I/O pin can handle.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-05-13 18:12
    lockadoc said...
    <UL>
    <LI>...her two sons are really into the " Minute To Win It " show. ...

    If they are really into TV, then you could have your display on a TV using the TV Object, perform the countdown, and then have the TV flash "HAPPY BIRTHDAY TV ADDICTS!" lol.gif

    or whatever message seems appropriate at the time. You can play with the TV colors, too, so the whole thing looks quite festive.

    Hope that helps,

    Mark
  • MagIO2MagIO2 Posts: 2,243
    edited 2010-05-13 18:22
    You could propably use Chips graphics demo ... it already has a counting number and it looks good.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2010-05-13 18:32
    Very roughly speaking, you could do something like this:

    
    {Assign variables, etc.}
    LONG BirthdayTime
    
    {Start up the TV Object.}
    
    {You can display a message here if you want.}
    
    {Optional: Assign a Propeller Pin to serve as a start switch.}
    
    {Wait here... When start switch conditions are met, proceed with the program.}
    
    {Initialize BirthdayTime to 60.}
    BirthdayTime := 60
    
    {Enter into a repeat loop to perform the countdown...}
    REPEAT While BirthdayTime > 0
    
      {Display BirthdayTime on TV}
      waitcnt(clkfreq + cnt) 'Wait 1 second here.
      BirthdayTime := BirthdayTime-1 'Subtract 1 second from the countdown.
    
    {Stop repeating when BirthdayTime = 0 and display a new message on the TV...}
    
    {"Happy Birthday!"}
      
    
    
    



    Of course, that's not true code, just a rough idea maybe to get you started.
  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-05-13 21:40
    MagIO2 said...
    You could propably use Chips graphics demo ... it already has a counting number and it looks good.
    I had the same I·idea and·took the basics from the graphics demo and created the attached; it counts down in 1/10s units and finally displays "Happy Birthday" on the screen with the rotating triangles.· This may provide a good starting point for something really cool.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
  • lockadoclockadoc Posts: 115
    edited 2010-05-15 04:54
    I'm going to stick with a LED display to keep it portable,Can the prop handle two 7 Segment LED (Green) Item code 350-00027 from the pallalax store.with out a driver if I keep one display on pins 0-7 and the other on pins 8-15? If not what would be the best driver to get for them ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life is fun with a Prop.



    BillS
    ··· Louisville KY.
  • smbakersmbaker Posts: 164
    edited 2010-05-15 05:24
    lockadoc said...
    I'm going to stick with a LED display to keep it portable,Can the prop handle two 7 Segment LED (Green) Item code 350-00027 from the pallalax store.with out a driver if I keep one display on pins 0-7 and the other on pins 8-15? If not what would be the best driver to get for them ?

    I can't tell exactly what size those ones are and I don't see a datasheet. I've had no trouble driving the small displays on the propeller professional development board, although I did multiplex them rather than driving more than one at a time.

    Most of the common 7-segment displays are quite small (0.30" or 0.56" for example). Is that going to be enough to impress your youngsters? You can get larger displays up to 4" tall from some of the parts suppliers. For example Jameco has 2.24" tall CA displays (p/n 97199) for $4.49 each. If you were to get ones that were common-anode, then you could easily drive the cathodes with some ULN2803 chips. ULN2803 is an octal darlington transistor array, pretty easy to interface to most microcontrollers, and capable of sinking more current than you'd probably ever need for any conceivable LED displays.
  • kwinnkwinn Posts: 8,697
    edited 2010-05-15 15:58
    Each I/O pin has a max current of 40mA
    Max current on Vdd or Vss is 300mA

    14 segments @ 10mA would be a total of 140mA. If the displays require much more than 15mA per segment I would suggest using a driver such as a ULN2803 and 2 PNP transistors (like 2N3906) and multiplex the 2 digits instead of directly using the 14 output pins.

    You need a timing loop anyway so it would not require much more code for multiplexing the display.
  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-05-15 16:48
    Here's a simple program for parallel outputs using drivers like ULN2803s. Note that even though this was done quickly, it's not dirty, and portions can be re-used later. All that said, I have no hardware setup to test, so I will leave that to you (it does compile just fine).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-05-15 17:46
    Use a prop, spin and a circle of LEDs on a prototype board.
    Just count to 60 seconds and light up LEDs as you go.

    You can lay out a perfect circle of LEDs easily on a prototype board.
  • lockadoclockadoc Posts: 115
    edited 2010-05-16 04:27
    Thanks JohnnyMac,,,
    I'll try your object.
    I'll let you know how it turns out next week.


    I also like your Idea HollyMinkowski.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Life is fun with a Prop.



    BillS
    ··· Louisville KY.
Sign In or Register to comment.