Archive for December, 2023

optoisolator breakout

December 28, 2023

In my time interfacing with 24v bullshit hardware I have found it useful to implement optoisolators to protect my nice electronics from the nasty outside world. Also, it makes a convenient inverter or level shifter. 

This is what I’m going to call the most basic version. You can see it’s from a previous project as well. What’s going on here? Well, the left side is taking a signal and using it to light an LED. That’s all it is. You take whatever signal you have and light an LED. In this case it’s taking 5v DC pulses and we’re current limiting it and those pulses are producing pulses of light. On the right side we have a phototransistor. That seems a bit complicated so imagine it’s a button. Whenever the LED lights, but button connects pins 3 and 4. That means when no light shines pin 8 is pulled up to 5v with the 10k resistor. When the light turns on pin 8 is pulled down to ground (and some current flows through the 10k resistor, but not much). With that we can see that this is that’s known as an ‘inverting’ configuration. When 5v is present on the left side, the right side is grounded. 

This is very similar, but if I have enough voltage and I want to know if the optoisolator is on, I can add another LED in series. In this case I have 24v, so 2 LEDs is no problem and the current is regulated with the resistor. The right side is the same as before. 

This is a little different too, on the left side you can see we no longer have an LED in series, it’s in parallel with its own current limiting resistor. This lets us use a lower voltage but still have that visual indicator. On the right side we have something new. There’s a 24v source voltage, but when the LED is not shining the pin is pulled down to ground (and has a small capacitor to filter out spikes). When the LED is lit the 24v flows to the pin (the pi in this case is a raspberry pi with a 24v input module on it). This reverses the polarity from what we saw before. A voltage on the left means we get a voltage on the right. 

Here’s that implementation but with slightly different optoisolators (these have 2 LEDs inside so they work with both polarities) and we have an additional resistor on the output. 

I added those resistors in this case so I could drive things like LEDs that needed their own series resistor, but I didn’t want to hand-wire them in off the board. In most cases those can be 0 ohm resistors as I labeled. 

This is the generic version of a pretty standard configuration for an optoisiolator, I even added some notes for why I chose those values and omitted the output pullup. 

If you try you can pack those in pretty tight (especially if you use both sides of the board). 

Well, that’s my quick overview of optoisolators, just remember to use the output for some DC source and make sure the polarity is right and they’re even easier to use than regular transistors! I have the first small diagram on github here, the rest are part of other projects. 

Poly88 boards/addons (first batch)

December 27, 2023

Today I bring you three small boards related to the poly88 computer I have talked about before. I’ve already done a replica of the backplane, now I have the least exciting part: the keyboard adapter PCB

This little nothing board adapts the DIP14 socket on the VTI card to a completely un-needed DB25 just so it can bulkhead mount in the back chassis. That then connects to the full 25 pin ribbon to the keyboard which only uses a maximum of, how many signals? 14! I’m sure you guessed that. 

This section from the VTI manual gives a strong indication as to what you should or should not do when tweaking this part of your system for a different keyboard. You can strap it for regulated or unregulated positive voltage and some negative reference voltage, but the parts are not provided in the kit and you pick your own components to suit. I have made my own documentation for this in the schematic I drew. 

You may notice G1 and G2, that’s because those ground wires are not connected together with the rest and can be used for other things, I think, I’d have to check the keyboard and VTI schematics, but I know for sure that is how the copper layer works on this tiny board because I recreated it!

Now I might go through and curve those traces to make it look a bit more vintage, but other than that this is a faithful recreation if you happen to be missing one of these. The next one is a little more mysterious.

This is the CPU board from polymorphic systems. 

Do you notice anything different about this one? There’s that little daughterboard in the lower left corner. What does the S100 computers site have to say about that? “There was a small add-on card that was sometimes attached to the Poly-88 CPU card that had to do I think with processing interrupts. It is shown above. Would welcome comments on this.” Now that’s not too helpful. What do I make of it?

