Adding Reset To An FTDI Cable

Hackaday alum [Adam Harris] hacked an FTDI cable to use for programming his Arduino. After cracking open the plastic case he found the FTDI chip used is the same as the one in the SparkFun programmer. The only real difference was that his cable wasn’t resetting the Arduino, he had to do that manually. The solution was to reroute the RTS wire so that it connected up to the DTR pin. This proved difficult because of the tiny footprint of the chip, but after many tries he managed to get a piece of wire wrap soldered in place.

Introduction To FTDI Bitbang Mode

It was an interface that launched a thousand hacks. Near trivial to program, enough I/O lines for useful work, and sufficiently fast for a multitude of applications: homebrew logic analyzers, chip programmers, LCD interfaces and LED light shows, to name a few.

Today the parallel printer port is on the brink of extinction (and good riddance, some would say). Largely rendered obsolete by USB, few (if any) new peripherals even include a parallel connector, and today’s shrinking computers — nettops, netbooks, media center PCs — wouldn’t have space for it anyway. That’s great for tidy desks, but not so good if you enjoyed the dirt-cheap hacks that the legacy parallel port made possible.

Fear not, for there’s a viable USB alternative that can resurrect many of these classic hacks! And if you’ve done much work with Arduino, there’s a good chance it’s already lurking in your parts drawer.

Continue reading “Introduction To FTDI Bitbang Mode”

How Framework Laptop Broke The Hacker Ceiling

We’ve been keeping an eye on the Framework laptop over the past two years – back in 2021, they announced a vision for a repairable and hacker-friendly laptop based on the x86 architecture. They’re not claiming to be either open-source or libre hardware, but despite that, they have very much delivered on repairability and fostered a hacker community around the laptop, while sticking to pretty ambitious standards for building upgradable hardware that lasts.

I’ve long had a passion for laptop hardware, and when Hackaday covered Framework announcing the motherboards-for-makers program, I submitted my application, then dove into the ecosystem and started poking at the hardware internals every now and then. A year has passed since then, and I’ve been using a Framework as a daily driver, reading the forums on the regular, hanging out in the Discord server, and even developed a few Framework accessories along the way. I’d like to talk about what I’ve seen unfold in this ecosystem, both from Framework and the hackers that joined their effort, because I feel like we have something to learn from it.

If you have a hacker mindset, you might be wondering – just how much is there to hack on? And, if you have a business mindset, you might be wondering – how much can a consumer-oriented tech company achieve by creating a hacker-friendly environment? Today, I’d like to give you some insights and show cool things I’ve seen happen as an involved observer, as well as highlight the path that Framework is embarking upon with its new Framework 16.

Continue reading “How Framework Laptop Broke The Hacker Ceiling”

Turning A Microchip MPLAB Snap Into A UDPI AVR Programmer

The Unified Program and Debug Interface (UPDI) is Microchip’s proprietary interface for programming and on-chip debugging, and has become the standard on AVR MCUs after Microchip’s purchase of Atmel. Being a proprietary interface means that even entry-level programmers like the Atmel-ICE are rather expensive at over $100. That’s when for [Scott W Harden] the question arose of whether the much cheaper MPLAB Snap board (~$34) could be used as well for AVR UDPI purposes.

