How The Dis-integrated 6502 Came To Be

I made a bee line for one booth in particular at this year’s Bay Area Maker Faire; our friend [Eric Schlaepfer] had his MOnSter 6502 on display. If you missed it last week, the unveiling of a 6502 built from discrete transistors lit the Internet afire. At that point, the board was not fully operational but [Eric’s] perseverance paid off because it had no problem whatsoever blinking out verification code at his booth.

I interviewed [Eric] in the video below about the design process. It’s not surprising to hear that he was initially trying to prove that this couldn’t be done. Unable to do so, there was nothing left to do but devote almost six-months of his free time to completing the design, layout, and assembly.

What I’m most impressed about (besides just pulling it off in the first place) is the level of perfection [Eric] achieved in his design. He has virtually no errors whatsoever. In the video you’ll hear him discuss an issue with pull-up/pull-down components which did smoke some of the transistors. The solution is an in-line resistor on each of the replacement transistors. This was difficult to photograph but you can make out the soldering trick above where the 3-pin MOSFET is propped up with it’s pair of legs on the board, and the single leg in the air. The added resistor to fix the issue connects that airborne leg to its PCB pad. Other than this, there was no other routing to correct. Incredible.

The huge schematic binder includes a centerfold — literally. One of the most difficult pieces of the puzzle was working out the decode ROM. What folds out of this binder doesn’t even look like a schematic at first glance, but take a closer look (warning, 8 MB image). Every component in that grid was placed manually.

I had been expecting to see some tube-based goodness from [Eric] this year. That’s because I loved his work on Flappy Bird on a green CRT in 2014, and Battlezone on a tube with a hand-wound yoke last year. But I’m glad he stepped away from the tubes and created this marvelous specimen of engineering.

Review: Transistor Tester

Amazon has been getting creepier and creepier lately with their recommendations.  Every time I log in, I’m presented with a list of new Blinky LEDs, Raspberry Pi accessories, Arduino shields, and the like. It’s as if they know me. Their customer database paid off when it recommended a $22 transistor / component tester. I’ve been seeing those testers around quite a bit lately. Curiosity got the better of me and my mouse found its way to the “Buy it now with one click” button. Two days later I had a “SainSmart Mega328 Transistor Tester Diode Triode Capacitance ESR Meter MOS/PNP/NPN L/C/R” in my hands.

I’m going to get the obvious out of the way. This thing is built cheap – as cheap as the factories can make it. My particular unit arrived with the LCD flapping in the breeze, hanging on by its flex cable. Fitting the LCD back into the acrylic backlight frame revealed a slightly worrisome twist in that same flex. Thankfully nothing was actually damaged, though I do want to give the flex cable some protection in the future. More on that later. The circuitry was open for all the world to see on the bottom of the tester. The heart of the unit is an ATmega328. Supporting it are a few transistors and a handful of passives.

I didn’t have huge expectations for the tester, but I hoped it would at least power up.  Hooking up a 9 volt battery and pressing the magic button brought the tester to life. Since I didn’t have anything in the socket, it quickly lit up and displayed its maker information – “91make.taobao.com”, and “By Efan & HaoQixin”, then it informed me that I had “No, unknown, or damaged part”.

I had a few resistors lying around the bench (doesn’t everyone?) so I put one in. The tester read it as 9881 ohms. Sure enough, it was a 10K 5% resistor.  Capacitors – ceramic disc, electrolytic, and surface mount all worked as well. The tester even provided ESR values. The real test would be a transistor. I pulled an old  2N2222 in a TO-18 metal can, and popped it in the tester. The damn thing worked – it showed the schematic symbol for an NPN transistor with Collector, Base, and Emitter connected to Pins 1,2,and 3 respectively. Flipping the pins around and re-testing worked as well. The tester showed hFe as 216, and forward voltage as 692 mV, both reasonable numbers for a 2N2222.

triacThe tester worked surprisingly well – it was able to correctly identify BJTs, FETs, even esoteric parts. The only thing it balked on was a linear voltage regulator, which showed up as two diodes. Regulators are a bit more than a simple device though, so I can’t blame the tester there.  The values returned were all reasonable as well. While I don’t have a calibrated lab to check against, the numbers lined up with my Fluke meter.

So what exactly is driving this little tester? There are about 20 versions of it on the market, all of them from China. 91make is a seller on taobao.com, often referred to as “China’s ebay.” 91make’s front page features no less than 7 versions of the transistor tester, with various cases and LCDs. Some digging turned up the history on this device. It turns out the transistor tester is an open source hardware project (translated) originally created by [Markus Frejek], and built upon by [Karl-Heinz Kubbeler] and a number of others. The Subversion repository  for the project shows it is quite active, with the most recent check-in only a few hours ago. The project is also well documented. The English PDF is 103 pages, explaining theory of operation, the circuit itself, and the software. The document even explains some of the shortcomings of the Chinese versions of the tester, including using a zener diode where the original schematic calls for a precision 2.5V reference. Yes, it will work, but it won’t be as accurate as the original.

