A Real-Time Fuel Consumption Monitor

Jeff Bachiochi’s real-time fuel consumption monitor for his Jeep.

Circuit Cellar columnist Jeff Bachiochi has enjoyed driving his wife’s Prius, in part because of the real-time feedback it gives him on the miles per gallon he is getting. It made him aware of how he could save gas with simple and immediate adjustments to his driving style.

With that in mind, he thought it would be a good idea to build an effective and affordable monitoring device that would give him the same real-time mpg for his Jeep.  After all, he can’t always borrow his wife’s car.

In the June issue, he shares what he came up with for an onboard diagnostics display. He explains below how he tapped into his own experience, as well as that of another Circuit Cellar author, to build the device for Jeep

“In the summer of 2011, I presented a three-part series about the on-board diagnostic system (OBD-II) built into every automobile produced since 1996 (Circuit Cellar 251–253)….”

“In 2005, Bruce D. Lightner wrote an article about his winning entry in the 2004 Atmel AVR design contest (“AVR-Based Fuel Consumption Gauge,” Circuit Cellar 183, 2005). Lightner’s project altered an analog tachometer gauge as a display for miles per gallon. I wanted to show a little more information, so my project uses a Parallax Propeller microcontroller to interrogate the OBD interpreter and drive a composite LCD.

“You can get a composite color display from Parallax or an online source. While I had a small 2.5” display to work with, I was looking for something a bit bigger. For less than $50, I found a 7” LCD, which happened to be combined with a camera (for mounting on a vehicle’s rear license plate frame)…

“I dug out my Propeller Proto Board and blew off the dust…. The Propeller microcontroller design includes eight 32-bit parallel processors (i.e., cogs) and peripheral support, including access to the 32 I/O pins, two counters, and a video generator per cog.  It is the video generator support that makes this project possible with a minimal component count…. only three resistors are required to develop a composite video output.“

To read more about Bachiochi’s OBD device, check out his article in the June issue.


Ace Monster Toys – 3D Printing, DIY Book Scanners and “Dirty Shops”

Ace Monster Toys is a Hackerspace in the East San Francisco Bay Area dedicated to education, hacking, and maker culture since September 2010. They are a membership based group with regular free open-to-the-public classes and events. They are open to anyone and non-members are welcome.

Location 6050 Lowell Street, Oakland, CA
Members 55
Website AceMonsterToys.org

Ace Monster Toys Hackerspace

Here’s what Ace Monster Toys member David has to say about his group:
Tell us about your meeting space!

Our space is 1600 sq ft, divided among three rooms, one upstairs and two downstairs. The upstairs is the “less dirty” area, with desks for working on projects, space for meetings and classes, electronics work area, and 3D printers. Downstairs is the “dirty shop,” in which one room is mostly woodworking tools with a large CNC mill and the other room contains the laser cutter and some storage. We have many shelves where members can put their projects in boxes as well as a few small storage lockers, both upstairs and downstairs.

What tools do you have in your space? (Soldering stations? Oscilloscopes? 3-D printers?)

Everything and the kitchen sink it seems like! Downstairs is a giant 80W laser cutter, a giant CNC router table (both capable of taking full sheets of plywood or other woods), a mini desktop CNC router, several different woodworking tools (bandsaw, chop saw, radial arm saw, table saw, router table, jointer, wood lathe, various power hand tools), a metal bandsaw, a micro metal lathe, a drill press, and a Zcorp powder based 3D printer. Upstairs we have several textile machines (serger, sewing machines), oscilloscopes, logic analyzers, soldering stations, three plastic FDM type 3D printers, a DIY book scanner, a large format inkjet printer, and a roomba or three.

Are there any tools your group really wants or needs?

A more reliable 3D printer would be pretty nice. Also a CNC mill capable of working metal would be really cool and would allow us to fabricate metal parts. A decent tabletop or larger metal lathe would expand our fabrication abilities. For textiles: Supplies for conductive sewing projects/classes… lilipad everything, conductive fabric, thread, battery packs, batteries. Not just for the classes themselves but also for prototyping projects.

Does your group work with embedded tech (Arduino, Raspberry Pi, embedded security, MCU-based designs, etc.)?

Yes! We have lots of Arduino and Raspberry Pi fans, but of course we have people who work with other microcontrollers as well (ARM based mostly I’d say).

Can you tell us about some of your group’s recent tech projects?

One group project we built was a laser shooting gallery — targets had light sensors and were attached to servo motors, would pop up, and then you had to shoot them with a laser pointer gun. There were sound effects and a score display. You can read more details about it here: wiki.acemonstertoys.org/Shooting_Gallery and there are some videos here: popmechnow.com/radioshack (on the left side) One of our members has been working on using a small desktop CNC router to make custom circuit boards. It uses a neat hack to probe the level of the bed to create more accurate cuts. The results have been pretty good. There’s lots of details about this project here: wiki.acemonstertoys.org/Milling_Circuit_Boards

Another cool and not too complex project is 3D scanning our members and then printing out the models on our 3D printer. We use an inexpensive xbox kinect to do the scanning, along with the free version of the software Skanect, and then we load that model into our Makergear Mosaic 3D printer and spit them out. Here’s a picture of two of our members in plastic model format:

3D Scans of Ace Monster Toys' members

What’s the craziest project your group or group members have completed?

Craziest? It’s hard to say, lots of crazy stuff comes out of this place. One impressive project is our Book Scanner, made from plywood, random hardware store nuts and bolts, and a bike brake cable which triggers the shutters on two cameras to photograph two pages at once. It’s gotten a lot of press, the inventor even gave a TED Talk about it. He made his own website for it, you can find more details here: www.diybookscanner.org

Do you have any events or initiatives you’d like to tell us about? Where can we learn more about it?

Our current biggest initiative is moving to a bigger space. We would like to double our square footage and offer more facilities & capabilities including accessibility. For events which are going on, many of them weekly, check out the calendar on our website or on meetup.acemonstertoys.org.

What would you like to say to fellow hackers out there?

“Collaboration and connection has done more to further my knowledge and to produce better, more creative art and projects and innovative ideas than any other factor. Be fearless. Ask questions, try it. Don’t be afraid to cut, or solder or try even when it seems hard or complicated. Everybody starts somewhere.” ~ Crafty Rachel

Check out Ace Monster Toys’ pages on Instructables and Facebook!

You can read all about their projects on their wiki page.

Show us your hackerspace! Tell us about your group! Where does your group design, hack, create, program, debug, and innovate? Do you work in a 20′ × 20′ space in an old warehouse? Do you share a small space in a university lab? Do you meet a local coffee shop or bar? What sort of electronics projects do you work on? Submit your hackerspace and we might feature you on our website!

New CC Columnist to Focus on Programmable Logic

We’d like to introduce you to Colin O’Flynn, who will begin writing a bimonthly column titled “Programmable Logic In Practice” for Circuit Cellar beginning with our October issue.

Colin at his workbench

You may have already “met.” Since 2002, Circuit Cellar has published five articles from this Canadian electrical engineer, who is also a lecturer at Dalhousie University in Halifax, Nova Scotia, and a product developer.

Colin has been fascinated with embedded electronics since he was a child and his father gave him a few small “learn to solder” kits. Since then, he has constructed many projects, earned his master’s in applied science from Dalhousie, pursued graduate studies in cryptographic systems, and become an engineering consultant. Over the years, he has developed broad skills ranging from electronic assembly (including SMDs), to FPGA design in Verilog and VHDL, to high-speed PCB design.

And he likes to share what he knows, which makes him a good choice for Circuit Cellar.

Binary Explorer

One of his most recent  projects was a Binary Explorer Board, which he developed for use  in teaching a digital logic course at Dalhousie. It fulfilled his (and his students’) need for a simple programmable logic board with an integrated programmer, several switches and LEDs, and an integrated breadboard. He is working to develop the effective and affordable board into a product.

In the meantime, he is also planning some interesting column topics for Circuit Cellar.

He is interested in a range of possible topics, including circuit board layout for high-speed FPGAs; different methods of configuring an FPGA; design of memory into FPGA circuits;

Colin’s LabJack-based battery tester

use of tools such as Altera’s OpenCV libraries to design programmable logic using C code; use of vendor-provided and open-source soft-core microcontrollers; design of a PCI-Express interface for your FPGA; and addition of a USB 3.0 interface to your FPGA.

That’s just a short list reflecting his interest in programmable logic technologies, which have become increasingly popular with engineers and designers.

To learn more about Colin’s interests, check out our February interview with him, his YouTube channel of technical videos, and, of course, his upcoming columns in Circuit Cellar.



Linux Home Automation

Neil Cherry

