Category Archives: Apple

A nice display for Raspberry Pi

I needed a compact computer setup for my cramped electronics workbench.  The SunFounder 10.1 inch display is both space- and cost-efficient.  Instead of using molded parts for the case, SunFounder uses laser cut acrylic sheets, presumably to keep the cost of production down.  A Raspberry Pi computer can be mounted behind the screen.

Although it has a few minor quirks, the SunFounder screen represents a great value.  Recent price on Amazon was $110.99.  Add a $25 RasPi, keyboard and mouse and you’ve got a very capable little one-piece computer for under $150.

What I like about this display:

  • 1280 X 800 pixel resolution is more than adequate for running a browser or a few terminal sessions
  • As claimed, the IPS LCD screen has a very wide viewing angle.  I also found the color saturation and contrast to be excellent
  • Built-in speaker
  • It has VGA and composite inputs in addition to HDMI

And a few deficiencies:

  • The monitor arrived with several loose screws.  Seems whoever assembled my unit didn’t have a screwdriver that day
  • I needed to dremel one of the acrylic plates that holds the RasPi in place to make it fit properly
  • An onboard source of power for the RasPi would be welcomed.  I suspect that a 5V connector that taps internal power could be added for less than the IR remote control that comes with the display.  What possible use is a remote anyway?  I can’t envision ever being more than arm’s length away for a screen that’s only 10 inches wide.

    My kludgy solution was to velcro an extension cord to the back, connecting separate power bricks for the display and RasPi:

  • Out of the box, I was getting no sound from the display.  The printed instructions that came with the it said to run raspi-config and choose the option to force audio out through HDMI.  But that did not work because the computer was detecting the SunFounder screen’s interface as DVI, which is not audio capable.  The solution was to add the line hdmi_drive=2 in config.txt to force HDMI mode.

These minor nits aside, for the price of a cheap Chromebook, the combination of the Raspberry Pi and SunFounder display provide several features that are useful on my workbench and would not be available on other similarly priced platforms like a  built-in serial port, gpio pins and the ability to display HDMI, VGA or composite video.

Next project, a perfect companion for this setup:  let’s dust off an Apple Newton keyboard and add USB connectivity to it.

Repairing an iMac Power Supply

A 24″ iMac that wouldn’t start up came in for repair.   Pressing the power button got the fan to briefly run then shut off.  It never reached the point where there was a happy (or sad) chime.  The owner’s first inclination was to toss the computer after we wiped the hard disk but I told him we could probably get it running for the cost of a new power supply (around $75).

Using the always great disassembly instructions at ifixit.com, I got the front bezel off the iMac and checked the logic board diagnostic LEDs.  LED 1 was on and LED 2 came on briefly when I tried to start the computer, indicating that the logic board was probably fine and the problem was with the power supply.

Several disassembly steps later I had the power supply board out of the iMac.  From a quick visual inspection, I could see that some of the  2200 µF capacitors were leaking a bit and one had developed a considerable bulge at the base.  Maybe we could do a cheap repair here?

I clipped the four suspicious caps out (to get an accurate measurement) and checked them with my Fluke 179 multimeter–quick side story:  this DMM is so rugged that it survived a total loss house fire with only minor cosmetic damage.  All the capacitors were out of spec but interestingly the one that looked the worst actually measured closest to good.

Easy peasy fix, right?  LOL, not exactly.  This board uses lead free solder, which is a total pain to remove.  Even with my trusty Hako soldering iron cranked up to 800º, the PCB’s heavy copper traces made it a challenge to keep the solder molten long enough to suck it up with a desoldering tool.  An hour of determined effort and cussing later I had the old caps out and the through holes cleaned out.  (I needed to ream most of the holes to get the last bits of lead free solder out).  Four new shiny black capacitors installed without any drama.

Shiny new capacitorsAll LEDS Normal

I reinstalled the power supply module and the iMac started normally with 4 LEDs lit on the logic board.  I also installed a new button battery while the iMac was open.  Total cost of repair: under $2 🙂

If I were to attempt a similar repair again I wouldn’t bother with trying to remove any components from the circuit board because of the lead free solder.  The job wouldn’t look as pretty, but it would be a lot easier to just leave the old leads in place and solder new parts onto them.

