Shop OBEX P1 Docs P2 Docs Learn Events
Propeller based Alarm clock, that wakes me up with light - includes light dimme — Parallax Forums

Propeller based Alarm clock, that wakes me up with light - includes light dimme

Christof Eb.Christof Eb. Posts: 1,197
edited 2008-02-04 21:10 in Robotics
Well, perhaps anybody is working in similar directions, so you might have a glance at it.....

Many thanks to the guys, who made the objects I could use!!!

This is an alarm clock, that wakes you by a light, that will start glowing and glow brighter
until wake time with 100% brightness.
That should give a friendly dawn effect.
A beeper will beep at alarm time. (Not so friendly, but just to make sure...)
The user interface is a button switch, a potentiometer and a lcd 2*16 display.
There are 3 wake times, one for working days, one for saturday and one for sunday.

The light dimmer works as many dimmers by varying the phase angle of mains power.
pin 4 (TRIGOUT) drives the basis of a bc107 npn transistor over 2.2k resistor. Its emitter is connected to GND.
The collector drives the input of a COSMO KSD210AC3-1 solid state relay (type without internal zero crossing switch).
A lamp is connected to this solid state relay.

The phase output has to be aligned to the phase of mains power.
This is done by an alternating voltage from a transformator connected over a high resistor to pin4 (pllin).

The aligned phase output was the main difficulty of the project.

In the main display mode, the potentiometer will vary the brightness of the lamp.
When the button is pressed, you come to the main menue.

The SetTime fuction is left with potentioneter 0.
1 resets seconds
2 advance one minute
3 advance an hour
4 advance a day (0=monday)


cogs:
0: main/user interface
1: rc potentiometer input
2: clock
3: PLL output
4: mains trigger input

I have seen, that you can buy such a waking light now.
Mine gives some flickering at low brightness levels because of the speed of spin.

Comments

  • boeboyboeboy Posts: 301
    edited 2007-03-08 21:55
    Very nice i have been working on makeing my conputer·(see here http://forums.parallax.com/showthread.php?p=630466·) so that i can dim lights with it with your permission i would like to use·some of your code

    PS. your diagram shows that the·light is run off 220 is that a typo?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lets see what this does... KA BOOM (note to self do not cross red and black)
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2007-03-09 06:11
    Christof Eb.

    Very Nice Project can you tell me which LCD display did you use
    ·I would like to use this set up for the same thing that you are using it for so i can wake up slowly and not have to get
    out of the bed to turn on the light

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ··Thanks for any·idea.gif·that you may have and all of your time finding them

    ·
    ·
    ·
    ·
    Sam
  • Christof Eb.Christof Eb. Posts: 1,197
    edited 2007-03-10 08:42
    Hi Sam and boeboy,

    * the LCD is a type based on a HD44780 controller chip, which is very common. Mine has come from DATA INTERNATIONAL CO. Have a look into the driver object. Simon Ampleman gave good info and a type of LCD he used. I made only one bigger modification: I tied the Read-Write connection of the LCD to GND. With this I did not need the 1k resistors between the propeller and the LCD, because the LCD will never output anything to the propeller.

    * yes this works with 230 Volts and 50Hz which is our mains supply in Germany. But there will be no big issue to move to 110V 60Hz.
    ((BUT BE CAREFULL, BECAUSE WORKING WITH HIGH VOLTAGE IS DANGEROUS AS WE KNOW!))

    Christof
  • boeboyboeboy Posts: 301
    edited 2007-03-10 18:57
    May I use some of your code?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lets see what this does... KA BOOM (note to self do not cross red and black)
  • Christof Eb.Christof Eb. Posts: 1,197
    edited 2007-03-11 20:59
    boeboy,

    there is no warranty and no restriction to use the code. Perhaps you want to let my name in the sources if you post it.... I think, that every code in this forum can be used at least for noncommercial usage. You might have seen, that I used a lot of code of others.

    Christof
  • boeboyboeboy Posts: 301
    edited 2007-03-11 21:30
    Thank you·Christof Eb·I just·wanted to make sure that i had your permission before i used it

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lets see what this does... KA BOOM (note to self do not cross red and black)
  • Christof Eb.Christof Eb. Posts: 1,197
    edited 2008-02-02 16:09
    Update for the dimmer part.
    The PhaseControl is now done in assmbler using a single cog.
    Based on of "Dimming Lights Fantastic" Nuts and Volts #146, Nov. 2007
    No more flickering now?

    Have fun Christof
  • Shawn LoweShawn Lowe Posts: 635
    edited 2008-02-02 19:41
    Can you post a video? This would be cool to see.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Shawn Lowe


    Maybe I should have waited to do that......
  • Christof Eb.Christof Eb. Posts: 1,197
    edited 2008-02-04 21:10
    Hi Shawn

    no video, but for your imagination:

    First: everything very dark.
    ... still very dark.
    .... ah, the first low light at the bulb.
    .... a little more light, a scenery of pillows can be seen slowly. Here: Is this my head? - Oh, it is still very dark.
    ...... no, that was not my head, just another pillow, sorry.
    .... first movements.
    .... this person with the small eyes is now looking at a watch.
    .... Scream: AAAAH, who .....(bad words cannot be written) programmed three o'clock in the morning on sunday?????
    ..... Light switched off.
    .....

    Christof scool.gif
Sign In or Register to comment.