SyncFix64 v1.1

Following the first prototype of the LM1881 based SyncFix64 I made a few minor changes, improving the schematics and layout. Then I was ready to order the first batch of properly manufactured PCBs. The boards took a little over two weeks for production and shipping.

This was also my first try at ordering a v-cut PCB panel and I’m quite satisfied with the result considering the resulting low price per unit. I assembled one of the boards tonight and the device is working properly. So I assume the whole batch should be fine.

The project files for the updated version 1.1 of the SyncFix64 are available on Github and here is the list of required components:

C1,C2,C3 0805 100n
Q1,Q2 SOT-23 BSS138
R1 0805 100r
R2 0805 680k
R3 0805 10k
U1 SOIC-8 LM1881
U2 SOT-223-3 AMS1117-50
C4,C5 1206 22µF

Update: There are German assembly instructions available for download now.



Fixing WifiModem64 Version 1.0

As hinted at earlier, I made a couple of mistakes when designing version 1.0 of the WifiModem64 and they will be fixed in version 1.1.

Still, with some minor manual modifications, those first boards are still usable. In short, RTS must be connected to WeMos D7 instead of D8 for the ESP8266 to boot reliably and the WS2812 LED must be connected to WeMos D5 instead of D0 if you intend to use it.

These are the step-by-step instructions to get WifiModem64 V1.0 on line:

1. Re-route RTS

Take a sharp knife, small screw driver or some other suitable tool and carefully cut the old trace to WeMos D8, which is marked (1) in the image below. Use a multimeter to make sure there is no more connection between R6 and WeMos D8. Solder an insulated piece of jumper wire between R6 and WeMos D7.

2. Re-route RGB LED

Take your tool of choice from step 1 and carefully cut the old trace to WeMos D0, which is marked (2) in the image above. Use a multimeter to make sure there is no more connection between DATA_IN of the WS2812 and WeMos D0. Solder an insulated piece of jumper wire between DATA_IN and WeMos D5.

3. Power Safety

Either fit components D1 and F1 on the top side of the PCB (diode and fuse), or close solder bridge JP1 on the bottom side.

4. Power Source

Fit either a 3 pin male header to JP6 and use a jumper to select between internal and external power supply or use a matching toggle switch instead.

5. Level Shifter

Depending on whether you believe that the ESP8266 needs level shifters on the data lines (I actually don’t), either fit the components R1-R8 and Q1-Q4 to the bottom side of the PCB, or close the solder bridges JP2-JP5.

6. WeMos Headers

Solder 8 pin female headers to the top side of the PCB to hold the WeMos module(s).

7. User Port Connector

Bend the copper leads of a user port connector slightly inwards, slide the PCB in between and solder all 24 leads to their respective pads on the PCB.

8. Optional Components

Depending on whether you intend to use them, fit any of the optional components:

  • baud rate reset switch SW1
  • C64 reset switch SW2
  • micro USB connector J2 for external power
  • LED1 and C1 for the RGB status LED
  • WeMos OLED display on U2

Please note that firmware support for the RGB LED and the OLED display is still being developed!

9. Flash Firmware

Make sure the WeMos D1 mini is NOT connected to your C64 before flashing the firmware. Then there are two options. If you’d like to compile the firmware yourself:

  1. Install the Arduino IDE
  2. Install Arduino Core for ESP8266
  3. Fetch the WifiModem64 project
  4. Open, compile, and upload WifiModem64.ino

If you’d rather flash my pre-compiled binary:

  1. Download and extract the archive
  2. Follow the instructions to upload to the ESP8266

10. Initial Setup

Follow Alwyz’s instructions for the initial setup of the modem if you want to use it at 9600 baud.


To save you from the need to open the actual schematics when soldering components to the board, here is the relevant part of the BOM:

D1 B5819WS (0805)
J1 C64 User Port Connector
U2 WeMos_D1_mini_OLED_Shield
R1,R2,R3,R4,R5,R6,R7,R8 10k (0805)
U1 WeMos_mini
LED1 WS2812B
C1 100n
F1 0.5A (1206)
Q1,Q2,Q3,Q4 BSS138

SyncFix64 Prototype

After the encouraging results of my first attempt to fix the composite signal from a C64, so that the cheap TFT monitor could display it, I shared the idea on Forum64 to double-check and get some feedback. Consensus seems to be that the circuit at least won’t hurt the video source. Since, in addition to that, it seems to be working for me, I decided to design a board for it in KiCAD.

The goal was to make it so small that it would fit inside the display’s case alongside the display controller, so I went for all surface mount components. To get immediate results, I created a single sided layout and etched the board myself using the toner transfer method.

Soldering the components to the finished board proved a little challenging, cramped as it was, without a solder mask layer. But it turned out fine and it fits inside the case easily. The display had two separate input lines to begin with, so now I’ve got one fixed for my old C64 and a second “regular” one to choose from.

Update: The KiCAD project including schematics and a preliminary board layout is available on Github now.



Cheap Displays for Old Hardware

A couple of months ago I dug out my old Commodore hardware again and started tinkering with it – the goal being to finally try out a bunch of mods, hacks, and builds that I missed back in the day. To start with, I bought a cheap TFT display for around 13€ to connect to the C64 and C128.

It was meant to sit on my work bench to e.g. quickly test a naked C64 board. It wouldn’t matter if the video quality wasn’t great. But after I made the necessary adapter cable and hooked everything up, I was a little disappointed to find out that the display wouldn’t show anything other than a black screen interrupted by an occasional flicker. I verified that the display itself was working by connecting it to a Raspberry Pi and I double-checked the cable I had made.

Doing a little research, I learned that the video signal produced by the C64 is actually not that great and that problems with modern displays are quite common. I got curious and used my (also very cheap) Hantek 6022 oscilloscope to take a look. The first thing that caught my eye was that the Commodore signal looked rather weak when compared to that from a RasPi.

C64 Composite Video

C64 Composite Video

Raspberry Pi Composite Video

Raspberry Pi Composite Video

So I thought if I amplified the signal, maybe I would get the TFT to display it. I did a little search on how to do this and stumbled across Raphaël Assénat’s page where he describes a problem very similar to mine. The interesting part is that his first impulse too, was to amplify the signal. But later he found out that the signal strength didn’t seem to matter much, it was the unorthodox v-sync sequence produced by the Commodore that confused his display. So he added a LM1881 sync stripper and an AVR micro controller to replace that sequence. Unfortunately, that contraption is very sparsely documented.

C64 Composite and VSync

CH1: C64 Composite, CH2: LM1881 VSync Out

Since he mentions that just “removing” the sync sequence already resulted in a somewhat stable display and that amplification might not be necessary after all, I figured I might just try to get away without the AVR and the amplifier and  I came up with this reduced circuit:

To my great delight and surprise, this yielded instant results! I hadn’t really hoped that this simple improvised circuit would be enough to make my display cooperate.

Of course, there are a few issues and to-dos left:

  1. Ask a few people who actually know this stuff for their opinion and for some advice on the actual components and their values.
  2. Make sure this does not damage the video source in any way.
  3. Revise the circuit accordingly.
  4. Make a nice board with proper wiring and real connectors.

Do you have any thoughts or advice on this? I would love to hear in the comments!


The Modular WifiModem64

I’ve been playing with the ESP8266 since late 2014 and it was love on first sight: so many possible uses for such a small device at such a low price tag. And very early on I thought: wouldn’t it be great to build a WiFi “modem” from this? That shouldn’t be too hard. But I didn’t find the time to pursue the idea then. When I remembered again this summer, I was not surprised but still excited to find that others had had the same idea and hadn’t been as lazy as me.

Alwyz’s instructions on how to build such a device couldn’t be easier! I followed them and it worked like a charm. For the next months, my setup then looked like variations of this:

