Better SPI Bus Design

Quick, how do you wire up an SPI bus between a microcontroller and a peripheral? SCK goes to SCK, MISO goes to MISO, and MOSI goes to MOSI, right? Yeah. You’ll need to throw in a chip select pin, but that’s pretty much it. Just wires, and it’ll most likely work. Now add a second device. The naïve solution found in thousands of Arduino tutorials do the same thing; just wires, and it’ll probably work. It’s not that simple, and Mr. Teensy himself, [Paul Stoffregen] is here to show you why.

When using multiple SPI devices, a pullup resistor on the chip select lines are a really great idea. Without a pullup, devices will work great when used alone, but will inexplicably fail when used together. It’s not magic; both devices are listening to the bus when only one should be. Putting a pullup on the CS lines keeps everything at the right logic level until a device is actually needed.

How about the MISO line? Most peripherals will disconnect their pins when the chip select signal is active, but there are exceptions. Good luck finding them. There is an easy way to check, though: just connect two resistors so the MISO line floats to a non-logic level when the CS pin is high, and check with a voltmeter. If MISO is driven high or low, you should put a small tri-state buffer in there.

That just covers hardware, and there are a few things you can do in software to reduce the number of conflicts when using more than one SPI device. One of these methods is transactions, or defining the clock rate, setting MSB or LSB first, and the polarity of the clock. Newer versions of the Arduino SPI library support transactions and the setup is very easy. In fact, transaction support in the Arduino library is something [Paul] worked on himself, and gets around the problem of having SPI-related code happening in both the main loop of a program and whenever an interrupt hits. Awesome work, and a boon to the Arduino makers around the world.

A UV Lightbox For Curing Prints

With resin printers slowly making their way to hackerspaces and garages the world over, there is a growing need for a place to cure these UV resin prints. No, they don’t come out of the machine fully cured, they come out fully solid. And no, we’re not just leaving them in the sun, because that’s not how we do things around here.

[Christopher] whipped up a post-cure lightbox meant to sit underneath his Form 1 printer. It’s made of 1/2″ MDF, with adjustable feet (something the Form 1 lacks), a safety switch to keep the lights off when the door is open, and a motor to rotate the parts around the enclosure.

The light source for this lightbox is 10 meters of ultraviolet LED strips. The LEDs shine somewhere between 395-405nm, the same wavelength as the laser diode found in the Form 1 printer. Other than a bit of wiring for the LEDs, the only complicated part of the build was the motor; [Christopher] bought a 2rpm motor but was sent a 36rpm motor. The vendor was out of 2rpm motors, so a PWM controller was added.

It’s a beautiful build that shows off [Christopher]’s ability to work with MDF. It also looks great sitting underneath his printer, and all his parts are rock solid now.

Central European Computer Collecting

During Hackaday’s short trip to Czech, we were lucky enough to run into someone who had recently had one of his projects featured on Hackaday. It’s [Martin]’s multi-target IDE for 8-bit CPUs, written entirely in JavaScript, and a full development suite for anything with a 6502, 6800, 6809, Z80, 8080, and 8085. [Martin] was kind enough to sit down and give us the scoop on why he’s interested in old computers, and why he developed his 8-bit IDE project, ASM80.

[Martin] grew up in the days of computer magazines, and originally wanted to build his own computer. That plan didn’t work out, but his parents did get him a Speccy in 1986, but the love of old hardware is still there. Over the years, this evolved into computer collecting, with the old ZX Spectrum, an Commodore 64, ORICs, and Acorns rounding out his collection. As we learned at the Computeum, there the middle of Europe had computers that just aren’t seen on the English-speaking Internet, and [Martin]’s collection is no exception.

In addition to doing some very cool stuff for some very old computers, [Martin] also donated something to the Hackaday Hackaspace. It’s a PMI-80, a single board computer made for university computer science students, and basically a KIM-1, but based on a Czechoslovak clone of the Intel 8080 made by Tesla. There is 1k of RAM and 1k of ROM on this board, a calculator keypad, and a few seven segment displays. For the time, it was a great ‘student’ computer, and not really rare in Europe, but this is the first one I’ve seen on my side of the Atlantic.

You can see some pics of the PMI-80 below with [Martin]’s interview. [Martin] also promised to write-up a short history of classic central european computers, a subject there isn’t much written about in the anglosphere. We’ll post a link to that when he finishes that up.

