Hi,
This may sound like a weird thing to do, but I need to work out how to do this:
- 6 10v bulbs in mini bulb holders (the little screw bulbs).
- I have at least 10 pushbutton switches, which are NO momentyry types
- 1 LED for each button
- I can get the required power supply once I have figured out the circuit (ie, I can use any voltage/current DC adaptor).
I want to do the following, and I think I'll need a PIC or something and some sort of memory to store the presets in. I'll probably need DACs but I am unsure on that.
There will be preset lighting levels, 1-4 and also a master preset level. there will also be 2 lighting 'programs' which will act like a preset, but actually do something rather than just a set level output.
All the presets will be programed by pressing button 1. When you press that, LED1 flashes once and a little beep from a buzzer or speaker goes. This indicates programming mode. Then you press a button, 2,3,4,5,6 which are preset 1, preset 2, preset 3, preset 4 and master preset respectively. this will flash the appropriate led, then beep twice. now you can set the level for that preset. using buttons 2-6, you press once quicky to turn on or off, or press and hold and it will cycle up and down until you let go. all of this is 'live' and as you do the changes in programming mode, the light levels will alter as well so you can see what they look like. when your done, press 1, which will flash all the LEDs for button 1-6, beep 3 times, all outputs off, wait 1 second, beep, then bring the lights back to the level you just set. this indicates you saved the level and it records those levels for later. if you press and hold button 1 for more than 4 seconds it will cancel that and the lights go out, wait 1 second, beep, then bring them back up to the levels they were originally set to. this is the same for preset 1-4 and the master preset.
button 1 will turn the master preset on or off (toggle it). press it and the lights go to master preset level, press again to go to off.
Thats the main programmnig part completed. the next bit is how it usually operates.
buttons 2,3,4,5 will start preset 1,2,3,4 respectively. and will flash the buttons LED when you press it. if you then press button 6, its LED will light (This is the manual mode and will time out after about 20 seconds and return to the main mode). if you then press 2-5 they will act like they do in programming mode by cycling the lights up and down or if you tap it quickly, will go on or off straight away. press button 6 again will go back to the main mode.
There are 5 more buttons, in two blocks. set 2 and 3 (set 1 was the 1-6 we talked about earlier). set 2 is buttons 7,8,9,10 and set 5 is 7,8,9,11.
button 7 acts like button 1, and will turn the master preset on or off (toggle it). press it and the lights go to master preset level, press again to go to off. button 8 will start program 1, and button 9 will start program 2, if you press the button while the program is running, it will stop the program and reset the lights to the master preset level.
program 1 and 2 are written into the code and can't be easily changed without reprogramming the chip. program 1 will make outputs off, except outputs 3,4 which will go to 20% (ie about 2volts) and then slowly fade out over a period of 5-10 minutes and then it will all be off. program 2 fades all outputs off to 1,2,3,4 all at 100% over 15minutes.
buttons 10 and 11 toggle outputs 5 and 6 respectively, and pressing and holding the button dims them like the others. these are independent of the others, and can be used at any time. also, their LEDs will turn on, when the output is on (or at anything but off)..
this probably sounds really horrible, impossible, like a homework question, or whatever, but I have an idea for a cool thing for my room but it needs quite a bit of help. I can probably manage to write most of the code, but a start would help me. I'm also looking for a good pic programmer and some suggested chips/memory/dacs, whatever. I have no idea what I am looking for, so lots of links are welcomed. if this is possible on a picaxe chip, that would be wonderful as I already have a couple of 18X chips and programmers although I might need a larger version with more I/O pins or multiconnect a few chips together.
the main problem is how to control the outputs with just a chip or using DACs, but I'm not sure on using them.
also, there is an orange LED for each switch, which will act like a backlight in the final version. this needs to just tie in somehow so that if the room is dark, and/or one of the buttons is touched, they light up dimly.
thanks in advance, and thanks for reading and/or replying to this thread,
computer
This may sound like a weird thing to do, but I need to work out how to do this:
- 6 10v bulbs in mini bulb holders (the little screw bulbs).
- I have at least 10 pushbutton switches, which are NO momentyry types
- 1 LED for each button
- I can get the required power supply once I have figured out the circuit (ie, I can use any voltage/current DC adaptor).
I want to do the following, and I think I'll need a PIC or something and some sort of memory to store the presets in. I'll probably need DACs but I am unsure on that.
There will be preset lighting levels, 1-4 and also a master preset level. there will also be 2 lighting 'programs' which will act like a preset, but actually do something rather than just a set level output.
All the presets will be programed by pressing button 1. When you press that, LED1 flashes once and a little beep from a buzzer or speaker goes. This indicates programming mode. Then you press a button, 2,3,4,5,6 which are preset 1, preset 2, preset 3, preset 4 and master preset respectively. this will flash the appropriate led, then beep twice. now you can set the level for that preset. using buttons 2-6, you press once quicky to turn on or off, or press and hold and it will cycle up and down until you let go. all of this is 'live' and as you do the changes in programming mode, the light levels will alter as well so you can see what they look like. when your done, press 1, which will flash all the LEDs for button 1-6, beep 3 times, all outputs off, wait 1 second, beep, then bring the lights back to the level you just set. this indicates you saved the level and it records those levels for later. if you press and hold button 1 for more than 4 seconds it will cancel that and the lights go out, wait 1 second, beep, then bring them back up to the levels they were originally set to. this is the same for preset 1-4 and the master preset.
button 1 will turn the master preset on or off (toggle it). press it and the lights go to master preset level, press again to go to off.
Thats the main programmnig part completed. the next bit is how it usually operates.
buttons 2,3,4,5 will start preset 1,2,3,4 respectively. and will flash the buttons LED when you press it. if you then press button 6, its LED will light (This is the manual mode and will time out after about 20 seconds and return to the main mode). if you then press 2-5 they will act like they do in programming mode by cycling the lights up and down or if you tap it quickly, will go on or off straight away. press button 6 again will go back to the main mode.
There are 5 more buttons, in two blocks. set 2 and 3 (set 1 was the 1-6 we talked about earlier). set 2 is buttons 7,8,9,10 and set 5 is 7,8,9,11.
button 7 acts like button 1, and will turn the master preset on or off (toggle it). press it and the lights go to master preset level, press again to go to off. button 8 will start program 1, and button 9 will start program 2, if you press the button while the program is running, it will stop the program and reset the lights to the master preset level.
program 1 and 2 are written into the code and can't be easily changed without reprogramming the chip. program 1 will make outputs off, except outputs 3,4 which will go to 20% (ie about 2volts) and then slowly fade out over a period of 5-10 minutes and then it will all be off. program 2 fades all outputs off to 1,2,3,4 all at 100% over 15minutes.
buttons 10 and 11 toggle outputs 5 and 6 respectively, and pressing and holding the button dims them like the others. these are independent of the others, and can be used at any time. also, their LEDs will turn on, when the output is on (or at anything but off)..
this probably sounds really horrible, impossible, like a homework question, or whatever, but I have an idea for a cool thing for my room but it needs quite a bit of help. I can probably manage to write most of the code, but a start would help me. I'm also looking for a good pic programmer and some suggested chips/memory/dacs, whatever. I have no idea what I am looking for, so lots of links are welcomed. if this is possible on a picaxe chip, that would be wonderful as I already have a couple of 18X chips and programmers although I might need a larger version with more I/O pins or multiconnect a few chips together.
the main problem is how to control the outputs with just a chip or using DACs, but I'm not sure on using them.
also, there is an orange LED for each switch, which will act like a backlight in the final version. this needs to just tie in somehow so that if the room is dark, and/or one of the buttons is touched, they light up dimly.
thanks in advance, and thanks for reading and/or replying to this thread,
computer