Relay Boards under Atari 8bit control
Seems not so long ago if you wanted to control a relay switch through your Atari 8bit joystick port, you had to build the hardware from scratch. Not anymore. Now you can buy circuit boards with 1, 2, 4, 8, or 16 relays. A couple more parts and you've got what it takes to control your world.
Search Amazon with the key words Arduino Relay for an idea of what is readily available. I ended up with a SainSmart 4 channel relay board not because it was the best but because I wanted to get one before I grew old doing the research. Most likely any of the boards that work with the Arduino will work with this setup.
The joystick ports 5 volt pin might be able to power all four relays at the same time but you will be very close to drawing the maximum amperage with a 4 channel board. An external 5 volt power supply for the relays would eliminate the potential of exceeding recommended power draw. (Actually I used 3 1.5V C batteries.)
For another level of safety an optocoupler was used at the joystick pins to isolate the computer and external power supply. I did have a bit of a problem when the power from the computer was not enough to fully turn on the output. The isocoupler output still had about a 3V drop across the leads, not enough power was avalible to activate the optocoupler on the board. When a 2n2222 transistor was added to do the switching, it worked.
The drawing shows the circuit for one channel. Replicate this circuit for each channel you want to control.
The relay contacts were connected to turn on and off an LED. A 1.5V battery and LEDs were used for test purposes.
This simple test program randomly turns on and off the relay contacts. Im going to have to read the description for these locations in Mapping the Atari a couple more times to understand why it works.
5 REM RELAY TEST PROGRAM
10 POKE 54018,48
20 POKE 54016,255
30 POKE 54018,53
40 POKE 54016,0
50 POKE 54016,INT(RND(0)*16)
60 FOR X=1 TO 200:NEXT X
70 GOTO 50
Now I just need a program that will play AMS Christmas music songs and set the output pins. Then Ill be ready to Griswold the house. And what a wonderful present it would be if you send me a copy of your program.
2 Comments
Recommended Comments