The chip the daughterboard replaces is a 74LS148, an 8-to-3 priority encoder. That’s kinda like the opposite of an ls138 that makes one select line out of binary data, this makes binary data out of which line is selected, but it always reports the highest select line in the case more than one are selected. That’s the ‘priority’ part. The daughterboard still has one of these chips on it, so what gives? The other two chips are 74LS75 latches that appear to be driven by pin 15 on the board. On the 148 that’s an output so how does that work?

Factory bodges! I won’t drag you through the entire ordeal, but pin 15 of IC2 (what was originally a ‘148, but this pin was an unused output so it just has nothing going to this pad) is driven through a gate on the inverter of IC12 (vertical wire seen above) which is sourced from the latch at IC38 pin 2 that also enables use of some address decoding ‘138s. To me it looks like the ’75s are being used to latch the state of the inputs to the ‘148 at the right time, perhaps to fix a timing bug. 

To verify it I also rebuilt the board fairly authentically. If anyone wants to upgrade their CPU board I guess you can now. The last thing is more of a DIY job to make repair/development/everything easier. 

I built this to intercept the ROM sockets of the CPU board as well as the address lines of the CPU and replace the three 2708 ROMs with a single 28C64 EEPROM. For people without a 2708 burner or replacement 2708s this may be useful. I’m actually pretty happy with the circuit I have. 

I capture all the data lines, most of the address lines, and the three chip selects at the ROMs themselves. 

I capture the extra address lines directly at the 8080A (they are not present at the ROMs because they are used to decode which ROM to use). 

I then Diode-OR the select lines together to select this ROM whenever any of the chip selects are enabled. I don’t need to un-decode which chip select goes for which bank because I picked up the address lines at the CPU and I already have those signals. 

I put the passives on the top of the board and while my 3d render places chips on top of the board at the CPU and ROM locations, my intention is to populate pins on the bottom of the board to slot into the sockets on the CPU board. You can then add your CPU back on top and your EEPROM (which has two banks now, for two different boot configurations). 

That’s my three increasingly complicated boards that have to do with the Poly88. I may eventually have entire repros of the main board set for this system, but that comes after general use boards like the SSM IO-4. You can find my board designs on github here, but I haven’t had any of these made yet, and I might not need them. But they’re there as documentation at least. 

Atari Lynx 2 video connector for screen mod

December 26, 2023

This is a very unfinished project, and the unique thing I’ll be adding isn’t even the issue (I just can’t make it play games right now). While I was diagnosing this temperamental Lynx I got infinitely frustrated with the flat flex membrane connector that came with the BennVenn IPS screen kit. It’s tiny, it’s hard to install with my big clumsy hands, and I’m worried about breaking one of the connectors. I have come up with a solution and it involved a tiny bit of detective work. 

This picture is almost correct and not even from the guide for the screen I have. This picture is from the guide for the Rev.4 screen, and it almost works for the IPS V1 Rev.3. The difference is that for this older screen you soldered the backlight pin to that second header so the backlight button can cycle digitally through modes. The new version takes in a voltage from, I think, the contrast pot and varies the brightness that way. How do we do this though?

For that we go here: the overall guide page for all the revisions and this unrelated image of a modification to the flat flex cable I don’t like. The picture is calling out a wire to cut for a specific motherboard revision, but for me the interesting part is the second to the left wire. That one is not in the older diagram. What is that pin?

According to the schematic and this page it’s LCDTPR which has something to do with the contrast circuit. The important thing is I know where it goes and I checked the continuity with that pin on the tiny flat flex connector and found it is wired to the hand-wire pad for ‘brightness’ so I just completed the wire myself. But there’s one last thing I wanted to do to make doubly sure everything would work fine. 

According to this page certain variants of the Lynx 2 (not mine, I don’t think though) have these two pins bridged, so if you make that connection on the motherboard the Lynx will work with any screen regardless of what it started out wanting. So I did that. 

