6 LV bulbs with memory settings

Status
Not open for further replies.

computer

New Member
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
 
okay, well after thinking about it more, I'm going to need lots of I/O pins, so It'll be a big squish on the PICAXE. I'm currently looking at the 40X model, which is the largest.

current pin layout:
1 - Reset Line
2 - Button 1 Input
3 - Clock Pulse Input
4 - Clock Pulse 2 Input
5 - Audio In (possible clapper) Analogue
6 - Serial In
7 - Serial Out
8 - Trimpot A (various settings) Analogue
9 - Trimpot B (various settings) Analogue
10 - LDR Analogue
11 - +5v
12 - GND
13 - Resonator
14 - Resonator
15 - Dimmer 6 Output
16 - Dimmer 1 Output
17 - Dimmer 2 Output
18 - i2c SCL
19 - IR Signal Input
20 - Button 4 Input
21 - Button 2 Input
22 - Button 3 Input
23 - i2c SDA
24 - Dimmer 3 Output
25 - Dimmer 4 Output
26 - Dimmer 5 Output
27 - Button 5 Input
28 - Button 6 Input
29 - Button 7 Input
30 - Button 8 Input
31 - GND
32 - +5v
33 - LED 1 Output
34 - LED 2 Output
35 - LED 3 Output
36 - LED 4 Output
37 - LED 5 Output
38 - LED 6 Output
39 - LED 7 Output
40 - LED 8 Output

the final features may include text to speech, LCD, clapper control, infared controller as well as what I have already discussed.

so I think I have the main but sussed out, except the code to control the 'dimmers'. I will be using triacs and optoisolators, connected to an AC supply independant of the main section that will control the dimming. there needs to be 'PWM' control of the outputs directly to the triacs I think for ease of operation (PWM code is welcomed) or, to use some sort of DAC to make it be analogue output to control them directly or via transistors or something.

any ideas?
computer
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…