Trying Out 360 Photos and Videos

This is LG’s 360 camera. I got one for around $70 at a discount (it originally retailed for around $200) to try out 360 photo and video. The camera has two lenses, one on either side that amazingly, capture a full 360 field-of-view.

LG_360_Cam

This camera does capture “HD” images, but when the image is projected to a full 360 view (which is kind of misleading; the view area is an almost complete sphere, not just a 360-degree cylinder), the resolution ends up significantly lower. Also, a special viewer is required that adds the ability to pan and tilt over the view area. Without a special viewer, the image looks like this (note the extreme distortion at the top and bottom of the image):

DIAE2089

I found an excellent WordPress 360 viewer add-in called “WP-VR-view” by Tumanov Alexander. If you’re viewing this page in a compatible web browser — any current version of Microsoft’s Edge browser, or Google Chrome, Apple Safari or Mozilla’s Firefox should work — you should be able to swipe the image in any direction.

I’ve since upgraded to Samsung’s Gear 360 (2017 model) which has even better specs. Stay tuned for more pics!

The Computer HP Wouldn’t Let Steve Wozniak Build

85m

In the mid-1970’s Steve Wozniak was designing his own hobbyist computer that would become Apple’s first model, the Apple I. He was working at Hewlett-Packard and offered HP the rights to his design. His managers at HP turned down his offer, and Steve eventually ended up leaving HP to join Steve Jobs and help launch Apple Computer.

HP’s refusal might have been based, in part, on a lack of interest due to a competing product they were developing internally, called “Capricorn”, that would later become the HP 80- series of personal computers, starting with the HP-85. As told by the excellent book “Fire in the Valley”, a small group of engineers at HP in Cupertino, California, began designing a new personal computer as an extension of HP’s existing calculator line. As this project was getting started, it was moved to HP’s facility in Corvallis, Oregon. While many engineers at HP were reluctant to move to Corvallis, Steve Wozniak very much wanted to be part of the team designing this computer and might have joined the HP Corvallis team. But this was not to pass: later that year, in October, after HP had turned Steve Wozniak away from Project Capricorn, Mike Markula made his famous visit to Steve Job’s parent’s garage to see the new Apple I computer.

In the early 80’s, while a student at Crescent Valley High School in Corvallis, I joined HP’s Explorer program for students, where we’d spend time after school with HP engineers at the Corvallis campus. The first IMG_1933personal computer I got to use was the new HP-85.

Out of a sense of nostalgia I bought this HP-85 in great condition on eBay.

While the HP-85 had some innovative features, such as the built-in CRT display, thermal printer, tape drive for program storage and expansion slots, the specifications were not necessarily ahead of the market at the product’s introduction in 1980. With an initial price of $3,250, only 8 K of memory, a small display (32 columns x 16 rows of text — not exactly a “retina” display!) and limited storage (217 kilobytes per tape cartridge using the built-in drive), the HP-85 fell behind the state-of-the-art into the 80’s.

The HP-85 was manufactured at the HP Corvallis, Oregon campus; it was fun to walk into the facility and see these computers and HP’s calculators (HP’s Ink Jet printers hadn’t been invented yet) being made. The machines were assembled by hand and, if you look closely at the picture below, you’ll see the workers’ initials where they signed off their assembly step. There are also signatures on the inside of the case. The quality is amazing: this little PC still runs after almost 40 years!

IMG_1907So having gone through the trouble of finding this old computer, what can you do with it? Not much, other than write your own programs or run existing software. There’s no hardware or software support for modern networking protocols. The tape drive no longer works, as the rubber capstan wheel has deteriorated. While this can be relatively easily repaired, there are actually much better solutions for loading and running programs on the computer.

One solution, called “HPDrive” (available here), developed by Ansgar Kueckes, emulates a variety of HP-85 compatible floppy disk drives in software on a host PC. This is the approach I took, running the HPDrive emulator on a Windows 10 PC. I’m still amazed that two computers, separated by almost 40 years of progress, can still communicate!  This miracle of technology is made possible by HP’s long-running support for their own HP Interface Bus (HP-IP) protocol, used originally to connect measuring and scientific equipment to other devices. HP chose this protocol for external expansion in their first personal computer.

HP85_ad_1980