Here is my replacement for the flat flex ribbon connector that I actually like a lot better. I’ll shorten those wires on the screen side eventually, but this is so much easier to work with now that it’s done. I even incorporated that brightness button pin. By the way, on the IPS V1 Rev.3 the brightness pin should be soldered to the SCANLINE pad on the LCD which lets you cycle through several scanline modes as well as having one of them enable VGA out. These are engaged by single button presses to cycle through, and I think there’s only about 4 modes before it comes back around. This fact didn’t seem to be documented anywhere useful so there it is. 

There’s the finished connector. Let me show you another source of my immense pain with this project. 

This is the button (and power LED) harness cable. I thought this was a little silver rubbed on to the carbon contacts, but no. That’s the contacts being rubbed off from too many insertion cycles. This really hampers diagnosing when the device is FALLING APART AROUND ME IN NEW WAYS as I try to fix a different issue. There’s three things you can do to fix this. First thing: trim off the top edge of the cable. You can only do this a couple times, but it does expose brand new carbon area to connect to. If you have to reassemble it ONCE more that may be your best bet. Second thing: order a new one. People reproduce these and they’re not expensive. I haven’t gotten one in yet, but I assume it will be at least as reliable as the original (hopefully more). The third option is a bit of an experiment and slightly desperate on my part. 

Silver conductive paint and a sharp knife to scrape it into lines after. I don’t really like this option as I feel it scraped off too easily and will not be as resilient as the original coating, but if you have a nail polish bottle of silver carbon contact repair paint go ahead and try it. I just hope it doesn’t crumble into powder in the connector and short stuff together. If I thought I had a steady enough hand with conductive epoxy that I could add a pin header connector to the ribbon I would. I might desolder the flat flex connector off the board, connect it to this ribbon, then solder my own connector in the middle like the other one but that’s somewhat extreme. 

Anyway, thoughts on the Lynx video mod. I might go grab my retro chip tester pro and do some ram tests. That’s just parts swapping, I can do that easily. The problem with my hot glue reinforced connector is that stuff is not great boiled in isopropyl alcohol for a half hour so I can’t really ultrasonic the board anymore like I used to. 

SCART TV side breakout

December 25, 2023

Here’s another small one, I built this for SCART modding old CRT monitors / televisions. 

I broke out every pin on this bulkhead connector so you can easily wire them up inside the monitor. I didn’t add any circuitry onboard because I don’t know the common mods yet, but this is worlds better than soldering to the pins directly. 

There are also a lot of return lines on SCART for video fidelity reasons. I didn’t tie them all together, but if for your application you need to combine some then you can with these convenient jumpers. This is a complement to my scart cable end breakout from before, and hopefully is of use to people modding SCART into things. You can find my board design here, and remember:

wii mini PCBs

December 23, 2023

I picked up a stylish wii mini on a trip to Canada… a while ago. I’ve been procrastinating this project for a long time and I guess I still am. For now I want to capture all I’ve learned about the wii mini and post about some untested boards I’ve put together to restore lost functionality to it. 

This is a cool late era console that simplified things by going with a tray loader instead of a slot load dvd drive mechanism (not the first time Nintendo’s done this). This console has some serious limitations though. No gamecube controller ports. No wifi or any network connectivity. No reset button. No SD card. No component video. Only one USB port. There’s a lot there and most wii exploits and hacks use some of those things to work. You can use an exploit called bluebomb to hack in over the controller’s bluetooth connection but you have to be very very careful what you flash to it because regular wii software looks for the wifi card and if it’s not found you’ve bricked it. There are old guides, but stuff is falling off the internet. The place to actually find good info is HERE! There’s an active wii mini hacking discord that contains very knowledgeable people on the current state of things. So what have I done so far on this?

I correlated my wii mini board, my wii main board, the current online document containing reverse engineered pins on the wii mini, and the wii trimming guide to find out what functions every test point I can find has to create this document. The fun thing about the different revisions of the wii is they largely just removed features, so that means that the first model is a superset of everything else. From there it looks like they kept the same schematic, the same reference designators for parts and test points, and just took stuff out. That means if a test point or resistor exists on the wii mini, it did the same function on the original wii. Lots of stuff is moved around, but the circuit is still laid out in the same way. Using this information I was able to trace a lot of the points on the wii mini for adding back features. 