Thoughts on the Apple Watch

I’ve been living with an Apple Watch for a month now (stainless steel case/Milanese loop band).  Overall, I think it’s great.  The most common criticism that I hear about Apple Watch is that there is no “killer app” that creates a compelling new product category.  This is absolutely true.  However, the real value of Apple Watch is the cumulative effect of its numerous and sometimes subtle features.

It’s the little things that count

Right off the bat, it’s easy to appreciate that the Watch is a beautifully crafted piece of jewelry (photos of the Milanese band don’t do it justice;  you need to see it sparkle in sunlight).  But it takes several days of wearing Apple Watch to get a full appreciation for its capabilities.

The best features of the Watch are not activated by direct user interaction but just seem to happen at appropriate times.  Case in point:  the first time I used the Map app on my iPhone to get driving directions I was pleasantly surprised to learn that I didn’t need to see or hear the phone to know when to turn.  The watch tapped my wrist with three double taps when I needed to turn left and with a steady series of twelve taps for right.

The Activity app won’t turn me into a marathon winner overnight but it succeeds in prodding me to do a little bit extra every day.  It sets daily goals for moving, exercise and standing.  Several evenings I found myself just short of goal right before bedtime and made up the difference with a quick exercise session.  This wouldn’t happened if the watch wasn’t giving me frequent encouragement (including virtual “awards”) to hit all my daily goals.

The Watch reminds me to stand if I’ve been sitting too long.  And it provides a weekly and periodic activity reports that encourage me to stay on top of my goals.  The cumulative effect of these little “nudges” should be a lighter, healthier me.

Size matters

It’s been reported that around 70% of the Apple Watches sold to date are the larger 42mm models.  I think the majority of the people people buying these are wrong for the following reasons:

  1. On all but the largest wrists, the 42mm case looks dorky.  There, I said it.  The 38mm watch has a more conventional size and looks elegant on both men and ladies.  But Apple doesn’t always make it easy for men with larger wrists to get a 38mm model that fits.  For example, if you’re a man in the market for a stainless steel Watch with the elegant Milanese loop band, you need to step up to the 42mm case (for an extra $50) if your wrist is larger than 180mm.  Apple should offer a large Milanese band option for the 38mm Watch.  Bigger guys who want a 38mm case with a stainless band will need to shell out an extra $300 to step up to the Link Bracelet.
  2. Yes, the larger watch has slightly better battery life.  But this is irrelevant because neither model will make it through two full days on a charge.  Whether you have a 38mm or 42mm watch, you will still need to take it off every night for charging.
  3. The larger screen doesn’t really offer much in terms of better ergonomics or readability.  I haven’t experienced any problems with the 38mm Watch recognizing exactly which object I’m trying to tap.

Some room for improvement

My main nit with the Apple Watch is that I need to rotate my wrist slightly more to activate it than I would to glance at a conventional watch.  It would be great if there was a user configurable sensitivity setting for the “Activate on Wrist Raise” feature.    With 40% power remaining after a typical day, I wouldn’t mind if the Watch sacrificed a little battery life to activate less conservatively.

According to Apple, the Watch and iPhone that it’s paired with are supposed to be able to communicate over a trusted WiFi network when they are out of Bluetooth range.  This doesn’t seem to work reliably in my house but it might have something to do with having multiple Ubiquiti long range access points installed (although this setup is seamless with all the other WiFi devices I use).

I’d prefer a thinner case, but to Apple’s credit, the Watch looks svelte next to most smart watches.  (Curiously, it looks thinner on my wrist than off).  I have no doubt that Apple will figure out a way to slim subsequent models down as they have done with every other device.

Apple should sell a proper charging stand for the Watch.  However, the Nomad Stand is an attractive option (albeit a tad expensive at $70 for a piece of twisted aluminum).

Minor gripes aside, the Apple Watch is a fabulous first generation product and I highly recommend it.

Switching between HDMI and analog audio on a Mac

Here’s a proven fix if you need both analog and HDMI audio outputs and require a way of switching between them.  In my case, I had an application where a rack mounted Mac Mini serves as both a media server and an audio source for a whole house paging system.