The link above has the details, but basically you install (after finding one on eBay!) an HP 82937A HI-IB interface cartridge in one of the HP-85’s open expansion slots (along with a ROM drawer cartridge populated with the 16K memory expansion and Mass Storage ROMs), a compatible HP-IB card in your PC (I’m used a National Instruments 488.2 PCI interface card, also found on eBay). Running the HPDrive program on the host PC makes that computer appear to the HP-85 as a connected floppy drive. You “point” the HPDrive software to an existing .hpi file, which stores the contents of a floppy disk; typically containing either a number of freely available application packs for the HP-80 series of computers, or any software you write yourself, in BASIC. For those interested, the gory details of how this all works is documented on this page of Ansgar’s web site.

IMG_1935

So what is using an almost 40-year-old PC like? If you’re with me this far, I made s short demo video of three Application Pack programs: an adaptation of the classic ’70’s “Star Trek” game, written by Mike Mayfield and friends in 1971 on a mainframe computer at UC Irvine, a golfing game to show that yes, graphics were possible — sort of — on the HP-85 and finally, an “amortization” program for doing time-value-of-money calculations. This all looks quaint today, but you have to think back to the 70’s, when this was still novel stuff.

World’s Smallest Game Console?

IMG_2670

Adafruit’s new “Joy Bonnet” for the Raspberry Pi Zero, together with a 3D-printed case, and a little bit of soldering, makes for an easy micro gaming console project, based on the open-source RetroPie/EmulationStation software. Here’s the finished project:

IMG_2664

While the Raspberry Pi Zero (actually the “W” model in this case with on board WiFi and Bluetooth connectivity) isn’t nearly as powerful as the latest Raspberry Pi Model 3, it runs NES, SNES, and Atari game console emulators just fine.

To build this console-in-a-controller, you’ll need the following parts:

  1. Raspberry Pi Zero W  — Adafruit usually shows out-of-stock, but just sign up at the “notify me” link and they’re usually back in stock in a couple days or so.
  2. Adafruit’s Joy Bonnet game controller shield.
  3. 40 Pin 2 x 20 Header GPIO Jumper I/O Connector For Pi Zero (search for these on eBay, usually available for around $2.45 with free shipping).
  4. 8 GB or larger Micro SD card.
  5. Mini HDMI to HDMI adapter or adapter cable — the Raspberry Pi Zero’s HDMI connector is a mini connector; not the more familiar full-size connector.
  6. Recommended: a PC board stand-off. The Joy Bonnet game controller shield connects to the Raspberry Pi Zero via the 40-pin GPIO block on one side of the PCB. That leaves a ~ 5 mm gap between the two boards on one side. With all the button-mashing you’ll be doing, you’ll want the stand-off to keep the two boards aligned. These stand-offs are cheap, buy them on eBay for a few dollars for a set.

That’s it for the parts. I’ll cover assembling the parts first, then the software configuration.

Start by soldering the 40 pin GPIO block to the Raspberry Pi Zero. The Joy Bonnet shield already had a connection block attached to the PCB, so once you’ve soldered the pin block to the Pi, you just press the controller shield onto the RPi pin block.

IMG_2623

It helps to have a tool like below to hold the PCB and a magnifying glass to see the pins clearly. If you solder the pins correctly, the solder will flow into the hole around the pin connection, and you’ll have a nice, shiny bit of solder around the base of the pin.

Important: the pins on the PCB block are a bit on the long side, so you’ll want to trim them as close to the RPi PCB as possible, so that the Pi board will fit into the bottom case part.IMG_2636

Next, you’ll want to trim a PC stand-off to about 5 mm in length, to act as a support between the two circuit boards, on the side of the RPi PCB opposite the GPIO header. Fasten the stand-off using a screw to the top side of the Joy Bonnet PCB. Here’s a picture to better illustrate this. This picture shows the screw attached on the bottom of the RPi board, but that’s a mistake; it’ll interfere with the stand-offs I designed into the case.

Also, I ended up using a screw with a lower head height, but that’s not really critical.

With this done, you’re ready to print the case, or order from an online print service, or make use of a 3D printer at a library, participating UPS store, etc. I’ve uploaded the STL files to Thingiverse here.  The case was designed using Autodesk’s 123D Make CAD software to dimensions that allow for some tolerance between different printers. If the case is a little too small or large, try scaling the model files by a few percent. This case is designed with thick walls to withstand rougher handling.

IMG_2660

Once all parts are printed and fit tested, you might want to sand or file the join edges between the case halves for better adhesion. Since I printed the parts in PLA plastic, super glue works well to bond them together, as shown above.

Next up: loading the software onto the Micro SD card. Start with the latest RetroPie image. Make sure you download the appropriate image file — in this case for the Pi Zero — directly from the RetroPie web site. If you’re using Windows, you’ll want to use software like Win32DiskImager to write the image file you’ve just downloaded to the SD card.