Following an application note from Würth Elektronik that I have since lost I built this circuit for adding back the second USB port. The missing stuff is ESD protection, so you could omit it, but I wouldn’t advise that when these wires lead straight to the BGA main chips. I used this TVS module, this Ferrite, and this filter. 

Does it work? I have no idea. Why wouldn’t it I guess? I just implemented the reference circuit on this breakout board. You could use it anywhere, honestly. Next is the Gamecube controller ports. 

This is what we have from the wii trimming guide. Capacitors, filter ferrites, and individual diodes. Instead of trying to figure out the values of all those components I tried something different. 

Do those look familiar? They should. I decided since the gamecube controllers each used one data pin, one ground pin, 3.3v for logic and 5v for rumble I could get away with the same esd chips I used for USB. they have the same nominal data voltage and even though they’re not paired data lines, I don’t see why the USB diode packs can’t work for two independent signals. This will be a fun one to try because I don’t know anyone who’s broken out all 4 controller ports before. Beyond that there’s one more major part. 

The gamecube memory card slot. I had a scrap wii motherboard so I salvaged an original memory card slot from there and tried to lay out a footprint for it. I got it wrong, but I think I fixed the version on github. This again uses the same esd protection ICs as the USB one does, but I have justification for that. 

The original wii uses very similar parts for this. So there’s my contributions to this hacking scene. You can find other existing and *tested* upgrades out there already like the sd card adapter, the wifi card kit and the rgb restoration. If you want to try any of my junk it’s available here. 

Linksys board templates

December 22, 2023

For years, decades even, I’ve come across cheap or free linksys networking hardware. Now when I say linksys, it’s not the brand that means anything here. They were acquired by cisco and absorbed into that model of dropping support to push consumers in to more and more frequent expensive purchases. I mean the form factor of old linksys devices were just great. 

SONY DSC

This is the WRT54GS, and like other linksys devices from the time it has this compact, neat little stacking form factor. If you need a modem, same shape. If you need a switch, same shape. They even had VOIP boxes and whatever else in this shape. They’re nice, they stack, and largely they’re hackable. These days though, the hardware is feeling a little old and there’s just not really anything more being made shaped like this. They are still available (although not like they used to be) at thrift stores, garage sales, and in the trash. So what do we use them for?

Enclosures! I went through a series of these and found the common elements: hole placement, barrel jacks and buttons, LEDs, everything that you would need to make a seamlessly integrated board that just slides into a spare chassis. If you want to salvage some parts from the scrapped device even better, they’ll fit right in. My design is basic and assumes you use the original 12v power supply and want to regulate it down, but everything else is up to you. I didn’t route the board because that’s a thing you do on a per-application basis but you can use these for whatever. If I had a reason to I’d make it into a pi compute module carrier, or maybe just an esp32 based status board for all the devices in your home (there’s enough lights). 

I went through 4 slightly different enclosures and made one ‘universal’ board, but the other ones are available too. I haven’t had call to use these but I thought it would be a good starter for people interested in reuse of enclosures instead of always designing or printing new ones (I have been reusing enclosures lately). Anyway, this is a short one because I never had call to use any of these but they’re available for anyone who wants to try here. 

556 power on reset

December 21, 2023

Previously on small stupid circuits that aren’t stupid if they work… I showed what I’m calling a power on reset circuit. It’s like the lamp timer for a dodgy server solution to other problems. For when there is a ‘better’ way, but god is this easier. 

After I built that one I had another issue. I wanted to control this mario table lamp via IoT, but when power was applied it was dark. I built the exact same circuit as before, same values even and it worked great. Then I had some tablet computers I want to power on when plugged in and again I’m finding that I want that circuit (but with different values this time). For the tablets though I want to make it smaller

