Switching: From Relays To Bipolar Junction Transistors

How many remote controls do you have in your home? Don’t you wish all these things were better integrated somehow, or that you could add remote control functionality to a random device? It’s a common starting point for a project, and a good learning experience for beginners.

A common solution we’ve seen applied is to connect a relay in parallel to all the buttons we want to press. When the relay is triggered, for example by your choice of microcontroller, it gets treated as a button press. While it does work, relays are not really the ideal solution for the very low current loads that we’re dealing with in these situations.

As it turns out, there are a few simple ways to solve this problem. In this article, we’re going to focus on using common bipolar junction transistors instead of relays to replace physical switches. In short, how to add transistors to existing electronics to control them in new ways.

Continue reading “Switching: From Relays To Bipolar Junction Transistors”

Friday Hack Chat: Elecia White Talks Embedded Systems

The Arduino ecosystem, despite the comments it receives from Real Engineers™, is actually pretty great. There’s no other tool that works with as many varieties of microcontrollers, has as many libraries, and is as easy to use as the Arduino. It’s perfect for getting a project up and running quickly, but when it comes down to getting the last cycles or kilobits out of an embedded system you’ll quickly find the little blue infinity icon just won’t cut it.

Embedded system design goes far beyond the Arduino ecosystem, and for this week’s Hack Chat, we’ll be talking about squeezing the last drops out of tiny pieces of silicon.

Our guest for this week’s Hack Chat will be [Elecia White], embedded software engineer at Logical Elegance, author of O’Reilly’s Making Embedded Systems, and host of the Embedded.fm podcast.  In this chat, we’re going to be talking about moving beyond the Arduino ecosystem.

Topics for this week’s Hack Chat will include embedded systems ecosystems, how to match processors to projects, choosing IDEs, programmers, and other tools, and actually shipping all those whizz-bang microcontroller projects out to eager buyers. We’re opening up the floor to all questions, so if you have something to add, here’s a spreadsheet to guide the discussion.

Here’s How To Take Part:

join-hack-chatOur Hack Chats are live community events on the Hackaday.io Hack Chat group messaging. Hack Chats are mostly, usually at noon, Pacific time on Friday. This week is no exception and everything is going down noon, PDT, Friday, September 8th. Are time zones confusing? Not a problem; here’s a handy countdown timer!

Click that speech bubble to the right, and you’ll be taken directly to the Hack Chat group on Hackaday.io.

You don’t have to wait until Friday; join whenever you want and you can see what the community is talking about.

1.5 Million Dollars Buys 850,000 LEDs And 29 Raspberry Pis

You think you like RGB LEDs? Columbus, OH art professor [Matthew Mohr] has more blinkenlove than you! His airport– convention-center-scale installation piece is an incredible 850,000 RGB LEDs wrapped around a 14-foot tall face-shaped sculpture that projection-maps participants’ faces onto the display. To capture images, there is also a purpose-built room with even illumination and a slew of Raspberry Pi cameras to take pictures of the person’s face from many angles simultaneously.

Besides looking pretty snazzy, the scale of this is just crazy. For instance, if you figure that the usual strip of 60 WS2812s can draw just about 9.6 watts full on, that scales up to 136 kW(!) for the big head. And getting the control signals right? Forgeddaboutit. Prof. [Mohr], if you’re out there, leave us some details in the comments.

(Edit: He did! And his website is back up after being DOSed. And they’re custom LEDs that are even brighter to compete with daylight in the space.)

What is it with airports and iconic LED art pieces? Does anyone really plan their stopovers to see public art? How many of you will fly through Columbus on purpose now?

Knowing What’s Below: Buried Utility Location

We humans have put an awful lot of effort into our infrastructure for the last few centuries, and even more effort into burying most of it. And with good reason — not only are above ground cables and pipes unsightly, they’re also vulnerable to damage from exposure to the elements. Some utilities, like natural gas and sanitary sewer lines, are also dangerous, or at least perceived to be so, and so end up buried. Out of sight, out of mind.

But humans love to dig, too, and it seems like no sooner is a paving project completed than some joker with a jackhammer is out there wrecking the pristine roadway. Before the construction starts, though, cryptic markings will appear on the pavement courtesy of your local buried utility locating service, who apply their rainbow markings to the ground so that nothing bad happens to the often fragile infrastructure below our feet.

Continue reading “Knowing What’s Below: Buried Utility Location”

Me Casa Es Techno Casa

“Jarvis, make me a sandwich” is not a reality yet. Though there exist a lot of home automation products out there today, commercial solutions just don’t make the cut for the self-respecting geek. So [Matias] took the DIY route with his La CasaC Home Automation project and achieved the functionality he was after.

