Category Archives: electronics

High(ish) Voltage EPROM blast from the past

Using New tools on old parts…

Very early in my career, I lucked out and got a job at General Computer Company in Cambridge. GCC had a contract with Atari to write games for the 2600, and eventually were tagged to create their next generation system, the Atari 7800. I worked on 2600 Joust and Kangaroo, and also on Centipede for the 7800 as well as test code for the hardware and a sound driver that was used in several games.

7800 Eprom carts from my days at GCC

We were given 7800’s from an early production run, and I recently found mine in my attic, and dragged it out, and hacked it to have a composite output. I also had been carrying around these EPROM carts for many years, and I wanted to see if I had anything “interesting” or special.

Once I got my 7800 running, many of the cartridges just worked, but there was one set that was labeled ROB 4(9?)/20 (probably Robotron 2084 written by my friend Carlos Smith) and another labled Xevious UNENCRYPTED (written by my friend Tom Flaherty). Neither worked in the 7800, and the Xevious one told me why it didn’t work: It said unencrypted (which was technically un-signed, but that’s what we called it back in 1984).

I did some research, it turns out nobody uses EPROMS anymore, and most non-volatile memory in modern electronics use flash. Back in the old days we had a very expensive Data I/O gang programmer, and even on ebay these days, they are still quite expensive. Fortunately there’s lots of interest in vintage electronics (everything from old home computers to old engine computers) There is (of course) a chinese company that makes a relatively inexpensive line of programmers called Xgecu. Unfortunately, using them requires you to use a somewhat suspicious Chinese download program that only works on Windows. I’m a Mac and Linux guy these days so that wasn’t going to fly. I did find out that two of the older models that they make were reverse engineered by David Griffith and he wrote an open source command line utility called minipro https://gitlab.com/DavidGriffith/minipro.

TL866II+

