Programmable computer controlled holiday lights
This project was the seasonal extension of the earlier PCCRCC project. The interface with game port was already built in that project, but it is the addition of the external TRIAC circuits that allows the Apple IIe to control line voltage devices, which in turn allowed the creation of the charge controller project.
Triac array connected externally on perf board. The white chips under the heat sinks (barely visible) are there to provide optical isolation. This meant the trouble of powering the 3010s seperately with 2AA batteries mounted on a clip externally, and of course, the expense of buying the chips.
Regardless of how much I paid to get my Apple IIe (not a lot), the thing is a piece of history, to have pieces of it burnt out from experimentation done carelessly is simply unacceptable. The line voltages the TRIAC is controlling can fry the nearby Mux chip like this 74LS154 in an instant. Of course it is trivial to find a replacement chip to make it work again, but the original parts are what make this machine a piece of history.
The Apple II has its joystick port built in, because gaming has always been a big thing for home computers, but it does more than take input from a couple of fancy mounted potentiometers, there was a socket that gives you four outputs for connecting external devices, so the basis for making force feedback or external gaming devices were already there. Like all the interesting things done with the Apple, you would poke certain memory locations, and it will turn on or off that particular switch. If you ever get your hands on an Apple II, The Apple II User's Guide is a must have. Get the pdf here. Since the outputs are independent, with an external demuxer, there can be 24 = 16 individual devices that can be controlled by software. Controling outside device is important, because sometimes floppy drives were not used, and an audio cassette was used to record and playback programs, being able to control the cassette deck from software can be really useful.
So from the RC car project, wires were inserted into that socket, and then a simply array of resister and transistors were put between that and the IN9 socket mounted on the case for connection originally with the RC car's hacked remote control. The TRIAC circuit just plugs into that for control input.
Here are the circuit diagrams and code.
This is a transcript of the code to improve readability. The original image is here.
2 O = 20 ' on delay length
3 M = 50 ' may cycle delay
4 N = 2 ' fastest (min) cycle delay
5 X = 200 ' initial cycle delay
6 F = 1
10 POKE 49244, 0 ' turn #3 off
15 GOSUB 1000 ' goto delay routine
20 POKE 49243, 0 ' turn #1 on
25 GOSUB 3000 ' stay for as long as O
30 POKE 49240, 0 ' turn #0 off
35 GOSUB 1000 ' goto delay routine
40 POKE 49245, 0 ' turn #3 on
45 GOSUB 3000 ' stay on O
50 POKE 49242, 0 ' turn #1 off
55 GOSUB 1000 ' delay
60 POKE 49241, 0 ' turn #0 on
65 GOSUB 3000 ' stay for O
70 GOTO 10
100 END
1000 IF X > M THEN F = 1
1010 IF X < N THEN F = 0
1020 IF F = 0 THEN GOTO 1100
1030 X = X - 1
1040 GOSUB 2000
1050 RETURN
1100 X = X + 1
1110 GOSUB 2000
1120 RETURN
2000 FOR I = 1 TO X
2010 NEXT I
2020 RETURN
3000 FOR K = 1 TO 0
3010 NEXT K
3020 RETURN
Eventually the programming got pretty fancy, I was flashing off 'Merry Christmas' in morse code, have the light strings move in time domain variations. This was way before the fad of hooking up an ipod to the holiday lights. But when things can be controlled with software, making adjustments are easy.
M --
E .
R .-.
R .-.
Y -.--
C -.-
H ....
R .-.
I ..
S ...
T -
M --
A .-
S ...
Yeah, also did this back in 2002. It is a programmable Lead Acid battery charging system. Back in the day before Lithium Ion or even Nickel Metal Hydrates (NiMH) was available, we used to buy stacks of NiCad from Costco. (It was Price Club.) Charging them with commercially available chargers took 8 hours, and the charge will last about 2 hours. So yeah, we gave it a dose of Home Improvement and started charging them at something like 3amps instead of 0.3amps (300mah) Of course the plastic cover on the shells bursted, but it did finish charging in 15 minutes, a 32x improvement. It also burnt away any memories of the dreaded memory effect inherent in NiCad due to the fact that we were charging the cells to the brink of death. What we did not know about of course, was the possibility of liquid cooling the cells as we charge...
Anyway, when we eventually graduated to car sized Lead Acid battery for our monster audio amplifiers (signal noise from our home built monster transformers are unacceptable) I hit upon the idea of using the Apple II to make a closed loop charge controller. These days companies like Tesla Motor would call something like that a SuperCharger.
Views: 190
Replies coming soon