The devs also don’t officially support the clones which I can understand, considering the quality and changes in design each manufacturer is baking in to their own version. There is  a huge thread on the EEVblog forum covering these testers. Some can be modified to be closer to the official version. In fact, with an ISP tool the intrepid hacker can update the firmware to the current rev from [Karl-Heinz’s] repository.

So the final verdict on this tester is that it is a thumbs up with a small caveat. These testers are built down to a cost (and that cost is as close to zero as possible). They’re great for sorting parts, but they’re no substitute for a higher quality measuring device. I’d also love to see a version that supports the original developers.

Abstracting Transistors Into High-level Design

Although it’s not the best way of understanding computers, most people tend to imagine electronic devices as black boxes filled with magic and blue smoke. Even microcontrollers, the most fundamental means of computation, are treated like little black plastic centipedes with metal legs. In a series of blog posts, [Andrew Gibiansky] is tearing down the walls of obfuscation and illuminating the world of transistors, gates, and FPGAs.

The first blog post goes over the idea of electronic circuits as a waterfall; a positive voltage is a reservoir on a mountain top and ground is sea level. This idea is extended to the lowly transistor acting as an electronic switch, able to turn a circuit on and off.

Continuing on to logic gates, [Andrew] covers the NOT, AND, and OR gates before moving on the flip-flops and SRAM. These can, of course, be modeled in Verilog and VHDL – programming languages that abstract the world of transistors and gates into a much more human-readable form.

[Andrew] is far from done with his series of blog posts, but judging from his work so far it seems to be a great resource for untangling the obtuse concepts of gates and memory into the coherent design of a computer.

ATtiny Hacks: ATtiny-controlled 4x4x4 LED Cube Has A Unique Design

ATtiny Hacks Theme Banner

simple_attiny_led_cube_charlieplexing

[Tom] recently started experimenting with Charlieplexing, and wrote in to share the 4x4x4 cube he built with an ATtiny24. Similar to this minimalist 4x4x4 LED cube we featured the other day, [Tom’s] version attempts to use the least pins possible to drive the LEDs, but in a different manner.

[Tom] didn’t want to sacrifice brightness, so he decided that the LEDs would have a 1/8 duty cycle. The problem is that the ATtiny’s I/O ports can’t support that kind of current so he needed a different means of driving the LEDs. Rather than employ any sort of shift register to control the LEDs, he opted to exclusively use transistors as he had done in previous projects.

For his Charlieplexed cube to use a total of 9 I/O pins he had to get creative with his design. He broke each level of the structure into two non-connected groups of LEDs, utilizing diagonal interconnects to get everything wired up properly.

It seems to work quite nicely as you can see in the video below. While it uses two more I/O lines than the other ATtiny cube we featured recently, we love the simple, shift register-less design.

Continue reading “ATtiny Hacks: ATtiny-controlled 4x4x4 LED Cube Has A Unique Design”

DIY Guitar Fuzz Pedal

diy_fuzz_pedal

Instructables user and Community Manager [Randy Sarafan] recently put together a tutorial on how to build an ages-old musical standard, the “Fuzz Pedal”. He says that the secret to rocking out is fuzz, so if you can handle both a soldering iron and a guitar, this project is for you.

When you take a close look, the pedal’s components are actually quite simple. The distortion is created by a pair of transistors, which in his case are vanilla NPNs from RadioShack. We have covered other distortion pedal builds before, and they have used germanium transistors to obtain a ‘creamier’ sound – you should be able to swap these cheap ones for uprated models with little trouble.

The handful of components were soldered neatly to a piece of perf board, and placed into a sturdy metal case that looks like it can withstand even the harshest abuse. He’s got schematics and a BOM in his writeup, so all that’s keeping you from a rocking weekend is a little bit of time and a soldering iron – what are you waiting for?

Stick around to see a quick video of [Randy’s] fuzz pedal being built.

Continue reading “DIY Guitar Fuzz Pedal”

Intermediate Concepts: Building Discrete Transistor Gates

[Simon Inns] has put together a lesson in digital logic which shows you how to build your own gates using transistors. The image above is a full-adder that he fabricated, then combined with other full adders to create a 4-bit computer.

Don’t know what a full adder is? That’s exactly what his article is for, and will teach you about binary math and how it is calculated with hardware. There’s probably at least a week’s worth of studying in that one page which has been further distilled into the five-minute video after the break. Although building this hardware yourself is a wonderful way to learn, there’s a lot of room for error. You might consider building these circuits in a simulator program like Atanua, where you can work with logic gate symbols, using virtual buttons and LEDs as the outputs. Once you know what you’re doing with the simulator you’ll have much more confidence to start a physical build like the one [Simon] concocted.

Finding this project a little too advanced? Check out our Beginner Concepts articles to help get you up to speed.

Continue reading “Intermediate Concepts: Building Discrete Transistor Gates”