Connect a keyboard, display, and power to your RPi and boot up. If it works, the Raspbian OS will load first, then run EmulationStation, and finally RetroPie. Exit RetroPie to get to the console. It’s easier at this point if you configure your RPi for wireless connectivity. This article explains how. When you’ve got your RPi connected to your wifi network, come back here.

Next, you need to install some custom software and configure RetroPie to use the Joy Bonnet as an input device. Adafruit has a page with the steps here; but basically you’re running a script from the console, with your RPi connected to the Internet.

Reboot again and RetroPie should recognize your button presses. Of course, at this point you haven’t transferred any game images, so none of the emulators appear as options. I find it easiest to obtain the RPI’s IP address from within the app, under “Settings”, then use WinSCP (or equivalent for Windows) to transfer the ROM images you own to the appropriate emulator folder on the RPi.

That’s it! Enjoy some classic gaming on a console that fits in your pocket.

IMG_2663

Retirement Countdown Clock

IMG_2425

I’m still a few years away from retirement eligibility, but that doesn’t mean I can’t be getting ready. The problem is, it’s easy to get distracted. I was looking for a quick project and had the idea to make this retirement countdown clock, to remind me to stay focused on my retirement goals.

This is a cheap project, costs around $12 (not including the cost of the 3-D printed case), and is easy to make. The main components are:

  1. MAX 7219 8-digit, 7-segment LED display — you can find these on eBay for about $3.50, including shipping.
  2. DS 3231 Real Time Clock (RTC) module — about $2.50 on eBay. Don’t forget the 2032 coin battery.
  3. Arduino Nano Micro-controller — about $6.00 on eBay.

The basic design is simple, both the 8-digit LED display and Real Time Clock (RTC) module are wired directly to the Arduino.

IMG_2400

I was initially worried that the display would draw more current than can be supplied by the Arduino, but that’s not a problem at all. Just to be safe, you’ll see in the code that I’ve reduced the display brightness to avoid any issues.

Connect the following LED pins to the Nano:

VCC -> 5V
GND -> GND
DIN -> D2
CS -> D3
CLK -> D4

Next, connect these RTC module pins to the Nano:

VCC -> 5V
GND -> GND
SCL -> A5  Note: Arduino pins A4, A5 are dual-purpose; in this case
SDA -> A4  they're used for the I2C interface connection to the RTC.

Here’s a picture of the three components wired together. Because the Arduino Nano has only one 5V pin, I had to do a bit of soldering to create a Y-shaped connector cable, to provide power to both the LED display and RTC module from this single pin on the Nano. That’s the red and white shrink-wrapped cable.

IMG_2404

I designed the 3D-printed case using Autodesk’s free 123D Design software. Here’s a series of screen shots showing how the case is designed. I start by placing a 2 mm thick back “wall” of the case. An easy way to make the rounded corners is to merge 2 mm high half-circles into larger rectangle. Once the shape is correct, you can fuse the separate pieces to make a much more complex, solid shape.

Next, add 2 mm thick rectangle case “walls” to the back piece, and add quarter-cylinder shapes, the same height as the sides, to close the edges. With these pieces aligned precisely, you can continued to fuse or merge these pieces together to make larger solids. I haven’t noticed that keeping the component pieces separate or fused makes much of a difference in how the design is printed in 3D.

2017-03-31-5

The 123D Design software lets you merge pieces when exporting to .STL format, but combining pieces does make managing more complex designs easier.

Here’s the final case design.  I created the face plate in the same way, but adding the embossed lettering is much easier to do using Microsoft’s excellent (and free) 3D Builder app that is included with Windows 10. You can download the case files in .stl format here.

IMG_2406

The last step in this project was to write the Arduino sketch to run the clock. The code is almost trivial, so I haven’t bothered documenting it here.  The Arduino sketch file (.ino) is available for download here.

That’s it! Post any questions to comments.

Do you need a 3D printer?

No, of course not. Might you want one?  Possibly. The promise of home 3D printing has definitely been over-hyped; the 2014 documentary “Print the Legend” covers this well, by profiling the rise (and beginning of the fall) of MakerBot, one of the pioneers of the consumer 3D printing market.

Nonetheless, the hobbyist market is progressing; there are a number of excellent printers available. MakerBot is still around, the Kickstarter-funded M3D Micro offers an entry-level printer for $249 and, at the other end of the spectrum, Robo and Ultimaker sell excellent, almost “prosumer” class printers for significantly more.