I first tried using the headphone output as an analog audio output.  The problem is that if anything is plugged into the headphone jack, it is not possible to select HDMI for sound output via the Sound preference panel or via any other means.  Various people have posted methods for outputting audio to both HDMI and headphone out simultaneously, but my application requires only one output to be active at any given time.

The hardware piece of the solution is a relatively cheap Turtle Beach USB DAC.  I’d imagine other USB audio converters would work equally well.

After plugging in the DAC, I confirmed that I could switch audio sources from the Sound preference panel.

The next step was to to automate the audio switching.  I found various Applescript techniques on the web for doing this by scripting the sound preference panel UI, but that approach seemed kludgy and probably slower than using a compiled command line tool.  If such a tool is included in OS X Mavericks, I couldn’t find it.  Fortunately, a generous developer created an output switching utility called audiodevice, which is available here.

Audiodevice works perfectly but has one minor quirk.  Some output devices have trailing spaces after their names, which need to be included in audiodevice commands.

Here is an example of a shell script that uses audiodevice to switch audio output from HDMI to USB DAC, plays a sound effect, outputs a string that was passed to it from the command line as text to speech, and then switches back to HDMI:

/usr/local/bin/Audiodevice/audiodevice output "USB Sound Device        "
/usr/bin/afplay "/Library/Audio/Apple Loops/Apple/iLife Sound Effects/Machines/Communication Engaged.caf"
say $1
/usr/local/bin/Audiodevice/audiodevice output "HDMI Matrix  "

Notice the spaces after USB Sound Device and HDMI Matrix.  If you are not using the Turtle Beach DAC, the USB DAC may have a different name.  Use the audiodevice output list command to get a list of the audio output devices installed on your Mac.

Vehicle detection using iAutomate RFID

One item on my to-do list for a long time was to enable our home automation system to detect the comings and goings of our vehicles.  Each has an EZ-Pass badge, so I figured slam-dunk, just find an appropriate active RFID reader and we’re done.  But I was unable to find a cost-effective solution.  (But wouldn’t that be an awesome Kickstarter project . . .)

I also explored homebrew solutions using Bluetooth modules and Wi-Fi but laziness triumphed when I heard about a plug and play long range RFID kit for Indigo.  (There are also versions available for Homeseer and Crestron.)  The kit comes with a reader module and two RFID tags.

Overall, I give this product a B+.  It works well but you have to get past a few annoyances.  #1, the price.  I think iAutomate is making a mistake with the pricing.  $549 for the “starter kit” puts this product out of reach for a lot of people.  I’m taking a very rough guess that the whole kit costs well under $100 to produce.  iAutomate should really consider a $399 price point (or <shudder> $199?)

Next annoyance:  WTF with the pinout?  The readers have RJ-45 (ethernet style) jacks to carry 12-volt power and RS-232 serial signal.  But, as the manual cautions, if you plug this thing into Ethernet, something will surely fry.  iAutomate provides a lovely color engineering diagram showing how to terminate an eight conductor RJ-45 plug into the custom, 4-conductor pinout that the reader uses.  Ignoring that will make many, many crispy devices on your LAN. Gosh, if you’re gonna insist on using a proprietary pinout, at least use a proprietary connector.  Or an RJ-11 that won’t get confused with Ethernet?  Or better yet, just put an adaptor in the box to convert to standard Ethernet pinout.

And yet another nit.  The reader case doesn’t have any sort of mounting flange.   I just used a couple of cable ties with screw holes to fasten the reader to a wall.

iAutomate says you need to use a USB-to-serial converter that uses the FTDI chipset.  And they mean it.

Initially I tried connecting both the RFID reader and a Lutron RadioRA 2 main repeater to a Keyspan 4-port adapter (which does not use the FTDI driver). This combination was catastrophic!  The computer crashed every time the RFID reader saw a tag.  So I tried leaving the Lutron repeater on the 4-port adaptor and putting the RFID reader on a single port Keyspan unit that I had in my parts box.  This had the frustrating result of working perfectly except when a tag would first come within range of the reader, causing the Indigo plugin to reset communications.

