December 2014 Office Chairiot Mark II Update: Electronics A Plenty!

The control panel is coming together quickly. A number of the original modules I'd designed earlier didn't quite work the way I'd planned, so I've reworked some of the PCBs.

The first major issue I ran across at SEMA was power: I had weird ground stuff going on and I even ran into a couple of unintended shorts. So, the first thing I did when I got back was organized my power supplies.

I'm a very firm believer in switching regulators over linear regulators. WAY more efficient. Today, it's EASY to use them, too. For this one, I went with regs that could to 1A and that required not much in the way of a supporting cast. I think the datasheet wanted three capacitors for a normal situation. Not that this control panel is by any means "normal," but...

On this board, I used switching regulators from CUI. Part number is V7805-1000-SMT for the 5V surface-mount version and V7803-1000-SMT for the 3.3V version. Here's the datasheet for those: http://www.cui.com/product/resource/v78-1000-smt.pdf

The regulator on the left in the picture above is 5V. The other is 3V. I don't have any 3V stuff, yet, but I figured I'd put one on for expansion later. The GPS module I'm using is a 3V part and will actually be a part of the chassis. Mostly because the chassis is what I'd prefer to keep track of: It's upwards of a couple thousand dollars. The IKEA chair is $70.

The bottom of the board has a number of terminals and headers for easy addition of new modules, connected whichever way was the way of the day. There are more 5V connections (right side, four terminals, four two-pin headers) available than 3V (left side, two terminals, four two-pin headers). This board runs off the 12V accessory batter in the chassis and the power is very clean, even with the 24V drive system running with those two big motors.

I also had issues right before SEMA with busses in the control panel, as in, I couldn't find enough easy connections for ground for things like buttons, switches and other modules. So, I rectified that one by making an additional and convenient little bus board to help spread the electric love, as it were:

The two green terminals are where the 12V from the battery comes in. The second terminal is there to jump off to the power supply board. The middle set of headers is tied to whatever you connect to the green terminals. One side of the headers is ground, the other is whatever the other wire is (12V, in this case).

The side terminals and headers are their own busses. One side has all of the positive (labeled "+") tied together between the terminals and the heads behind them. Same goes for the opposite side of the board. They're meant for lower power, like 5V and 3V.

ALL of the terminals and headers share the ground on the board so that everything is aware of the same ground level. You can see how they're all connected (or not) in this photo of the bottom of the board:

I forgot to flip the text when I printed the transparency for the image transfer process. Whatevvs. Hold it up to the light and it's totally readable from the other side. :p