I bought this 3D Systems 3rd-generation Cube printer, used, on Ebay, a couple years ago. It originally sold for $1000, but I got it for around $300.

IMG_2323This was 3D Systems last consumer model. It’s an excellent printer but suffers a fatal flaw: the filament is contained in non-reusable cartridges, the idea being to make replacement as easy as changing ink in a paper printer. The cartridges are prone to jamming, however, and originally retailed for $50 each, much more expensive than buying bulk filament. I’ve got quite a few cartridges, but when these run out, I’ll be looking for a replacement printer.

So back to the original topic: why have a 3D printer at home? If you like to make things, being able to create plastic parts, in almost any form you can imagine, is indispensable. weathercube_controller

Case in point, to borrow from an earlier post: for the weather cube project, I needed something to hold the three circuit boards in place. Using Autodesk’s excellent (and free) 123 Design CAD software I was able to design, prototype and print a perfectly-fitting “cage” in a couple hours. UPDATE: Autodesk no longer makes this software available but you can still get the Windows version (and this is kind of odd) by searching for “123 Design” on Amazon.com. You’ll find it listed for $0. Add to your cart, check out, and you’ll get a download link to what appears to be a legitimate copy of the software.

Beyond hobbyist projects, I’ve found that, once you have a 3D printer, and understand what it’s capable of making, all kinds of applications around the house begin to appear. IMG_2309For example, this set of custom-designed stands for our TV, to accommodate the sound bar placed in front.  Without these risers, the sound bar would block the bottom of the screen. By designing curved stands that perfectly match the shape of the TV’s “feet”, the sound bar can be nestled in-between, for a compact appearance.

To get a better idea of what’s possible, check out Makerbot’s Thingiverse web site, a sort of clearing house of user-created models, all available for free download and printing, in standard .stl format, on just about any 3D printer.

Custom-fit brackets and holders are another application area where 3D-printing excels. You’ll want to investigate more durable plastics, like ABS, for some applications but for use around the house, PLA is often sufficient, and easy to work with. Here’s an example: a bracket to hold this flashlight in a convenient location.

IMG_2312

If you find any of this intriguing, but don’t want to commit to buying your own printer, there are online print services, Sculpteo and Shapeways are two of the more established service providers. Other options include local libraries that might have 3D printers available for free and UPS, which has offered print services at some locations.

Weather Cube

Tempescope is a project started by Ken Kawamoto, to create an “ambient physical display that visualizes various weather conditions…”  Here’s a video of his creation in action:

He’s also created an open source version, you can find more details here: https://www.tempescope.com/opentempescope/

If you want to create your own version of this device — I call it a “weather cube” — I’ll provide some pointers that might help clarify the build process outlined above. The basic idea is to create an acrylic cube made up of two compartments: a large upper chamber that will contain the “weather” — either rain or a mist that can represent clouds or fog — with a water reservoir at the bottom, and a second bottom compartment that will contain the power supply and controller for components that create the weather effects: a water pump, a water atomizer, a fan to exhaust water vapor from the upper chamber, and a multi-color LED that can represent sun or lightning.

tempescope_finished_exterior

Here’s a diagram from the (original) open tempescope site that shows the basic arrangement. The water reservoir and electronics compartment are in the white painted section at the bottom. You can see a spot at the top (on the “lid”) to hold the multi-color LED, and a clear plastic tube that moves water from the reservoir in the white section at the bottom to the top, in order to sprinkle water into the top (clear) chamber, in order to simulate “rain”.

The exact size of the weather cube isn’t critical. I made mine approximately 4.5″ (L) x 4.5″ (W) x 14″ (H). The white painted section at the bottom is 6″ high.  Here’s a video of it running, after I’d completed assembly, and had a first working version of the control software:

I started the build by creating a jig, basically a couple wood boards, glued together to form an “L”, at an exact 90 degree angle, to facilitate gluing the pieces of acrylic together, while keeping the angles square.

Here’s the almost complete acrylic cube, showing three sides glued together, divided into the two chambers. I added a small “shelf” in the water reservoir to hold the water atomizer at the right level, just below the water surface, in order to create the right amount of mist that sprays upward into the “weather” chamber.

IMG_20151124_152601466

You can also see the exhaust fan mounted just above the water reservoir, and holes drilled into one side to hold the push-button switch controls.