Continue reading “Central European Computer Collecting”

Fixing Ghost Touch In The OnePlus One

The OnePlus One is the flagship phone killer for 2014, available only by invite, and thus extremely cool. So far it’s a limited production run and there will, of course, be problems with the first few thousand units. When [vantt1] got his One, he noticed a few issues with the touch screen. Some touches wouldn’t be registered, typing was unpredictable, and generally, the touchscreen was unusable. [vantt] had seen this before, though, so with a complete teardown and a quick fix he was able to turn this phone into something great.

[vantt] realized the symptoms of a crappy touchscreen were extremely similar to an iPad mini that had recently had its digitizer replace. From the Foxconn plant, the digitizer in the iPad mini is well insulated from the aluminium enclosure. When the screen and digitizer are replaced, the cable connecting it to the rest of the iPad can come in contact with the case. This leads to the same symptoms – missed touches, and unpredictable typing.

Figuring the same cure will fix the same symptoms, [vantt] tore apart his OnePlus One and carefully taped off the digitizer flex cable. Reassembling the phone, everything worked beautifully, and without any extra screws in the reassembly process. You can’t do better than that.

Custom Filaments With A Filastruder

A while ago, when 3D printing was the new hotness, a few people looked around and said, ‘our printers are open source, why can’t we just build the machines that make our 3D printing filament?’ There was a $40,000 prize for the first person to build an open source filament extruder, resulting in a few filament fabrication machines being released into the wild. [Rupin] over in the Mumbi hackerspace has one of these filament extruders – a Filastruder – and decided to take a look at what it could do.

The experimentations began with a few kilograms of ABS pellets he found at the market, with bags of red, blue, green, and white masterbatch pellets showing up at the Hackerspace. Experimenting with these pellets, [Rupin] was able to create some very nice looking filament that printed well and changed color over the course of a print.

There were a limitations of the process, though: the filastruder has a long melt zone, so colors will invariably mix. If you’re thinking about doing a red to blue transition with filament created on a Filastruder, you’ll end up with a filament with a little bit of red, a little bit of blue, and a lot of a weird purple color. The time to create this filament is also incredibly long; over the course of two days, [Rupin] was able to make about half a kilo of filament.

Still, the results look fantastic, and now that [Rupin] has a source for masterbatch and ABS pellets, he’s able to have a steady supply of custom color filament at the hackerspace.

Cairo Hackerspace Gets A $14 Projector

The Cairo hackerspace needed a projector for a few presentations during their Internet of Things build night, and of course Friday movie night. They couldn’t afford a real projector, but these are hackers. Of course they’ll be able to come up with something. They did. They found an old slide projector made in West Germany and turned it into something capable of displaying video.

The projector in question was a DIA projector that was at least forty years old. They found it during a trip to the Egyptian second-hand market. Other than the projector, the only other required parts were a 2.5″ TFT display from Adafruit and a Nokia smartphone.

All LCDs are actually transparent, and if you’ve ever had to deal with a display with a broken backlight, you’ll quickly realize that any backlight will work, like the one found in a slide projector. By carefully removing the back cover of the display, the folks at the Cairo hackerspace were able to get a small NTSC display that would easily fit inside their projector.

After that, it was simply a matter of putting the LCD inside the display, getting the focus right, and mounting everything securely. The presentations and movie night were saved, all from a scrap heap challenge.

A Simple Runner’s GPS Logger

[Daniel] received a grant from the University of Minnesota’s ECE Envision Fund and was thus responsible for creating something. He built a runner’s GPS logger, complete with a screen that will show a runner the current distance travelled, the time taken to travel that distance, and nothing else. No start/stop, no pause, nothing. Think of it as a stripped-down GPS logger, a perfect example of a minimum viable product, and a great introduction to getting maps onto a screen with an ARM micro.

The build consists of an LPC1178 ARM Cortex M3 microcontroller, a display, GPS unit, and a battery with not much else stuffed into the CNC milled case. The maps come from OpenStreetMap and are stored on a microSD card. Most of the files are available on GitHub, and the files for the case design will be uploaded shortly.

The CNC machine [Daniel] used to create the enclosure is a work of art unto itself. We featured it last year, and it’s good enough to do PCBs with 10 mil traces. Excellent work, although with that ability, we’re wondering why the PCB for the Runner’s GPS is OSH Park purple.