Unfortunately the current shipping version of the Xgecu programmers aren’t supported by minipro (Conversations I found online indicate that David tried but ran into difficulties because the manufacturer was actively trying to keep people from finding out how it works. I searched and found that Jameco was still selling the TL866II+. It was a little more expensive than the very few chinese sellers I found that carried it, but I was impatient and ordered it from Jameco (besides, Jameco is grate for a lot of cool stuff!) I got it in a few days and I was able to read out the EPROMS from my development carts.

It took a little research (a topic for another post) but I figured. out how to assemble the bits from the EPROMs into a form that was playable by the modern Atari 7800 emulator A7800. Most of the games played, including my two “unplayable” games (The emulator doesn’t check the signature). I didn’t check all of them, but a few I did a binary comparison with downloads of the release ROMS and they were identical.

My first problem, I didn’t have any blank EPROMS and I didn’t have an EPROM eraser. EPROMS use strong, short wavelength. (250nm) UV light. I tried a UV lamp I have used for “retrobrighting” old plastics, as well as a UV flashlight, but no luck. I wondered if one of the many phone “sanitizers” that became popular during the pandemic would work. It turns out there are junk ones, (using LEDS) and good ones (with real tubes) and the good ones are pretty expensive new, but it turns out there are lots of these on Facebook Marketplace, and I was able to get the “Phone Soap” UV sanitizer for a really good price.

With two tubes, you can also put eproms back to back and double up the capacity.

It totally wipes the EPROMS in it’s normal 10 minute cycle!

Using the a7800basic/7800sign command, I was able to verify that the Robotron and Xevious ROMS were unsigned, I signed them and was able to burn the Xevious ROMS and play them on the actual Atari 7800!’

It turns. out, I got lucky. I started trying to burn the robotron ROMs and I got lucky again with the first one, but all the rest Failed to verify after only writing one or two bytes. I thought, maybe they are just old and tired, I tried putting them through the eraser multiple cycles, and still fail. I ordered some new blank ones from Jameco, and they all had the same error!

Time to hit the datasheet

I noticed that the programmer reported the pulse time , VCC, VPP and VDD voltages for programming.
It was reporting VCC, VDD = 5V, VPP=18V and pulse time 200 ms. The first thing I noticed was that the datasheet says 50 ms for the programming pulse, and I tried changing that parameter, no luck. It also said VPP = 21 V and NO DICE! that voltage wasn’t available on the TL866II+ ! (note, that if you look at the same part number from different manufacturers, there are a wide range of acceptable voltages.)

I wondered if you could separately apply that programming voltage or if it needed to be in step with the pulses. The second would definitely be possible, but in terms of time, it might be cheaper to try to find another programmer (the older model could go to 21 V).

I bent out the VPP pin and stuck a wire in with the gnd pin and applied 21V with my bench power supply.

It worked!

It worked, but bending the pin would not be a strategy I could use very many times. I ordered some ZIF sockets, but as you know, I’m impatient, so I found a 28 pin (narrow) socket, and cut it in half and soldered it up on an adafruit perma proto board.

It works very reliably! I was finally able to burn the Robotron roms and play them!

Flexible Wifi Doorbell

A long, long time ago, we moved a door from our kitchen to the hall, and in the process, our doorbell was moved into the basement stairs. We can barely hear it on the first floor, and I spend most of my days on the third.

I know I could buy an Internet doorbell, or a simple wireless doorbell, but I really liked the idea of being able to tap into any events, and keeping all the data in my own network.

I bought a 433 MHz doorbell that I knew someone else had controlled from an Arduino (I’d normally give credit, but I lost the reference). I didn’t want potential network failures to keep the regular doorbell from working, so I decided to always trigger a relay and send the wireless doorbell code, while informing a messaging server of the events. This MVP is great because it improves my doorbell situation while providing lots of room for growth, such as triggering future security cameras, sending messages etc.

433 MHz Doorbells

433Mhz RF Decoder Transmitter With Receiver Module Kit For ARM MCU Wireless  Geek - US$2.99

There are some very cheap 433 MHz transmitter/receiver pairs (<$5) that are compatible with a lot of the wireless doorbells. I ended up using the RC-Switch library (available from the library manager). It’s also supported by the RadioHead library.

You only need the receiver to decode the transmission from the doorbell’s pushbutton. I just hooked it up to an Arduino Uno and ran one of the receive example sketches. You might get several different “packets’ with different codes, but one of them is the right one. Hook up the transmitter, and transmit the codes one at a time until one of them works.

Here you see a rough prototype with a switch standing in for the doorbell button.

Next post we’ll pretty it up, and show some code!

Wyostat: Open Source Thermostat Pt. 1

Does the world need another connected thermostat?

When my thermostat went on the blink last winter, I looked at Nest, and Ecobee, and the other me-too thermostats, and I decided I would rather build my own.

  1. If Nest goes out of business (or even more likely, Google decides to go a different direction),  all that cool connected functionality pffft!
  2. If I want to control it just inside my house, I don’t really have that option.
  3. Some of the connected thermostats also offer remote sensors, behavior learning, etc. but they are expensive, and you have no control.
  4. I have a two wire system. While some of the connected thermostats do power stealing (Nest), I wanted more powering options.
  5. I’ve been playing with ESP32’s and I’ve found them powerful and cheap!

Prototyping

Most home hvac systems run on 24VAC. When I moved in to my house, it had one of those classic round bun thermostats that tilt a mercury switch with a bimetallic spiral. More modern systems have an additional C wire for power (and separate fan  and cool wire). This meant that I would be powering the thermostat externally. A little googling and I found this info on thermostat wiring:

I found a triac board offered by another maker and open source enthusiast:
http://makeatronics.blogspot.com/2013/06/24v-ac-solid-state-relay-board.html


It features three triac channels with Opto-isolated inputs. The control signals seem to work at 5V or 3.3V.

For the controller I found a dev board with an ESP32 module, SiLabs usb controller, and a small monochrome OLED display. It’s sold as Wemos Lolin, and it has a Wemos-like logo on the back. it’s actually a clone of a D-Duino-32 by Travis Lin.

I mounted it on top of the triac board, with a laser cut plate to mount the same as my existing thermostat.

I used a Sparkfun TMP102 as the temperature sensor. I floated it to keep it off the cold wall. Figured I’d mount it in a case later. It worked great! The next installment will cover the PCB design and debugging. The code and the EDA files are at: https://github.com/wyolum/wyostat

Lasercast Activate!

I recently got my thumb reconstructed (due to Osteo arthritis). And my new cast felt like it could use an upgrade. Laser! I figure it will be a good addition to my mad scientist costume for Halloween. Chinese laser pointer from ebay or aliexpress (don’t remember, I have a drawer full of laser modules). Adafruit powerboost 500 basic (If I’d had the full one, it could charge too, but this is what I had lying around).  I designed a very basic platform in OpenSCAD, and stuck the board down with mounting tape. The enable switch is soldered directly to the board (I cut off one of the terminals.)

Both the laser platform and the activation button are mounted with Velcro (the cast is coming off…) the button is superglued to the disk that holds the velcro dot.

If you want to make it, it’s very likely that your laser module will be sized differently so edit the openSCAD file to  fit.

3D printed circle the same size as a velcro dot

Arduino Robot Class preview

I’m teaching an Arduino Robot class June 29 from 6-8pm at YouDoitElectronics in Needham, Ma. The cost is $99 and you get to take home the robot you build. I’ll show you how to use an Arduino to control DC motors, and read sensors to react to the environment. The robot we’re building will have a sonar sensor for distance, and two line detectors for following a line.
To register email your name phone number and number of participants to events@youdoitelectronics.com. Please include Arduino Robot Workshop in the subject line. You will receive a call back within 1-2 business days. Fee is required at time of registration prior to the start of the workshop. Once registration and payment are complete a reservation confirmation number will secure your spot.

DIY Rayguns!

IMG_20160117_244535475

I’ve been going to Arisia (one of Boston’s Science Fiction Conventions) for several years. I always have a great time, and it always amazes me the amount of volunteer effort that goes in to providing amazing programming for everyone. This year I wanted to give something back so I came up with the idea of people building rayguns.

(NOTE: My extra kits are available in my etsy shop: https://www.etsy.com/listing/265475569/diy-raygun-kit)

Regular LED strip is super cheap when you order it from China. It normally runs off 12V, but a 9V battery lights it up just fine. I created a simple laser cut frame to put some LED strips, and then some cool laser cut acrylic disks to give it that groovy 50’s raygun look.

I bought most of the parts myself, but special thanks goes to my friend Jeremy Green at Charles River Maker for donating Laser time for cutting the kits. He’s your goto guy for design, prototyping and digital to physical services with laser cutting and lots of 3D printers!

IMG_20160124_200031275

A switch makes the trigger, and there’s a fin with holes to add decorations.

IMG_20160124_202035981

First cut a strip of LEDs. Mine consisted of groupe of 3 led sections.. Cut a strip of 5 sections, two sections on each side and one straddling the middle:

IMG_20160124_200123002

next glue on the handle “dimensional” bits. These are mainly to make a recess for the battery, and maybe wrap the handle. Super glue works pretty quick, but you could probably use wood glue or whatever is appropriate for your frame:

IMG_20160124_200915995_HDR

Glue the trigger button on, (kindof low, as the disks are pretty close. Actually I moved it down abit after I put the disks on (later step)

IMG_20160124_201644540_HDR

Line up the battery clip and shorten the leads to connect one end (I chose the red, positive wire) to the positive contact on the LED strip. A small wire went from the negative contact to the switch and the other lead of the switch to the negative lead of the battery clip.

IMG_20160124_201656322

Test, viola!

Next line up the disks where they fit. back them off and put a drop of superglue where each disks goes in order.

IMG_20160124_202344870

IMG_20160124_202812456

The source files for laser cutting are at: https://github.com/osbock/Baldwisdom/tree/master/DIYRayguns

And now a few pics from the workshop at Arisia!

IMG_20160117_244513394_HDR

IMG_20160117_244050950_HDR

IMG_20160117_244531403

 

 

 

Paper Circuits Workshop

I led a paper circuits workshop at the Auburndale Community Library, and I thought I’d share a few thoughts in case you’d like to try it on your own. By the way, all the photos in this post are by our host Dana Hanson, a good friend and one of the key volunteers that keeps the Auburndale community library going (with no municipal support!)

I let the library know that it would be ok for all ages, but if kids were under 7, a parent should stay to help. We got lucky in that we had a couple of parents who either got it right away or picked it up very quickly and they were able to help tremendously.

The first I saw this idea was on the MIT High Low Tech site and they have some good pointers. They use surface mount LED’s but they are quite difficult to tape, so we modified with regular LED’s.

Setting the basic rules: Lithium batteries need to be recycled (and don’t eat them…), What is a circuit (relating to circles…) watch out for short circuits, polarity of LEDs. This circuit is very forgiving, the internal resistance of the coin cell (we used CR2032) means you don’t need a series resistor to limit current for the LEDs, and also means that short term short circuits don’t destroy the battery immediately or cause a fire!

Some Clown

We set up a station to hand out materials at the circulation desk. Next time, I think I might divide it into several stations. The most time consuming part was letting them pick which LEDs to use. You could either limit it to one kind, or spread it out a little. You could have people just pick them from bins on the table, but sometimes people take too many. (It wasn’t a problem here….) My son’s Mason and Grant assisted me both in preparing and in debugging people’s circuits, and were indispensable.  25 Kids with about 80% of them needing help would be too much for one person.

Critical help

One of the mothers came up with a good way of making the connections more reliable add copper tape under the leads of the LEDs as well as on top.

Hard at work

Beautiful artwork

One of the book racks made a nice display for the finished work.Gallery of creations

 

 

 

Electrify Your Halloween! Making it Move!

In late September, I  led a workshop at the Duxbury Free library on making interactive Halloween displays, and more recently I set my project up on our porch for Halloween.  One of the most effective ways to make your front porch scary and immersive is to pay attention to sound, and to make things move.

The first part (making it scream) was documented in this post. This is about the movement part, creating a pop-up inflatable ghost, completely from scratch. It was very successful and popular!with the kids. Unfortunately I didn’t get any video, but I can cover the construction.

I like inflatables, and wanted to try making my own. One thing that made this really easy was a really cool product called Powerswitch Tail. This allows you to control an AC outlet from a digital signal. Its available from Adafruit and Makershed. It’s essentially a short extension cord with an opto-isolated relay in line. This eliminates any dangerous AC wiring with relays, and protects your Arduino and other circuits as well.

Next I needed to make the Ghost. I use white kitchen trashbags at home, and I took three of them, two laid end to end (with the end of one cut off.) I cut the third bag in in thirds and used the outside sections for arms. I used simple transparent packing tape to bond the edges.

 

A total of 3 bags (top and bottom, both arms)

I used one of those small vortex fans, and taped it around the output side.

 

Boo! Attached to the fan, and inflated.

Hook the powerswitch tail to a digital IO on an Arduino and you are good to go. As I mentioned in the last post, you can get the code on github here.

 

Electrify your Halloween! Making things scream!

In late September, I  led a workshop at the Duxbury Free library on making interactive Halloween displays, and more recently I set my project up on our porch for Halloween.  One of the most effective ways to make your front porch scary and immersive is to pay attention to sound, and to make things move.

In this post, I’ll cover making sound, the next post will cover my moving ghost.  There are lots of ways to make sound by control, and in reaction to people coming on to your porch. My original idea was to use a motion sensor, and then trigger an AC relay to turn on a cassette boombox. Because the boombox could have the mechanical play button pressed with the power off, when you turned the power on, it would play.

Then, I ran across the sparkfun voice recorder module at YouDoIt Electronics (my local hacker supply place!)

There are other ways to make sound (and probably easier) but this was fun, and I’d already spent the money. If I had to do it over, I might use either the Adafruit wav shield, or a new entry, the very cheap Garan MP3 Module from Seeedstudio (I’m probably going to order one of these for next year!)

This breakout is for a chip that was originally meant for a voice recorder with some buttons to trigger the different segments. It’s not very well documented on the sparkfun site, but one of the comments pointed me to http://ianlangelectronic.webeden.co.uk/#/voice-recorder/4562321245. That with the datasheet, let me build a simple Arduino library to control it. You can download it from github here.

First you need to wire it up. Here’s a fritzing diagram showing the connections:

sound sampler hookup

 

In order to make it more reliable, I mounted it on a protoshield. I also like using a proto-screw-shield to hook up the external components.

In this case, the motion sensor (https://www.sparkfun.com/products/8630) on the right, and the wire going off to the left connects to a powerswitch tail to control a fan for the ghost.

I used PC speakers connected directly to the jack on the sparkfun voice module.

A little about the PIR motion sensor. The data sheet says it operates at 12V, but sparkfun says it operates from 5-12V. I have a Parallax module that is a bit easier to use, but I couldn’t find it and once again YouDoIt rescued me with the sparkfun part. A few other things to note. Since it is open collector, you need a pullup on the input. I used internal pullups in my Arduino code. When I tried to run the system off of one of those USB battery packs, it was unreliable and had very short range. Using an AC adapter worked fine, but if I had to do it over, I might use a motion sensor designed for 5V. The other thing was that the wire colors were confusing. Ground was White, Signal was Black, and VCC was the only one that had a “normal” color of red. (GND is usually black.)

 The code

You can find the code on github here. You can control it via the serial port by entering a message number (0-8) and then ‘r’ or ‘p’ for record or play. It uses the onboard microphone for recording.

I chose to use the button on the protoscrew shield as an arming button, but you can also control that through the serial port. ‘m’ toggles whether or not motion activates the sound and PowerSwitch tail output.

Here’s the complete code (at the time of this post) remember to install the ISD library first:

[code]

#include <ISD.h>
// delay between motion activations
#define ACTDELAY 10000L
// motion sensor
#define MOTION A4
#define ARMButton A5
// powerswitch tail
#define powerSwitch 7
// LED
#define LEDPin 13
ISD isd = ISD();

void setup() {
Serial.begin(115200);
// motion sensor
pinMode(MOTION, INPUT);
// open collector requires pullup
digitalWrite(MOTION,HIGH);
// powerswitch
pinMode(powerSwitch,OUTPUT);
digitalWrite(powerSwitch,LOW);
pinMode(ARMButton, INPUT_PULLUP);
pinMode(LEDPin,OUTPUT);
Serial.println(“enter a message number to play or record or r/p”);
}
// globals
int msg =0;
boolean motion = false;
boolean soundonmotion = true;
boolean powerswitchonmotion = true;
int lastReading = HIGH;
boolean ARMState = false;
long lastActivation = 0L;
void loop() {
// check arming button
if (digitalRead(ARMButton) == LOW){
ARMState = ARMState?false:true;
// cheap debounce
delay(500);

if (ARMState){
digitalWrite(13,HIGH);
soundonmotion = true;
motion = true;
powerswitchonmotion = true;
Serial.println(“Armed!”);
}
else{
digitalWrite(13,LOW);
motion = soundonmotion = powerswitchonmotion = false;
Serial.println(“Unarmed”);
}
}
//check motion sensor
long currentTime = millis();
if (motion){
int currentReading = digitalRead(MOTION);
if ((currentReading != lastReading) && (currentReading == LOW) && ((currentTime – lastActivation) > ACTDELAY)){
lastActivation = currentTime;
Serial.println(“activating motion”);
// if enabled turn fan on first
if (powerswitchonmotion){
digitalWrite(powerSwitch,HIGH);
delay(1000);
}
if (soundonmotion)
isd.play(4);
if (powerswitchonmotion){
delay(5000);
digitalWrite(powerSwitch,LOW);
}

delay(1000);
}
lastReading = currentReading;
}

if (Serial.available() != 0)
{
char c = Serial.read();
if (c >= ‘0’ && c <=’8′)
{
msg = (int)(c- ‘0’);

Serial.print(“msg selected: “);
Serial.println(msg);
}
else if (c == ‘r’)
{
isd.record(msg);
}
else if (c == ‘p’)
isd.play(msg);
else if (c == ‘m’){
//toggle motion activation
motion = motion?false:true;
Serial.print(“motion is “);
Serial.println(motion);
}
else if (c == ‘f’){
powerswitchonmotion = powerswitchonmotion?false:true;
Serial.print(“powerswitch is “);
Serial.println(powerswitchonmotion);
}
else if( c == ‘s’){
soundonmotion = soundonmotion?false:true;
Serial.print(“sound is “);
Serial.println(soundonmotion);
}

}
}

[/code]