Two things about this layout. First, you don’t have to use electrolytic caps, you can solder ceramic ones on the same pads. Second, I know I could have made the board a bit smaller but it honestly seemed small enough. Besides, I needed to detail on the back how to calculate the time. 

This explains how to calculate the time for the delay before the pulse and the pulse itself. Even though I don’t usually have an issue with silkscreen over vias I try to avoid it, and with the through hole caps this was about how small I could make it and keep this legible no matter what board house you fab it at. 

The circuit is the same as in the other post, but I added a trigger pin so you can externally retrigger the pulse if you like. It’s held up by R5 though so you can leave that pin floating. I think this is a super useful circuit to have just a oneshot pulse whenever power is applied. Someone probably makes one of these, but I didn’t find it so I have this. The boards haven’t been made yet, but they are up on my misc boards repo here. 

TIB PLC DD-001 cartridge replica for the commodore 64

December 19, 2023

This is a project I took on without any particular desire for the final product. I was browsing through some commodore projects looking for something to enhance my PET when I cam across a repository for a replica board that was unfinished. I offered to finish it based on some other reproduction that I found that was done in Eagle, but that changed some aspects of the original. I undid some of those changes but added some of my own. 

When I was making my replica I didn’t even realize there were board pictures in the repository already, I could have tried to make my replica as authentic as possible, but I do like some of the changes I made to it. 

The first change I made was to properly implement the wires that get twisted in an IBM standard floppy cable. I have noted how the eagle schematic did it, but I don’t think that’s correct. I did say “IBM standard”, not “Shugart standard” because when IBM made the personal computer they invented their own twist on the floppy standard that didn’t require jumpers and termination resistor packs. 

This is an odd one, I think the data sheet for this floppy disk controller is expecting a different type of crystal and they used different caps to compensate for that? Or maybe the engineer just got a batch of a certain crystal and tuned the circuit to them, these weren’t very common. 

I did note all this on the board as well, and as you can see I added a socket for the PLCC chip instead of soldering it straight down. That’s really it for my contribution but what is this thing?

It is meant to give IBM formatted floppy support to the commodore 64 to facilitate moving programs and data back and forth to the ever growing PC market. I say “meant” to because it has a number of bugs. When I started to write this up I found that much to my surprise someone has forked the original repository I contributed to and is working on code for this thing! I haven’t dug into it in detail, but complete support for transferring data to and from the commodore via IBM floppy interface may be coming. In the time between when I started this project and now I have gotten better at using goteks running flashfloppy so that would be my medium of choice to hook up to this, so I will continue to track its progress. 

Dual LED board

December 18, 2023

I already designed a board that lets you see the state of 8 5v logic pins at once. You can tell not only if they are pulled up, but also pulled down or floating. The way I designed it I needed the total rail to rail voltage to be greater than twice the forward voltage of the LED. That did not work for logic levels around 3.3v and lower so I came up with a different solution for them. 

This solution has two LEDs wired back to back, but not the same way as previously. What happens here is that the red LEDs are wired to 3.3v and through their own resistor to the logic pin, the green LED follows the same circuit but with the reverse polarity for driving the LED with a logic high voltage from the logic pin. There is a problem using this design for higher logic voltages though. Look at the circuit as if there is no logic pins connected at all. You can see that if the supply voltage was high enough to push past the forward voltage drop of both LEDs then they would both always be lit if the logic pin was floating. 

Then the LED states would be both on for floating, a ground at he logic pin would put an equal voltage potential on both sides of the red LED so it would not light, but the green LED would nearly double in brightness, and vice versa for a logic high. You can still use this setup for 5v systems, but it does not behave in a way I would consider intuitive. It could be redesigned to have more series LEDs or diodes to prevent that but you still have to tune it to whatever logic voltage you’re using. 

I think these work well enough, and since I’ve been doing a lot of esp32 stuff lately they’re useful for that signal level. You can find them here with a lot of my other small PCBs that have no other home. 

rat-ratgdo board redesign (esphome)