All along I was designing a fairly complex snap-on adapter board for the Arduino Mega 2560 to make quick work of connecting all of the modules inside the control panel to the brains of the operation. I then stumbled onto a ready-made board at Adafruit (http://www.adafruit.com/product/192) that did mostly what I was designing, but without the work. :) $15. Can't go wrong.

Next up was the LCD. I just didn't have enough time before SEMA to get my previous version of the LCD board working right. So, I started fresh.

The LCD was always an bit of an unknown, as far as how the heck I was going to fasten it to the underside of the face of the control panel without adding ugly screw heads. For SEMA, the panel was simply STUCK to the underside of the panel with one of my favorite holding materials, Gorilla Tape. NOW, I actually put some countersunk holes in the aluminum enclosure under the glossy plastic face AND I cut a nice spacer from a sheet of plastic for behind the panel face to keep the face of the LCD even. I'll post more on that crazy engineering later. This post is about circuits and stuff.

The adapter board for the LCD is really just that: It's an adapter. It has a female header to bring all of the pins from the Newhaven LCD display (a 4x20 LCD character display) (http://www.newhavendisplay.com/nhd0420dznswbbw-p-413.html) to the edge of a board in a way that's easier for me to work with. It also adds a digital potentiometer for the LCD contrast so that I can change the contrast through the configuration in the control panel firmware. That's the IC in the upper-right of the photo above. There's also a decoupling capacitor on the other side where the power comes in for good measure. The brightness is handled with a PWM channel from the Arduino.

I run the LCD in 8-bit mode. It's easy enough to do it in 4-bit mode, as well, but I have the pins to do 8. In testing, it's hard to tell the difference when you're bit-banging the characters over to the display, but in the micro-level scheme of things, I'm saving some clock cycles.

Next up: Managing all those switches and buttons.

While the Arduino Mega 2560 has a crapload (technical term) of GPIO pins, using them for the 30+ buttons and switches on the Office Chairiot control panel felt wasteful. So, I brought in the shift registers! There are I/O expander ICs out there, sure, but that's just not as fun or maker-like as making your own expander out of cool, standard logic chips. This board has 32 pins that it can shift into the Arduino through just a couple pins. It's really handy. It looks tedious to solder (it is), but it's relaxing to sit there and concentrate on soldering and drown out whatever else is going on, like the garbage needing to be taken to the curb or the pool needing cleaning. :)

The board is super-simple to use because the buttons and switches can be connected with simple two-pin female connectors. The pins have pull-up resistors just in case the software guy doesn't enable them on the microcontroller. I never forget, of course.

The audio system has been a royal pain in me bottom (insert minion giggles here). The audio was pretty easy to get up and running on the breadboard, but there were a lot of interconnects between the MP3 player board (http://www.adafruit.com/products/1381) and the 20W Class D amplifier board (http://www.adafruit.com/products/1752), both from the wonderful folks at Adafruit (again). Making sure the PCB to bring them together was designed right was tedious. The one shown here was version 2. Version 1 worked, but version 2 makes better use of space and made routing traces cleaner.

The green stuff on the back of the board is the etch-resist stuff left on from the positive photoresist method I use for making homemade printed circuit boards.

I like the MP3 board from Adafruit because it's pretty easy to use, especially because of the SD card slot. The problem I'm having at the moment is the library, I think. It's locking up my Arduino randomly and I think there is an interrupt issue. We shall see. I'll be talking to Adafruit support about the problem. Otherwise, the sound is great and I like how easy it is to implement, as long as it's cooperating.

The speakers are some nice little 3-inch (maybe-ish) ones I picked up for their response quality. It was a good range, as I recall. Kobitone or something. They weren't the cheapest ones at Mouser, but they have great sound when they're properly enclosed. Plus, they're not that deep, so they'll tuck away into the control panel nicely.

That leads me to the new back piece to the control panel enclosure:

As you can see, I've learned in my time at Local Motors Labs that "speed holes" make a part "go to 11." That features aside, a number of things stand out on this new version:

  • Fins on the mounting pillars because the guts for the panel are adding a lot of weight to it making the simple design I have right now a bit flimsy
  • Big-ass hole in the back for easier and quicker circuit access (there will be a hinged door there)
  • Speaker holes! Yay sound! Also having speaker cover rings made that I'll wrap in something swanky before mounting.
  • I think the pillars themselves will be the next diameter up from the first version, whatever that was, can't remember at this moment

The last piece to this update is the remote key fob receiver. It is (again) from Adafruit (http://www.adafruit.com/products/1096). It's SUPER easy to use. Give it 5V, ground and then just have your microcontroller watch the D0, D1, D2 and D3 outputs for HIGH level when a key on the fob is pressed. If you prefer LOW on press, throw an inverter in between. Although, I don't know why you'd waste money on another IC when software can handle just fine. My two cents.

Thank you BOTH meltmedia and Local Motors for all of your help and support! You both rock!

Andy Frey

StuffAndyMakes.com, Gilbert, AZ, US

My name is Andy and I am a maker. Enough about me. How are you? What did you have for lunch yesterday? Have you made anything cool lately? OK, back to me: I like to make things, with or without purpose. Clocks, shelves, machines that turn themselves off, homemade circuit boards, IKEA chairs with motors, etc. I love to learn how to manufacture stuff myself. I also love to take things apart to see how real-world products are engineered.