Take over "your" world using BASIC

 by Propellerpowered
Featured
project image.jpg
Pinky:        "Gee, Brain, what do you want to do tonight?"
The Brain: "The same thing we do every night, Pinky—try to take over the world!"
                                                                                            --Pinky and the Brain

Trying to come up with an amazing Halloween or Christmas display?


What if I told you that you could control ANY device from a simple BASIC program?
What if I told you that you could detect 100+ inputs from a device that will cost you less than $5.00

Take over the world from BASIC?  Ok, maybe not the entire world, but you'll have a great time scaring candy munching "trick or treaters" this year using a little BASIC computer that won't require a degree in rocket science to program.   Once more, you'll be able to take the "tricks" you learn here as the head-start for a great Christmas display.

I'm going to intentionally write this Instructable to be as "open" as possible so that you can flex it into your projects. I'm going to give you the ingredients for how to make "cookies" here, but you get to decide how they will look and taste. 

Here's what you'll need:

A Pocket Mini Computer
The Pocket Mini Computer is a little Propeller based microcomputer that behaves like a 1980's computer.  On the surface, it appears to be an interesting nostalgia toy, but we'll push the project further with this Instructable, using it as an easy control device for Halloween or Christmas display fun.  You can build your own Pocket Mini Computer from scratch, or buy an easy-to-assemble kit from here.  (If you've never heard of the Pocket Mini Computer, check out this Instructable.)

A PS/2 Keyboard
You should be able to score one of these from an old computer you didn't throw away, or Goodwill for less than $5.00, heck a lot of computer shops will give you one just for asking.  It doesn't have to be pretty,  Even if there is food and hair growing from the keys, it's PERFECT for what we have in mind.

An X10 Firecracker Kit
A four piece kit can be had from Ebay between $30-$40.  It is perfect for controlling 110v devices without having to worry about getting electrocuted from high voltage, or accidentally frying the family pooch.   You'll need the CM17A firecracker with the receiver.  Order the kit with more than device controller, I promise you'll want it after you start playing with this.

Update on the X10 Gear:
I've been talking to Martin at thex10shop.com who tells me that you can build this project using the CM17A ($4.99) and the TM751 Receiver Module ($14.99).  I bought my gear from his shop via Ebay and can vouch for his service.

A few minor electronics parts: (I promise, this is an EASY circuit to build)
A solderless breadboard (or perf board if you want to make this permanent project.)
TC4427 level-shifter IC (source: Digikey)
An 8pin DIP socket (source: Radio Shack)
A DB9 male connector (source: Radio Shack)
A couple 10k resistors (source: Radio Shack)
One 0.1uf capacitor  (source: Radio Shack)


 
Remove these adsRemove these ads by Signing Up

Step 1: Creating the X10 circuit

gg_minipcb_firecracker.png
The X10 Firecracker is a PC serial device.  I'm going to show you how to interface it to your Pocket Mini Computer with a simple circuit.

I've created mine on a "solderless" breadboard, but this image has a PCB layout and schematic.

Here's step-by-step instructions for building it on a PCB "perf" board:
  1. Place 8pin socket at J5-J8
  2. Red wire from N2 to H2
  3. Red wire from F2 to F7
  4. Small jumper wire from N4 to M4
  5. Small Jumper wire from M7 to L7
  6. Purple wire from N6 to L6
  7. Purple wire from N8 to L8
  8. 10k resistor from M5 to K6
  9. 10k resistor from M9 to K8
  10. Wire from M1 to 9pin-5
  11. Wire from F6 to 9pin-4
  12. Wire from F8 to 9pin-7
  13. Solder row of 4 male pins P1-P4
  14. Solder row of 4 (or more) male pins P6-P9
  15. Insert TC4427 facing left
Once you have the circuit completed, connect the following wires to your Pocket Mini Computer:
  1. P4 to Vss on the Pocket Mini Computer
  2. P2 to 5v on the Pocket Mini Computer  (This can be found on the first pin of the iR connector)
  3. P6 to P13 on the Pocket Mini Computer
  4. P9 to P12 on the Pocket Mini Computer


ncc 1701 says: Nov 12, 2012. 1:16 PM
do usb keyboards use the same system?
Propellerpowered (author) in reply to ncc 1701Nov 12, 2012. 2:07 PM
I cracked open an older Compaq USB (white version) keyboard this afternoon which had the same configuration. It's best to make sure that your USB keyboard is PS/2 compatible. (most are) Use one of those green/purple converters to check it.
Propellerpowered (author) in reply to PropellerpoweredNov 12, 2012. 2:11 PM
I've had good success with older Gateway PS/2 keyboards (as used in the examples). IIRC, the white Dell PS/2 keyboards were very hackable as well. The black Dell and black HP PS/2 keyboards use a "pressure connection" system which is worthless for trying to connect pin headers to.
guitarwizard94 says: Sep 10, 2012. 8:10 AM
Is there any way this could be converted to control 120V components? Lamps and such?
Propellerpowered (author) in reply to guitarwizard94Sep 10, 2012. 8:48 AM
The X10 modules are designed to do exactly that. I've been controlling my computer room lamp with this project while I was testing it.
guitarwizard94 in reply to PropellerpoweredSep 13, 2012. 7:00 AM
Is there any way you could post a schematic or something like that? Just for a visual :P
meanpc says: Sep 8, 2012. 1:45 AM
Love the old school BASIC code. Cool project!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!