The stages of grief that [Scott] went through before he had it working involved among others the updating of the MPLAB Snap board firmware, getting yelled at by the Microchip Studio IDE when attempting to use the Snap for AVR MCU programming, and ultimately fixing the board following the relevant Microchip Engineering Technical Note (ETN #36) that specifies the removal of a 4.7 kΩ pull-down resistor (R48) on the Snap board. This allows the UDPI line to be pulled high by the MCU.

As the ETN notes, an external pull-up may also be used to override the pull-down, which would leave the ICSP functionality of of the Snap intact. As [Scott] mentions in his conclusion, it feels as if UDPI AVR support with the Snap is really an afterthought for Microchip. Meanwhile there are also more DIY solutions as [Scott] adds, which are useful for just flashing the MCU. An example is with a USB-TTL serial adapter and pymcuprog.

The problem with DIY solutions like jtag2updi, ftdi2updi, and their kin is the effort required to assemble them, and the uncertainty of long-term support as the UPDI ecosystem keeps evolving with new devices and new features. The MPLAB Snap with resistor mod may be just that middle ground between an Atmel-ICE and reverse-engineered OSS projects.

(Featured image: MPLAB Snap resistor mod illustrated, from Microchip ETN #36)

USB Power Isolator Keeps Smoke In

Anyone who’s done an electronics project knows the most important part of any good design is making sure to keep the magic smoke inside of all of the components. There are a lot of ways to make sure the smoke stays in there, but one of the most important is making sure that the power supply is isolated. If you’re using a USB port on a computer as your power source, though, it can be a little more complicated to isolate it from the computer.

The power supply is based around a small transformer with a set of diodes to act as a rectifier. Of course, while a transformer is great at isolating power supplies, it isn’t much good at DC. That’s what the ATtiny microcontroller is for. It handles the high-speed switching of the MOSFETs, which drive the transformer and handle some power regulation. There are two different power supplies created as part of this project as well — the first generates +5V much like a normal USB plug would have, and the other creates both +5V and -5V. It will be important not to mix these two up, or that tricky blue smoke may escape.

The project page goes into extensive details on the operation of the device, so if electrical theory is of interest, this will definitely be worth a read. Isolating a valuable computer from a prototype circuit is certainly important, but if you’re looking for a way to isolate a complete USB connection, look at this build which includes isolation for a USB to FTDI adapter.

Stress-Testing An Arduino’s EEPROM

Every time one of us flashes an Arduino’s internal memory, a nagging thought in the backs of our minds reminds us that, although everything in life is impermanent, nonvolatile re-writable memory is even more temporary. With a fixed number of writes until any EEPROM module fails, are we wasting writes every time we upload code with a mistake? The short answer is that most of us shouldn’t really be concerned with this unless we do what [AnotherMaker] has done and continually write data until the memory in an Arduino finally fails.

The software for this is fairly simple. He simply writes the first 256 ints with all zeros, reads them to make sure they are all there, and then repeats the process with ones. After iterating this for literally millions of times continuously over the course of about a month he was finally able to get his first read failure. Further writes past this point only accelerated the demise of the memory module. With this method he was able to get nearly three million writes before the device failed, which is far beyond the tens or hundreds of thousands typically estimated for a device of this type.

To prove this wasn’t an outlier, [AnotherMaker] repeated the test, and did a few others while writing to a much smaller amount of memory. With this he was able to push the number of cycles to over five million. Assuming the Arduino Nano clone isn’t using an amazingly high-quality EEPROM we can safely assume that most of us have nothing to worry about and our Arduinos will be functional for decades to come. Unless a bad Windows driver accidentally bricks your device.

Continue reading “Stress-Testing An Arduino’s EEPROM”

Home Made Scanning Electron Microscope Shows Some Potential

Scanning electron microscopes are one of those niche instruments that most of us don’t really need all the time, but would still love to have access to once in a while. Although we’ve covered a few attempts at home-builds before, many have faltered, except this project over on Hackday.IO by user Vini’s Lab, which appears to be still under active development. The principle of the SEM is pretty simple; a specially prepared sample is bombarded with a focussed beam of electrons, that is steered in a raster pattern. A signal is acquired, using one of a number of techniques, such as secondary electrons (SE) back-scattered electrons (BSE) or simply the transmitted current into the sample. This signal can then be used to form an image of the sample or gather other properties.

Condenser assembly

The project is clearly in the early stages, as the author says, it’s a very costly thing to build, but already some of the machined parts are ready for assembly. Work has started on the drive electronics for the condenser stigmator. This part of the instrument takes the central part of the rapidly diverging raw electron beam that makes it through the anode, and with a couple of sets of octopole coil sets, and an aperture or two, selects only the central portion of the beam, as well as correcting for any astigmatism in the beam. By adjusting the relative currents through each of the coils, a quadrupole magnetic field is created, which counteracts the beam asymmetry.

Scanning control and signal acquisition are handled by a single dedicated card, which utilises the PIO function of a Raspberry Pi Pico module. The Pico can drive the scanning operation, and with an external FTDI USB3.0 device, send four synchronised channels of acquired sample data back to the host computer. Using PCIe connectors and mating edge connectors on the cards, gives a robust and cost effective physical connection. As can be seen from the project page, a lot of mechanical design is complete, and machining has started, so this is a project to keep an eye on in the coming months, and possibly years!

We have seen a few SEM hacks, here’s a teensy powered SEM hack from [Ben Krasnow] and here’s another attempt. For such a conceptually simple device, with such immense usefulness, its does seem a bit remiss that there aren’t more such projects out there.