[Matias’] project is one of the most elaborate and large-scale DIY home automation projects we have seen in recent years. With over 200 nodes, this project took a number of years of planning and execution. The core of the design is the ever popular Raspberry Pi running OpenHAB to ease the pain of customization and integration with various protocols. To further simplify the ginormous task, the design uses RS485 to communicate between master and slave devices.

Each wall node is managed by a nearby Arduino which in turn talks to a central Arduino Mega. OpenHab takes care of the higher functions such as UI, integration with existing hardware such as the solar heater, media center control,  and RFID and keypad control. Sensor data aggregation and building management is done centrally with data funneled to a separate NAS system as long-term storage.

What makes this project awesome is that [Matias] did not integrate a Raspberry Pi into his house, no! He actually integrated his entire house around the system because this build includes the construction of the house as well. Take a look at this Google Photos Gallery to see the photographic progress of the build. That is amazing!

The code and snippets are available on GitHub for your viewing pleasure though that seems the easy part. If this inspired you, then also take a look at the Raspberry Pi Home Automation of a Gingerbread House if you’d like to try it out before fully committing.

Bringing Back The IPhone7 Headphone Jack

Plenty of people bemoaned Apple’s choice to drop the 1/8″ headphone jack from the iPhone 7. [Scotty Allen] wasn’t happy about it either, but he decided to do something about it: he designed a custom flex circuit and brought the jack back. If you don’t recognize [Scotty], he’s the same guy who built an iPhone 6 from parts obtained in Shenzhen markets. Those same markets were now used to design, and prototype an entirely new circuit.

The iPhone 7 features a barometric vent, which sits exactly where the headphone jack lived in the iPhone 6. The vent helps the barometric pressure sensor obtain an accurate reading while keeping the phone water proof. [Scotty] wasn’t worried about waterproofing, as he was cutting a hole through the case. The vent was out, replaced with a carefully modified headphone jack.

The next step was convincing the phone to play analog signals. For this, [Scotty] used parts from Apple’s own headphone adapter. The hard part was making all of this work and keeping the lightning port available. The key was a digital switch chip. Here’s how the circuit works:

When no headphone is plugged in, data is routed from the iPhone’s main board to the lightning port. When headphones are plugged in, the data lines are switched to the headphone adapter. Unfortunately, this means the phone can’t play music and charge at the same time — that is something for version 2.0.

The real journey in this video is watching [Scotty] work to fit all these parts inside an iPhone case. The design moved from a breadboard through several iterations of prototype printed circuit boards. The final product is built using a flexible PCB – the amber-colored Kapton and copper sandwiches that can be found in every mobile device these days.

Making everything fit wasn’t easy. Two iPhone screens perished in the process. But ultimately, [Scotty] was successful. He’s open sourced his design so the world can build and improve on it.

Want to read more about the iPhone 7 and headphone jacks? Check out this point and counterpoint.  we published on the topic.

Continue reading “Bringing Back The IPhone7 Headphone Jack”

Pac Man On The Colour Computer 3

The 1980s were the heyday of the venerable Z80, a processor that found its way into innumerable home computers, industrial systems, and yes — arcade machines. However, not everyone had a Z80 based machine at home, and so sometimes porting is required. [Glen] is tackling this with a port of Pac Man to the Radio Shack Colour Computer 3.

The key to any good arcade port is authenticity – the game should feel as identical to the real thing as possible. The Atari 2600 port got this famously wrong. Porting to the Colour Computer 3 is easier in theory – with more RAM, a Motorola 6809 CPU running at a higher clock rate, and a more powerful graphics subsystem, fewer compromises need to be made to get the game to run at a playable speed.

The way [Glen] tackled the port is quite handy. [Glen] built a utility that would scrape a disassembled version of the original Pac Man Z80 code, look up the equivalent 6809 CPU instruction, and replace it, while placing the original Z80 code to the side as a comment. Having the original code sitting next to the ported instructions makes debugging much easier.

Level 256 as seen in [Glen]’s port.
There was plenty of hand tweaking to be done, and special effort was made to make sure all the data the original code was looking for was accessible at the same addresses as before. There was also a lot of work involved in creating a sprite engine that would reliably display the game video at a playable frame rate.

Overall, the port is highly faithful to the original, with the game code being identical at the CPU level. [Glen] reports that the same patterns used on the arcade machine can be used to complete the mazes on the Colour Computer 3 version, and it faithfully recreates the Level 256 bug as well. It’s an impressive piece of work to create such an authentic port on a home computer from 1986.

For another classic port, but with the temporal vectors flipped, check out Portal 2 on the Apple II.