Crossditch
New Member
Greetings!
I'm looking for some help with a project of mine. I've been working on my first picaxe project: a simple wake-up light that consists of a regular alarm clock, 08M2 board, power led driver and the power led light unit. The idea is that the alarm signal from the clock would start a picaxe program that will send PWM signal to the power led driver, and so slowly light up the leds. An artificial sunrise.
I managed to figure out a program for lighting the leds with PWM. The problem, however, lies with triggering the program with the alarm. I figured I'd just remove the alarm clock buzzer and connect the wires to an input on the picaxe board, and then just use
The "light" (PWM) program starts running as soon as the pic board is powered, regardless of the alarm being on or off. It seems to be high all the time. With the buzzer the alarm clock works as it should; voltage across the buzzer is 0 when alarm is off, when it goes on, the voltage varies between 0,3-1 V (measured with multimeter).
Reading the analog value of the alarm input pin shows decimal values varying between 60-255, again with the actual alarm not seeming to affect the value. (What exactly does this value even tell me? Why not just a simple voltage? ) I hoped I'd get different values when the alarm goes on so I could use something like if b1 > 100 then light .
My own (rather uneducated) guess is that the alarm clock has a switch on the ground side of the buzzer, and when connected to the picaxe it leaks through the picaxe input to the picaxe ground and thus is high all the time. Is that even possible, or am I completely lost? The alarm clock has its own 1,5V battery, while the Pic works on 4,5V (3xAA)... The led driver and leds have their own power source (old laptop power supply). Yeah, it's not too sophisticated, because I'm still learning the basics.
Can anyone confirm whether my diagnosis might be wrong or right, how would I tackle it if it's right and what would be the cause if I'm mistaken, and how would I deal with it?
Any help will be greatly appreciated. I'd love to get this thing working, it might make having to wake up way too early a bit easier.
I'm looking for some help with a project of mine. I've been working on my first picaxe project: a simple wake-up light that consists of a regular alarm clock, 08M2 board, power led driver and the power led light unit. The idea is that the alarm signal from the clock would start a picaxe program that will send PWM signal to the power led driver, and so slowly light up the leds. An artificial sunrise.
I managed to figure out a program for lighting the leds with PWM. The problem, however, lies with triggering the program with the alarm. I figured I'd just remove the alarm clock buzzer and connect the wires to an input on the picaxe board, and then just use
Code:
main: if pinC.4 = 1 then goto light
pause 100
goto main
Reading the analog value of the alarm input pin shows decimal values varying between 60-255, again with the actual alarm not seeming to affect the value. (What exactly does this value even tell me? Why not just a simple voltage? ) I hoped I'd get different values when the alarm goes on so I could use something like if b1 > 100 then light .
My own (rather uneducated) guess is that the alarm clock has a switch on the ground side of the buzzer, and when connected to the picaxe it leaks through the picaxe input to the picaxe ground and thus is high all the time. Is that even possible, or am I completely lost? The alarm clock has its own 1,5V battery, while the Pic works on 4,5V (3xAA)... The led driver and leds have their own power source (old laptop power supply). Yeah, it's not too sophisticated, because I'm still learning the basics.
Can anyone confirm whether my diagnosis might be wrong or right, how would I tackle it if it's right and what would be the cause if I'm mistaken, and how would I deal with it?
Any help will be greatly appreciated. I'd love to get this thing working, it might make having to wake up way too early a bit easier.