At this point, I started sourcing and wiring the individual components together, and connecting them to the controller. For this project, I used the Raspberry Pi 2 computer, since that eliminated the need for an external application, an iOS app in the case of the Open Tempscope Project. The basic idea behind the software is that a python script can call the Yahoo! weather web service to obtain a weather forecast for any of a set of pre-configured cities around the world, then switches (transistors) connected to the Raspberry Pi’s GPIO pins will switch the multi-color LED, pump, atomizer and fan on and off as required to create the desired weather effect: sunshine (with or without clouds), rain, fog, and lightning.

Here are the components, minus the multi-color LED (which can be powered directly from the Raspberry Pi’s GPIO pins): the water pump at top-left, the atomizer at left, the Raspberry Pi at bottom, and the exhaust fan on the right, connected on a breadboard.

IMG_20151103_213647266

Note the separate 24V (for the water pump), 12V (for the atomizer) and 5V (for the exhaust fan) power rails. Also, I’m using transistors, connected to the Raspberry Pi’s GPIO pins, to control the external devices that can’t be powered directly from the GPIO pins, due to high current demand. I’ve copied my notes below, showing how voltage regulators are used to provide the 12V and 5V from an external power adapter that provides 24V DC output. weathercube_notesAlso shown is how the transistors are wired to act as switches for turning the pump and atomizer on and off.
weathercube_controllerThese transistors and other components are mounted to a breadboard, then wired to the Raspberry Pi using terminal connectors. I needed a “cage” to hold everything together, so I 3D-printed the assembly shown above. The top board is the power supply, with heat-sink attached voltage regulators, the Raspberry Pi is mounted in the middle, and the switching transistors for the fan, atomizer and pump are mounted on a perforated (“perf”) circuit board at the bottom.

IMG_20151205_120257499

Here’s a view of the completed case, all the sides are glued and sealed. It took a few tries to find a type of silicon sealant that bonded well to the acrylic plastic. You’ll find that bonding the sides together with acrylic glue alone won’t create a watertight seal, and that you’ll need to use a silicon sealant to make everything watertight.

IMG_20151213_144040696-1

The bottom six inches of the cube are painted last, with a small clear portion left for the OLED display, mounted inside the case using a custom 3D-printed bracket. The display is wired directly to the GPIO pins on the Raspberry Pi.

As you work with the plastic, you’ll invariably scratch the surfaces (I gave up trying to protect it early on); the good news is that a polishing kit will fully restore the original clarity.

The weather cube is controlled by a Python program that “listens” for a button press that selects between a fixed set of cities. For a selected city, Yahoo’s weather web service is called to obtain forecast conditions, then a procedure is called that simulates that weather via some combination of LED lighting, water and mist from the atomizer.  The simulated weather is displayed for 30 seconds, then the fan is run to clear water vapor from the upper chamber.

Contact me via comments if you need more information or want a ready-to-run Raspbian image for the Raspberry Pi.

A better iPod…from the past

The highest capacity iPod you can buy today is the 128 GB iPod Touch for $399.  Apple discontinued the “classic” iPod in 2014. You can still buy a new, last-generation iPod Classic on eBay, but it will cost you: over $400 at the time I’m writing this post.ipod_5th_generation

Fortunately, there’s a way to get a high-capacity iPod for much less. Go back to eBay and find a used, good condition iPod 5th Generation (also called the iPod Video, since this was the first generation player with video playback capability). Prices for these devices are reasonable; I was able to pick up a good quality unit for around $50.

Next, head over to iFlash.xyz and pick up one of their iPod flash memory adapter boards.  They offer several models with varying storage capacities; I bought the iFlash-Solo for $33.  This board turns a regular (and cheap!) SD card into a replacement hard drive for your iPod, up to 128GB capacity. Other slightly more expensive versions of this board offer much higher capacities.

Directions for installing the iFlash card into your iPod are on the same page as the specific iFlash adapter card you’re interested in. You’ll need a “spudger” tool like this one from iFixit to pry apart the case halves on the iPod and be warned: you’ll also need iFlash-Solo_500some patience and time to open the case without damaging the easily scratched plastic face on the iPod. There are useful guides on YouTube for doing this. If you do damage the iPod, both halves of the case are available new on Amazon for very reasonable prices.

Also, while you’ve got your iPod open, you might want to replace the Li-Ion battery. These are available on Amazon for around $17, and include a plastic tool for opening the iPod case.

With this conversion, you’ll have a classic iPod with 128 GB (or much larger!) storage capacity, that is noticeably faster with a flash drive than the mechanical hard drive used in the original player. Even better: your new iPod is lighter without the hard drive and runs longer, too.