December 17, 2023

We all agree that Chamberlain sucks. People who wanted to integrate their IoT garage door opener with a home automation system never wanted to have to connect to the internet to do that. Chamberlain whining that they have to shut down access to the API due to ‘too much load’ and the costs associated with that… That’s your own damn fault for designing it so poorly. You should have no one hitting up your servers to open a freaking garage door. If you want to try to turn a product into a re-occurring subscription fee and fail, expect no sympathy. With that out of the way, how do we solve this for the users who actually bought one of these things and expected it to work. 

Enter the RATGDO, this is the abbreviation for “Rage Against the Garage Door Opener” which has been developed to talk on the garage door opener local bus and make available controls you need for automations (or even just voice control). This little device has GPL v2.0 code and a reasonably simple interface for updating and installing it (although for some reason the interesting source code seems to only be in the release packages?). The developer makes the code available for people to use and maintain, but has repeatedly refused requests for board designs or schematics and from what I’ve read removes any github issues associated with that. I’m not gonna attack this guy because I like what he’s done, but now we have the inevitable…

Enter the RAT-RATGDO, a reverse engineered board for the RATGDO firmware. This came about from some people annoyed about international shipping, backorders, and generally the stuff that makes people go “that’s a pretty simple product, I’ll bet I could make one myself…”. The reverse engineering from someone who already purchased one resulted in this reddit thread and then this google sheets document with their findings. When looking through the resulting board designs and github documentation I ran across something else interesting. 

It runs esphome now. I’ve been using esphome with some friends for a number of years now and find that while it’s not optimal for some things, it does tend to work reliably and is easy to code for. The RAT-RATGDO page has a document about recommending using the esphome for of the RATGDO code and I tend to agree. I already use esphome for various sensors at places in my house, so why not one more. Part of the fun of esphome is being able to look at the pin definitions so easily and find out there are breaking changes between various versions of the official RATGDO boards. For some reason the Tx pin was changed… maybe it has better performance now? You can also program these boards easily with a web interface. Want to know the big secret of the schematic?

That’s it. I have even preserved the exact FETs used on the original boards here. The obstruction wire sends patterns (I think?) to describe its state and the control wire is just half duplex serial superimposed on the wire that powers the smart garage door opener button. So what do I have to contribute?

Well, I wanted one so I made one. I used the input contacts as buttons on the board and the state outputs to drive LEDs as outputs for a proof of concept, but it worked great. What I thought I could do was power it off the 12v bus, but that didn’t work so well. As it it my hacky boards now require a usb plug for power. I used some 2n7000 FETs I had lying around salvaged out of something and they work, but I hear there’s some off communication issues infrequently. This is great for making a couple boards for me and my friends, but I alluded to having one more esphome board in my network. Why do I need another one if it runs esphome and will be in the garage right next to another esphome sensor?

Enter my combined atmosphere sensor and garage door opener network interface. I’ve done a few things to this board design that I think push it forward beyond my other designs. The BME280 sensor that I have trouble keeping ambient and not heated by the project itself is now sticking out of the proposed enclosure. I dropped the motion sensor since I get to use the motion sensor in the garage door opener now (and it’s much less touchy). This design uses the same FETs as the OEM RATGDO, but you have the same footprint so I guess you could use 2x 2n7002 if that’s what you have. 

All the pins are labeled for writing your esphome config file and I think this makes a nice compact board design with expandability through the qwiic header. When I get these made I’ll have an esphome config available here and even right now the board designs are on github here. 

[UPDATE] I have added below the wiring I used to create the LED status indicators for the door and the obstruction sensor. The configuration with the red and green LEDs only works if the total voltage drop of the red LED and the green LED exceed 3.3v, otherwise both will light up when the pin there is floating (see this other post). Thankfully I thing that pin is basically always asserted so that should never come up. You are welcome to add those back into your own design, I would recommend gpio16 and either gpio1 or gpio3 which may screw with serial programming, but should not have adverse effects on booting.