Quick Links

Assembling the JeeLabs LCD Plug

Assembled the JeeLabs LCD PlugToday I received my new items from JeeLabs – an LCD Plug and a set of stacking headers.

After soldering the control board to the LCD display,I tried compiling the lcd_demo.ino demo sketch. No luck – it seems that the code no longer compiled with Arduino 1.0.

I added the include-file that was missing:

#include <PortsLCD.h>

and suddenly… nothing happened.

JeeLabs LCD Plug 2 annotatedI verified the connections – everything looked good. Oh well – “if all else fails, read the manual”. There were no detailed assembly instructions for this kit, so I had to search through various posts to help debug the issue.

Turns out that you have to set two solder jumpers (Logic to 3v3, Backlight to 3v3) as well as short out a current limiting resistor (which is not actually present on the board). Click the annotated image on the left for a (blurry) close-up.

This still did not seem to solve the problem – the backlight worked, but still no text on the display. After adjusting the contrast level with the trimpot (near the read arrow in the image), the display finally sprang to life. I had to rotate it completely counter-clockwise.

The test assembly looks like this – battery holder on top, JeeNode in the middle, LCD Plug at the bottom of the image. The LCD Plug is connected to Port 1 on the JeeNode.

LCD Plug test assembly, running off a battery

Experimenting with the JeeLabs Room Node

JeeNode with Room Node attachedAfter many years I’ve re-discovered electronics as a hobby, thanks to the JeeLabs and Arduino communities.

I’m setting up a small electronics lab with some basic equipment like the Rigol DS1052E oscilloscope (approx. 300 Euros; I “upgraded” mine to the DS1102E firmware to increase the scope’s bandwidth to 100MHz).

One of my first projects is building a Wireless Sensor Network (WSN) to measure humidity, temperature, brightness and motion in several locations at home. The necessary hardware is depicted on the right.

I’ve added a simple resistor ladder network to one of the analog inputs, allowing me to measure battery voltage; these units are supposed to be powered from rechargable batteries for at least a year. Standby power consumption of these devices is in the micro-Amp range; much better than a standard Arduino. The JeeNode comes with an onboard RF12B wireless module (not visible in the picture; it’s below the PIR board) for communications.

While experimenting with the software, I wanted to take a closer look at the actual PIR sensor output signal. The Rigol oscilloscope has all kinds of handy features that assist in analysing and measuring these signals. It can store screenshots on a USB stick, or be remote controlled from a PC – excellent value for money!

Rigol DS1052E Screenshot of PIR sensor output, 570ms pulse widthRigol DS1052E Screenshot of PIR sensor output, with additional information
As you can see, the display is only 320 pixels wide (QVGA) but that is enough for my modest needs ;-)

I tried triggering the PIR as short as possible. The PIR open collector output is pulled low (negative edge) if motion is detected. The minimum output pulse width was approx. 570 milliseconds wide. If the sensor sees continuing motion, the output will remain low for that period (at least, in Continuous trigger mode).

The accompanying “sketch” (Arduino-talk for a program that you write) sends out packets at regular intervals (once per minute, or less), containing all the telemetry info. If motion is detected, an interrupt is generated that causes a packet to be sent out immediately.

I modified a receiver “sketch” to decode the telemetry info and generate a human-readable report:

ROOM-18 1695b 221* 1 38% 22.6C 4.638V 0
 -> ack-18
ROOM-25 1695b 21* 0 46% 19.6C 5.180V 0
ROOM-18 1695b 221* 1 38% 22.7C 4.638V 0
 -> ack-18
 ? 17 166 224 91 134 200 17 70 143 23 173 91 150 205 3 49 236 76 147 243 149
 ? 45 230 233 2 36 124 197 34 202 40 8 137 155 8 37 81 182 185 91 22 183
ROOM-18 1695b 221* 0 38% 22.7C 4.638V 0

Here, I have two JeeNodes (ID 18 and 25), each outfitted with a Room Board. The 433MHz band is crowded, so you’ll see spurious traffic (indicated by ‘?’). If a proper Room Node packet is recognized, it is decoded and displayed.

The report indicates the source of the transmission (ROOM-18 or ROOM-25); free RAM (1695 bytes); brightness (0-255); motion (0-1); humidity; temperature and battery voltage. The last “0″ is the Low Battery indicator.

Regular transmissions are not acknowledged; it’s no problem if you lose a couple of data points. If the PIR is triggered however, acknowledgements are requested to ensure that the central node registers this event.

I’m still working on the central node software; I’ll probably just parse the data and stick it in a RRD file or database…

Electronics + Software = hours of fun! ;-)