I wanted something tidier that would still be inexpensive and stay true to the easy-to-assemble spirit of the original version. So I decided to go with the WeMos D1 Mini variant of the ESP8266 modules. It is easily available and for a price as low as $2.60. It is supported by the Arduino IDE, allowing to flash the firmware with no equipment other than a PC and a micro USB cable. This is the board I’ve come up with:

The minimal setup is quite easy:

  1. Solder the User Port connector and the female pin headers.
  2. Close a hand full of solder bridges.
  3. Program the WeMos module and plug it in.

The board offers a bunch of optional extras that aren’t strictly required but may be freely combined to upgrade the device:

  • An OLED display can be plugged into the second WeMos slot.
  • A WS2812B RGB LED can be fitted and used as an extended status indicator.
  • There are pads for a diode and fuse to protect the C64.
  • Alternatively, external power can be supplied through an optional USB connector.
  • Additional components may be fitted for level shifting between 5V and 3.3V. (Personally I don’t think they are needed and the ESP8266 can cope with the 5V. But this way the board is “one size fits all”.)
  • There are pads for a reset switch and a second one to interact with the modem.
  • Potentially, other shields like the LED Matrix could be added instead of the OLED.

Somewhat unfortunately, I made a last minute change to the board layout before I ordered, hoping to make it more compatible with other WeMos shields. I missed the fact that with this wiring a pull-down resistor is required for the ESP to boot. I patched the resistor to the bottom side of my first build but still the ESP needs a second try from time to time. So I might reconsider this in a future revision.

KiCAD and Arduino sources will follow when I find the time to do some cleaning up.

SD2IEC Revisited

When I discovered the MMC2IEC / SD2IEC project by chance back in 2009, it made me dig up again my soldering iron and electronic components after many years of disuse. I built myself one of those devices on a prototyping board and had a lot of fun doing so. It was the first time that I got involved with micro controllers and I learned a lot in the process.

Now, many years and projects later, I was looking for an excuse to try out KiCAD and to learn how to design my own boards using it. I had already ordered a small PCB I found on the net as a proof-of-concept to see if the Gerber files I produce would result in working boards. When they turned out just as expected I was eager to create something myself. This was the perfect opportunity to revisit the subject and make myself a brand new SD2IEC.

I wanted the design to be based on Shadowolf’s latest version but also make my own additions and changes:

  • The board should be able to tap into the cassette port of the C64 for power supply.
  • It should be board for external use with proper connectors just like my first build.
  • All components should be cheap to buy from Chinese suppliers.

So, this is the first prototype of what I came up with. I call it the “SD2IEC pluggable”:

On one side, it plugs into the cassette port, but all lines are traced across the board to the other side. This should allow the use of a datasette without unplugging the device. I haven’t tried it yet because I currently don’t have a datasette available. IEC and SD connectors are facing left as is the USB connector serving as an optional external power source. It is currently mini rather than micro USB because that was what I had in stock.

There are pin headers for the ISP, for connecting alternate LEDs, for I2C devices (like displays) and for optional buttons or switches. Also optionally, additional components can be fitted that should hopefully allow turning this board into a TAPuino using the right firmware. But I did not yet have time to try this either.

I just assembled the first board, flashed the latest SD2IEC firmware, and it seems to be working great! There are a few issues in version 0.9 that I’m planning to resolve in the next revision:

  • Pin 5 of the USB connector needs to be connected to GND, too.
  • Change footprint of D3 to accommodate MELF packages.
  • Maybe replace the mini USB connector with a micro USB one.
  • Add a reset button.

The KiCAD project files are available on Github in case you’d like to make your own pluggable SD2IEC. If you do, I would love to hear about it in the comments!




OpenWRT and the Zsun Card Reader

During the last few weeks since my first post about the Zsun WiFi Card Reader I learned a few things that I haven’t documented yet.