My first home automation (HA) project included an Atari 800XL, a Heathkit X10 interface, and the “Build the Home Run Control System” article series from Steve Ciarcia’s Circuit Cellar column (BYTE, 1985). I was forever hooked on HA. Eventually, I built Circuit Cellar’s HCS II (Circuit Cellar Ink, 1992). I still provide support for it at The Open Source HCS Project (http://hcs.sf.net.).

One day, while reading the Usenet comp.os.minix newsgroup, I saw a post about Linux, a Unix-like operating system (OS) for the Intel Inboard 386-AT. A short time later, I picked up a used Compaq 386SX PC, loaded Linux on it, and I had a multitasking, multiuser OS on my home computer. I wrote some software, connected my HA interface, and started a webpage with all the information. I eventually became the librarian of all things Linux and HA. Since then,  Linux has been ported to several different systems from small, yet powerful, Raspberry Pis (RPis) to IBM mainframes, and from bare-bones systems to every service, tool, and language imaginable. And, at the base of everything, is a common interface and toolset. While a distribution may put things together a bit differently, at the heart of the system, the tools and interfaces are the same.

Currently, I have several Linux systems in my home including laptops, Wi-Fi routers, network storage, media players, and servers. I also have one Windows computer for testing and support, but I mainly run an X server on it to access my Linux resources. And, of course, I have my HA system, my main Linux server, and MisterHouse (MH), an open-source HA program written in Perl (http://misterhouse.sf.net). In addition to my Linux resources, I have a mix of X10, INSTEON, Z-Wave, ZigBee, 1-Wire, web-based controllers, serial, USB, and Ethernet I/O. My home is more like a lab, but my wife has strict rules: It must work and must look professional. The web-based controllers and the HCS II can operate as a stand-alone system, but they lack certain features I want. Most of the components are tied together by Linux and MH, which supply the missing features. The rest of the components are controlled by programs and scripts, which have been added to cron or run as Unix services. The Linux and MH environments enable me to easily pull together disparate technologies and seamlessly combine them.

MH has been my main HA program since 2000. Its flexibility has made it an extremely useful program. In addition to using Perl for the main code and device interface, I also use Perl for user code. The Wiki site includes examples and a mail to help new users. I’m currently integrating the web-based controllers into MH. I’m surprised at how easy this has been. Some have mistaken MH for dead due to project administrative problems. However, the community seems to have fixed that and has been quite busy updating everything. Version 2.200 became available on March 2.

In addition to MH, my main Linux server also runs my home’s dynamic host configuration protocol (DHCP), which supports Internet Protocol version 4 (IPv4) and IPv6 and a local domain name system (DNS). My Linux server also includes print, file, media sharing, revision control, my development system, syslog, Network Time Protocol (NTP), web server, and other standard Unix services. A 2001 1-GHz Advanced Micro Devices Athlon microprocessor with 512 MB RAM and a 1-TB hard drive (soon to migrated to a RPi) manages the system. The only limitation is that I may need more I/O ports. My MH system has 12 serial ports, so I need to resolve that. I say this to illustrate that Linux can be light on resources when a complex set of services is required.

To take advantage of today’s newer software technologies, I’ve begun looking at HTML5, Scalable Vector Graphics (SVG), JavaScript Object Notation (JSON), and Asynchronous JavaScript and XML (AJAX) for use with MH. Adding AJAX extends the user experience. No more refreshing the page (polling) every 60 s. Instead, the client-side JavaScript code enables us to push the data to the client’s browser and update the webpage as the events occur.

A more recent technology, node.js, which is event-driven, server-side JavaScript, enables you to create new web services with little effort. I believe it can be used to provide the glue between services and MH. For example, I could use a RPi, node.js, and my sprinkler controller. While Linux and the RPi are definitely overkill, the speed at which I can write the code and develop the services combined with the total cost (in time and money) make this attractive.

Future plans include refactoring MH. Fifteen years of cruft need thinning and, amazingly, it hasn’t affected MH’s performance. A bit more object-oriented programming (OOP) would be nice, as it makes it easier to handle complex things. Additionally, I’d like to add many of the lessons learned using HCS II. A simple user language would be a great help to users (it’s not always about the developer).

Neil Cherry (ncherry@linuxha.com) is a Professional Technical Architect at AT&T. He has been active in computers since 1978. Neil has a degree in Computer Science and Electrical Engineering Technologies and has maintained the Linux Home Automation pages since 1995. Neil has been active in home automation with Unix since 1988, and has been using Linux since 1992.

DIY Surface-Mount Circuit Boards

James Lyman, an engineer with degrees in Aerospace, Electrical Engineering, and Systems Design, has more than 35 years of design experience but says he was “dragged” over the past decade into using surface-mount devices (SMD) in his prototypes. He had a preference for using through-hole technology whenever possible.

“The reasons are simple,” he says in an article appearing in the June issue of Circuit Cellar magazine. “It’s much easier to use traditional components for building and reworking prototype circuits than it is to use wire to make the connections. Plus, the devices are large and easy to handle. But time and technology don’t leave anyone at peace, so my projects have gradually drifted toward surface-mount design.”

In his article, Lyman shares the techniques he developed for designing prototypes using SMD components. He thought sharing what he learned would make the transition less daunting for other designers.

This accompanying photo shows one of his completed circuit board designs.

Lyman’s techniques developed out of trial and error. One trial involved keeping small components in place during the building of his prototype.

“When I built my first few surface-mount boards, I did what so many amateurs and technicians do. I carefully placed each minute component on the circuit board in its correct position, and then spent several minutes playing ‘SMD hockey,’ ” Lyman says. “With nothing holding the component in place, I’d take my soldering iron and heat the pad component while touching the solder to the junction. Just as the solder was about to melt, that little component would turn into a ‘puck’ and scoot away. Using the soldering iron’s tip as a ‘hockey stick,’ I’d chase the little puck back to its pads and try again, which was maddening. Finally, I’d get a drop of solder holding one end of the puck in place, usually with the other end sticking away from its pad. Then I could reheat the solder joint while holding the puck and position it correctly. I would have to start over with the next component, all the while yearning for that wonderful old through-hole technology.

“It slowly occurred to me that I needed something to hold each part in place while soldering—something that would glue them in place. Commercial houses glue the components down on the boards and then use a wave soldering machine, which does all the soldering at once. That’s exactly what I started doing. I use J-B Weld, a common off-the-shelf epoxy.”

Using an easy-to-get epoxy is just one of the tips in Lyman’s article. For the rest, check out his full article in the June issue of Circuit Cellar.