Finally, I plunked down 12 bucks for a generic FTDI converter and voila, the reader worked reliably!  I still don’t understand why the Keyspan adaptor, which is my go-to device whenever I need to do USB to serial conversion, didn’t work.  iAutomate’s Indigo plugin is written in Python, using the same libraries that I used for the RadioRA 2 plugin, so it would be reasonable to assume that both devices would be hardware compatible with the Keyspan.

The manual also cautions that placement of the RFID reader and orientation of the tags may require some trial and error.  This couldn’t be more true.  I had to try about a half dozen locations for the reader before finding one where all the tags could be reliably read.

Conclusion:  an effective, but expensive and tricky to install device.

Update (May 21, 2014):  I am revising my overall assessment of this product to an A- for the following reasons:

  1. The latest version (2.1) of the iOS RFID Track app adds signal strength display and an improved UI, among other things.  It’s a real pleasure to use and is available from the iTunes Store.
  2. I recently needed technical support for the Indigo plugin and was very satisfied with the experience.
  3. Peter Monahan, the President of iAutomate, explained the reasoning behind several of the product’s pricing, manufacturing and design decisions to me.  For example, their decision to use RJ-45 connectors now makes sense to me.  Here are Peter’s remarks:

I thought I would take a moment to address some of the concerns that you had and then mentioned in your remarks. I hope to provide you with a better understanding.

Price:
The hardware devices cost us far more to manufacture than you cited.  Far more.  Many users are not aware that all of the RFID devices have FCC, IC and CE approvals; this adds tremendous cost to the hardware. We don’t have a choice in the USA, the devices must be FCC listed. We also sell in Canada and Europe.

We fight the temptation to have the devices manufactured in Asia.  There are non-financial costs associated with “making it cheap in China” and we are not willing to compromise.

As you are already aware, we provide free technical support for the product M-F 8am-5pm and are often available outside of those hours and on weekends.

The plugins (yes there are two) cost thousands of dollars to develop and are the most professional, full-featured, reliable,  detailed and documented plugin available for Indigo, bar none, yet they are bundled for free with the hardware.  The hardware was extensively tested by a team of Beta Testers prior to release (not on a single workbench). The cost of this development and continuing updates is priced into the hardware.

Similarly, RFID Track for iOS cost thousands of dollars to develop and is available for Free via iTunes for unlimited devices.The cost of this development and continuing updates is also priced into the hardware.

There is a lower cost “LE” version of the kit available for those who do not expect to expand their network beyond a single reader that sells for $399.00, but the higher cost kit sells better at $549.00.

FTDI Chipset:
FTDI provides the most current driver support and updates for OS X. During development, it was discovered that the Prolific brand chipset was often “bootlegged” and despite the amount of Prolific devices on the market, Prolific would not support many of them because they were not authentic Prolific chipsets.  We were not willing to put our reputation on the line if performance suffered because of a bad or “knockoff” adaptor.  I made the executive decision to standardize on FTDI.

The problem with “non-FTDI” adaptors is amplified, because our data stream is real time data ALL THE TIME. Even when no tags are detected, the reader sends an “empty packet” every 40ms to make certain the buffer is empty and the tag data is real-time. This empty packet also acts as a heartbeat. Other chipsets could not handle the data stream; we deemed them to be cheap, weak and inefficient. Sometimes, they were cheap knockoff copies of other chipsets.

The RJ45 Connector:
Depending upon how you terminate the reader, it has the ability to communicate via RS232 or RS485 via the RJ45 connector, so six terminations are possible out of 8 (see the drawing that was provided with kit). The RJ45 connector is the least expensive connector for providing 6, but up to 8 connections.  If we used a proprietary connector, the price would increase and Customers would be very unhappy that we “force” them to use our proprietary connectors.

The single biggest reason that standard Ethernet cables cannot be used is because such a configuration would connect RS232 AND RS485 at the same time and the reader would not detect the correct protocol for reliable communication.

The warning labels are because We’ve had Customers skip over reading the wiring diagrams as well as the manual and connect the reader directly to an Ethernet port or switch out of ignorance.  Other manufacturers place warning labels on clothes irons, cautioning the user not to iron their clothes *while on their body*.  I guess this is our version of that warning label, but if you ignore our warning, I assure you that you will not burn your flesh.

Thank you again for your business, we appreciate you.

Respectfully,

Peter Monahan
President