After I was able to confirm that my device has indeed PCB v2 but that flashing should work just the same, I tried the simple method described here:

  1. Insert a FAT formatted micro SD card into the reader and plug the reader into a PC (running Windows, in my case). The card should be assigned a drive letter, say “J:”.
  2. Connect to the WiFi access point created by the reader.
  3. Open
  4. Open the drive/card in the file explorer, create a new folder named “.update.” and copy the SD100-openwrt.tar.gz archive into it.
  5. Open – this should return status code “2”.
  6. Wait patiently for the described LED flashes!
  7. Connect to the new access point called “OpenWRT”.
  8. Open and configure OpenWRT.

This worked like a charm (a big thanks to Warsaw!), but only 5 minutes later I managed to lock myself out with a bad WiFi config. Great. So I went ahead and soldered leads to the serial headers. But while I was able to receive and read the console output just fine I had no success sending any input to that console. Only today I learned that PCB version 2 is missing a jumper that needs to be connected in order to enable serial RX. Connecting this jumper has exceeded my meager soldering skills so far, though.

Fortunately, I learned another fact from a helpful comment on my previous post: By inserting or removing the SD card during boot, OpenWRT can be put into fail-safe mode that will reset the configuration. I kept inserting and removing it in quick succession for about 10 seconds in order to get the timing right. Now I’m able to connect to the WiFi again!

One of the images is showing an Ethernet cable attached directly to the board. This did not work for me and trying it was somewhat naive. It’s been brought to my attention that this might damage the SoC, too. If resetting an OpenWRT installation as described above is not enough, the best way to un-brick the device seems to be through the serial console as described in the comments.


The Zsun WiFi Card Reader

I’m not sure where I read first about the $8 Zsun WiFi Card Reader and the attempts by the people at Warsaw Hackerspace to flash it with their port of OpenWRT. It made me curious, so I went ahead and ordered a sample. Shipping from China took a while but I received the tiny gadget yesterday.

So far I could confirm the documented root access to the stock firmware via telnet on port 11880 using the password “zsun1188”. I have not tried flashing OpenWRT yet as I am not sure which of the at least two different PCB versions I got. Could anyone give me a hint on this?

The Fancy Lantern Stick

I’m not sure about other parts of the world, but back here in Germany we’ve got a tradition called Laternelaufen. It involves lanterns, preferably home-made from cardboard and colored paper, lantern sticks, and a bunch of happily singing children. And of course, it requires a way of lighting the lanterns. Traditionally, this is accomplished by the use of burning candles which are cheap and actually looking great, but will also ever so often result in the lanterns themselves catching fire. So, for many years there have been battery powered lantern sticks featuring a small light bulb on the upper end.

My daughter is very much looking forward to this year’s Laternelaufen events. What a great excuse for myself to get started on a small new project, the Fancy Lantern Stick! Here’s the list of major ingredients:

  • 20cm of PVC tubing 40mm in diameter, normally used for in-house plumbing
  • 50cm aluminum pipe, 6mm in diameter
  • 1 small piece of wooden board, roughly 15mm strong
  • Acrylic spray paint, the colors of your choice
  • Clear lacquer spray
  • 1 Arduino Pro Mini
  • 1 5V Step-up power converter
  • 1 Battery holder for 2 AA sized batteries
  • 8 WS2812B LEDs on separate tiny boards
  • 1 Switch
  • 1 Push-button
  • An assortment of wires, headers and connectors
  • Hot glue

When switched on, the Arduino will produce yellowish-white light from the 8 LEDs and simulate the moderate flickering of a candle flame. The red push-button on the handle triggers special light effects to show off.

The source code for the Arduino sketch is available on Github, and I’ll try to add a couple of photos showing the finished stick once I find the time and manage to borrow it back from my daughter.


I did manage to take a few photos of the finished stick today and added them to the gallery. Also, if there is enough interest I could supply more detailed information on how to build one of these, of course.