JeeNode with Room Board - configuration

JeeLabs offers a low-power, Arduino-compatible board called the “JeeNode“. These are ideally suited for building your own Wireless Sensor Network, for example in combination with the Room Board.

There are several ways to plug a Room Board into the JeeNode. The pictures below should help you verify the correct “Port” settings for each configuration:

 

Uninstalling the Silicon Labs CP210x USB to Serial driver

I use several types of USB to Serial converters on Mac OS X, mostly for playing with Jeenode / Arduino hardware or connecting my HAM radio devices.

One of these devices, a Kenwood TH-D72, has a built-in Silicon Labs CP210x chip. The Mac OS X driver supplied by Silicon Labs is not very stable; it has caused my Mac to crash several times already. Uninstalling this driver is not as easy as uninstalling other applications on Mac; normally, you just drag the app into the trash – done. However, these drivers are supplied in “pkg” (package) format. Uninstalling software packages is a bit more involved.

Open Terminal and type the following commands:

macbookpro-ed:/ ed$ pkgutil --pkgs |grep silabs
com.silabs.siliconLabsVcpDriver.SiLabsUSBDriver.pkg
com.silabs.siliconLabsVcpDriver.SiLabsUSBDriver64.pkg

macbookpro-ed:/ ed$ pkgutil --lsbom com.silabs.siliconLabsVcpDriver.SiLabsUSBDriver.pkg
.
./SiLabsUSBDriver.kext
./SiLabsUSBDriver.kext/Contents
./SiLabsUSBDriver.kext/Contents/Info.plist
./SiLabsUSBDriver.kext/Contents/MacOS
./SiLabsUSBDriver.kext/Contents/MacOS/SiLabsUSBDriver
./SiLabsUSBDriver.kext/Contents/Resources
./SiLabsUSBDriver.kext/Contents/Resources/English.lproj
./SiLabsUSBDriver.kext/Contents/Resources/English.lproj/InfoPlist.strings

macbookpro-ed:/ ed$ pkgutil --lsbom com.silabs.siliconLabsVcpDriver.SiLabsUSBDriver64.pkg
.
./SiLabsUSBDriver64.kext
./SiLabsUSBDriver64.kext/Contents
./SiLabsUSBDriver64.kext/Contents/Info.plist
./SiLabsUSBDriver64.kext/Contents/MacOS
./SiLabsUSBDriver64.kext/Contents/MacOS/SiLabsUSBDriver64
./SiLabsUSBDriver64.kext/Contents/Resources
./SiLabsUSBDriver64.kext/Contents/Resources/English.lproj
./SiLabsUSBDriver64.kext/Contents/Resources/English.lproj/InfoPlist.strings

The first command looks for all PKG receipts pertaining to the Silicon Labs drivers. The next commands list the contents (Bill of Materials) for each driver package. Uninstalling the drivers can now be accomplished in several ways:

Leave the PKG, but disable the drivers (safest, but least clean):

This method does not actually uninstall the drivers. Locate the driver kext (kernel extensions) and rename to disable them:

mdfind SiLabsUSBDriver.kext
cd /System/Library/Extensions/
sudo mv SiLabsUSBDriver.kext SiLabsUSBDriver.kext_DISABLED
sudo mv SiLabsUSBDriver64.kext SiLabsUSBDriver64.kext_DISABLED

Reboot to verify that the driver is actually disabled. For example, plug in the USB device and check Console.app for a corresponding error message indicating that no driver could be found:

2011-11-29 8:34:56.000 PM kernel: 0 0 AppleUSBCDC: start - initDevice failed

Remove all files listed in the PKG Bill of Materials (clean, but less safe):

mdfind SiLabsUSBDriver.kext
cd /System/Library/Extensions/
sudo rm -rf SiLabsUSBDriver.kext
sudo rm -rf SiLabsUSBDriver64.kext
sudo pkgutil --forget com.silabs.siliconLabsVcpDriver.SiLabsUSBDriver.pkg
sudo pkgutil --forget com.silabs.siliconLabsVcpDriver.SiLabsUSBDriver64.pkg

Reboot to verify that the drivers are now completely gone.

Steve Jobs 1955 - 2011

Steve Jobs 1955 - 2011
Earlier today, Steve Jobs passed away at only 56 years old. He’s had an incredible impact on the tech industry and touched millions of people. To me, his keynotes (“SteveNotes”) and his incredible attention to detail in all of Apple’s designs have been a huge inspiration.

XKCD paid him a fitting tribute:

Eternal Flame

“There’s always the hope that if you sit and watch for long enough,
the beachball will vanish and the thing it interrupted will return.”