Version 1.2 of the Pi4J Library is finally released!
The long overdue release of version 1.2 is finally here! It's been over two year since the 1.1 release and there have been about 136 new commits to the 1.2 release which include many enhancements, optimizations, bug fixes and additional platform support for Odroid, BananaPi, BananaPro, and OrangePi boards as well as adding support for the new RaspberryPi models introduced during this time..
Pi4J Version 1.2 is also available in Maven Central. <<View in Maven Central>>
Thank You to all the Pi4J users, contributors, testers, and tinkerers for all your help and support to continue making Pi4J the go-to library for Java access to the Raspberry Pi's hardware interfaces.
]]>Pi4J Related Links:
In this article, I am reviewing the new ModMyPi PiOT Relay Board.
After un-boxing the relay board, my first impressions are just .. Wow! You can tell immediately that somebody really put some thought into creating a sophisticated relay board for direct use with the Raspberry Pi.
Most relay boards I have worked with have been either cheap (both in cost and in quality) relay boards with the most primitive of options or relay boards that I have hand-built using relays, transistors, resistors, diodes, capacitors, etc. The nicest in terms of quality relay board I had prior to this board was the PiFace relay board. However, it is controlled via software and SPI communication rather than direct GPIO control. So it's a very different use case.
You can purchase the PiOT Relay Board directly from ModMyPi for about $34 USD plus shipping.
The ModMyPi PiOT Relay Board offers the following features:
There are a number of installation options for connecting to your Raspberry Pi. You can stack mount it on top of your Raspberry Pi like most shields and add-on boards. You can use a 40-pin male connector and ribbon cable to have a flexible connection between the relay board and the Raspberry Pi. Or if you have a Pi Zero you can surface mount the PiZero on top of the relay board. The PiOT Relay Board Wiki has a page that demonstrates each option. Some options may require additional parts, so you may want to consider how you will want to mount or connect the relay board to your Raspberry Pi before placing your order.
https://github.com/modmypi/PiOT-Relay-Board/wiki/Installation
For my testing, I chose to insert a 40-pin male header on the top side of the relay board and use a ribbon cable to attach to my Raspberry Pi.
In order to control each of the four relays you must first access the configuration menu on the relay board and configure the pin numbering scheme.
See the the following link for details on how to access the configuration menu:
https://github.com/modmypi/PiOT-Relay-Board/wiki/Menu---Access
A detailed explanation of the pin numbering schemes and a pin mapping diagram is included in the next section of this article.
After configuring the preferred pin numbering scheme, you can then following the instructions linked below to set/assign/select the GPIO pin to control each each relay:
https://github.com/modmypi/PiOT-Relay-Board/wiki/Basics
The ModMyPi PiOT Relay Board supports a soft (software-based) mapping between each of the four relays and GPIO pins on the Raspberry Pi. The relay board allows you to configure this mapping using one of two pin numbering schemes. Instructions for configuring your relay boards pin numbering scheme can be found here: https://github.com/modmypi/PiOT-Relay-Board/wiki/Menu---Io---Pin-Numbering
You can use the diagram below to help map the pin numbering scheme you choose to the actual GPIO pins on your Raspberry Pi. This pin mapping diagrams includes both of the supported pin numbering schemes supported by the ModMyPi PiOT Relay Board as well as the WiringPi/Pi4J pin numbers in case you are using the WiringPi/Pi4J pin numbering scheme in your software. (You can click the image to download a high resolution copy of the diagram.)
There is an excellent and easy to follow set of instructions available for the ModMyPi PiOT Relay Board located on GitHub:
https://github.com/modmypi/PiOT-Relay-Board/wiki
Sample Python code is also available to help get started with your relay board.
https://github.com/modmypi/PiOT-Relay-Board
I did not use the sample code, instead I tested the board using the command line commands in the following "Testing" section of this article.
After you have configured the pin numbering scheme and have set the GPIO pin assignments for each relay you are ready to test controlling the relay by toggling the GPIO pin states between HI and LOW. You can use the example Python program included in the PiOT Relay Wiki or you can simply use the following "gpio" command line instructions to test.
Export the GPIO Pin
The first thing we must do is export the GPIO pin as an output pin. To do this via the gpio utility, you must to use the BCM GPIO number. So lets use the GPIO #2 (Header Pin #3, WiringPi Pin #8) in our example.
> sudo gpio export 2 out
Control Relay in "GP" (GPIO) Pin Numbering Mode
Now we can control the GPIO assigned relay using the following commands:
Turn the relay ON; do do this we need to set GPIO#2 to the HIGH (1) state.
> sudo gpio -g write 2 1
Turn the relay OFF; do do this we need to set GPIO#2 to the LOW (0) state.
> sudo gpio -g write 2 0
(Note, the "-g" argument used with the gpio utility instructs the gpio utility to use the BCM pin numbering scheme. Without this argument, the gpio utility would attempt to use the WiringPi pin numbering scheme by default.)
Control Relay in "PN" (Header) Pin Numbering Mode
Now we can control the GPIO assigned relay using the following commands:
Turn the relay ON; do do this we need to set GPIO on header pin #3 to the HIGH (1) state.
> sudo gpio -1 write 3 1
Turn the relay OFF; do do this we need to set GPIO on header pin #3 to the LOW (0) state.
> sudo gpio -1 write 3 0
(Note, the "-1" argument used with the gpio utility instructs the gpio utility to use the header pin numbering scheme. Without this argument, the gpio utility would attempt to use the WiringPi pin numbering scheme by default.)
Here are some of my thoughts as a wish list for a future version/revision of the product :-)
I wish ... that there was a way to lock down the configuration of pin assignments once you have them configured just how you want them. It's a bit too easy to accidentally re-map a pin when fumbling with the buttons.
I wish ... that pin assignment/configuration put the board into a mode where it would not toggle the configured relay state until the assignment was complete. Currently as you cycle thru the pin numbers the relay toggles immediately based on the GPIO pin state of the pin number you are cycling through.
I wish ... there was a method via software to configure pin assignments. This way a booting application could ensure the proper pin mapping for it's needs. This would make the board highly reusable across multiple projects without manual interaction to assign pins. This would especially be helpful for users who potentially just download some software application to run on their system and may not be as geeky to understand or configure relay pin assignments.
I wish ... there were 4 opto-isolated inputs on the board. The relays do a great job for outputs but often your project needs both inputs and outputs. I realize this may be an increased cost and perhaps a different SKU at a higher price point.
In closing, I just have to say this is a very nice board and a nice prototyping tool to have on hand when building a project that requires relay control via GPIO. Sure its a bit more expensive than a cheap Chinese relay board, but as with most things in life .. you get what you pay for.
I think this board is very well suited as a prototyping tool for a professional developer and also a perfect tool for for hobbyists wanting to use their Raspberry Pi's to control things and are not well versed in concepts like active-hi, active-low, coil suppression, level-shifting, etc. when interfacing to relay boards.
The design and features of the ModMyPi PiOT Relay Board are very well thought out and offer unprecedented flexibility for relay-based projects using a Raspberry Pi. The features I like most are the optional boot up modes, the soft-mapping of GPIO pins, the direct test button control and the friction connector allowing surface or bottom mount connections. I can certainly see projects where just this board and a Pi Zero together comprise an elegant and compact solution for things like remote or expanded sprinkler zone controllers and other home automation projects.
]]>Disclaimer:
This relay board was provided to me at no cost for an honest and unbiased review.
The Pibrella add-on board serves as a simple and easy platform to get started with and learn about inputs and outputs on your Raspberry Pi.
Pibrella is an excellent development tool for both hobbyist and students to learn about programmatic interfacing with inputs and outputs to monitor and control things in the real world.
For beginners, three LED lights and a momentary button are provided directly on the board so you can get started playing with the input signals for the momentary button and output signals for controlling the LED lights without having to wire any circuits yourself.
One you are ready to sense (inputs) or control (outputs) other external devices you can use the 4 generic inputs and 4 generic outputs at the bottom of the Pibrella board via the 2 8-pin header connectors. (Note, breadboard/prototyping jump wires fit perfectly into these header blocks.)
<<< BUY PIBRELLA ON AMAZON $22.99 with Prime Shipping >>>
More details and instructions for getting started can be found at: http://pibrella.com/
The Pibrella documentation primarily includes information about programming the Pibrella using Python. However, we at Pi4J recognizing the Pibrella device as an excellent tool for beginners did not want to leave Java programmers out of the party. So, we have added native support for the Pibrella board directly into Pi4J.
The Pibrella devices interfaces can be found here:
https://github.com/Pi4J/pi4j/tree/develop/pi4j-device/src/main/java/com/pi4j/device/pibrella
An example program demonstrating the usage of the Pibrella device interface can be found here:
https://github.com/Pi4J/pi4j/blob/develop/pi4j-example/src/main/java/PiBrellaExample.java
Below is a sample program to help you get started using the Pibrella board in your Java program.
<<< BUY PIBRELLA ON AMAZON $22.99 with Prime Shipping >>>
Thanks to all that attended yesterday's #Devoxx "Let's Get Physical" talk on #Raspberry_Pi & #Pi4J #java #iot #raspi pic.twitter.com/3dyngd6jKY
— Robert Savage (@savageautomate) November 13, 2014
Thanks to all that attended today's #Devoxx talk on #Java 8 #Raspberry_Pi & #Pi4J with @steveonjava @JavaFXpert & me. pic.twitter.com/mbz5dH11vW
— Robert Savage (@savageautomate) November 11, 2014
Come join the Pi4J talks at Devoxx Belgium 2014.
Pi4J is featured in the following sessions:
Let's Get Physical: I/O Programming with Java on the Raspberry Pi using Pi4J
CONFERENCE SESSION
Wednesday at 14:00 - 15:00 @ ROOM 4
- Robert Savage (@savageautomate)
Raspberry Pi with Java 8
UNIVERSITY SESSION
Tuesday at 13:30 - 16:30 @ ROOM 9
- Stephen Chin (@SteveOnJava)
- James Weaver (@JavaFXpert)
- Robert Savage (@savageautomate)
http://cfp.devoxx.be/2014/talk/IWS-5192/Raspberry_Pi_with_Java_8
While this is certainly far from the first article on how-to power your Raspberry Pi via POE (Power-Over-Ethernet), I thought I would go ahead and document my setup and the equipment I ordered to pull this off successfully.
First, lets be clear -- I am using a real POE switch -- so I wanted a real POE solution for the Raspberry Pi, not one of those splitter cable solutions that simply supply a fixed power voltage over the unused pairs in a CAT5/6 ethernet cable. There is nothing wrong with that type of solution ... its pretty cost effective, but its not real POE per the IEEE 802.3af (POE) or IEEE 802.3at (POE+) specifications.
So to pull this off, we need a POE splitter that can provide the required 5 VDC voltage and an adapter micro USB cable to plug into the Raspberry Pi's power port. (And a short ethernet cable which you may already have laying around the house.)
The following items are included in this article:
You need a POE splitter than can output 5 VDC. I chose the TRENDnet Gigabit Power over Ethernet (PoE) splitter as it has a nice little selector switch where you can select between 5, 7.5, 9, and 12 VDC. You don't really need the Gigabit capability for the Raspberry Pi since it only supports 10/100 Mbps and TRENDnet does make a 10/100 POE splitter model that costs a little less. I purchased the Gigabit model thinking about other future projects I have in mind and wanted the additional speed.
I also (later) purchased the TP-LINK TL-POE10R Gigabit PoE Splitter Adapter adapter which was less expensive and as a bonus included a short CAT-5 ethernet cable. On the down-side it doesn't have the discrete LEDs specifically identifying which output voltage is selected, but that is a minor trade-off for the reduced cost.
Since the POE splitter uses a barrel connector and the Raspberry Pi is powered using a micro USB connector, you will need an adapter cable to connect the POE splitter to your Raspberry Pi. At first I was going to make my own cable from spare cables lying around the house, but then I found this pre-made adapter cable on Amazon that fits perfectly. (Why reinvent the wheel .. Right?)
It's available in a short and long lengths:
Note: If you would like to purchase multiple quantities of this adapter cable you can order direct from Sean Kelley at Innovative Electronic Solutions and save on combined shipping.
http://www.innovativeelectronicsolutions.com/
At this point your Raspberry Pi should be powered up and working. There is not really much else to say. Enjoy your POE powered Raspberry Pi :-)
For anyone that may have missed it, check out this article in May/June issue of Java Magazine featuring me and the Pi4J project.
http://www.oraclejavamagazine-digital.com/javamagazine_open/20140506/?pg=18&pm=1&u1=friend
Look inside > | |
PI4J PROJECT |
In the previous article Raspberry Pi - Installing a RS232 Serial Port we discussed how to install a RS232 port on the Raspberry Pi (model A, B, B+). This is a follow up article provides the same information for connecting a RS232 serial cable to the new Raspberry Pi Compute Module Development board..
There are two primary RS232 interface options you can choose from for serial connectivity:
Once you have a serial interface connected you can use the serial port for
(Click one of the above options to jump to that part of the article.)
The following items are included in this article:
If you are just looking to communicate to your Raspberry Pi via its serial UART, then you may prefer a USB interface. Most recent models of computers and laptops do not have the traditional RS232 DB9 port anymore, so connecting using a USB port may be preferred.
The following adapter is only $5.47 USD and it provides a USB to serial converter chip:
This adapter is based on the Prolific PL2303HX chipset. To use this USB to serial interface you will have to install a USB serial port driver on your host operating system. Many operating systems already include support for the prolific drivers. But in case you need it, the drivers can be found here: http://prolificusa.com/portfolio/pl2303hx-rev-d-usb-to-serial-bridge-controller/
Below is a wiring diagram illustrating how to connect the USB to serial interface to the RaspberryPi Compute Module development board:
Photos of the connected USB to Serial interface (click to enlarge):
NOTE: Please secure the RED lead from the USB adapter so that it does not come into contact with any of the other pins or components on the Raspberry Pi. This RED pin carries +5VDC and could damage the Pi if it makes contact.
Now that you have the serial interface connected, you can skip down to the Serial Console section to test the interface.
For certain applications and especially projects involving interfacing with other hardware devices a standard RS232 serial device with a DB9 connector is preferred. A standard serial port such as this does not require any drivers. RS232 serial communication is standardized at the hardware layer. RS232 communication can also achieve longer distance runs (maximum distance depends on baud rate).
The following interface adapter is available for $4.50 USD:
In addition to the adapter, you will need at least 4 female to female jumper wires.
Here are a couple of purchase options:
Why is special circuitry (level shifter) needed for RS232 serial communication?
So .. what is a level shifter and why is it needed you ask. A level shifter is a circuit that can take the low voltage (±3.3VDC) TTL signals for serial transmit (TX) and receive (RX) from the UART on the Pi and shift them to ±5VDC the voltage signals required for RS232 standard communication. Want to know more? Click here.
Below is a wiring diagram illustrating how to connect the level shifter serial interface:
Now that you have the serial interface connected, you can skip down to the Serial Console section to test the interface.
(Use a straight-thru cable for connecting to a computer.)
The Debian/Raspbian distribution images include support out-of-the-box for accessing the shell console via the hardware serial port. This can be extremely convenient if you need to access your Raspberry Pi Compute Module when it is not connected to a monitor and network remote access is not available.
Open a terminal emulation software such as Hyperterminal (Windows), Procom Plus (Windows), Indigo Terminal Emulator (Windows), minicom (Linux/OSX) or screen (Linux/OSX) and connect to the serial port using settings "115200, N, 8, 1". You may need to press the enter key a time or two to see the prompt. Authenticate using your credentials and you are good to go.
Here is a screenshot of the terminal displaying the boot up information and then prompting for a login:
If you intend to use the serial port for a software application running on the Raspberry Pi, there is a bit of configuration required to disable the console from using this port. By default, the serial port is configured as a console port for interacting with the Linux OS shell. The following steps will guide you through disabling the port from console access.
First, lets make of backup of the two files that we intend to modify.
sudo cp /boot/cmdline.txt /boot/cmdline.bak
sudo cp /etc/inittab /etc/inittab.bak
Next, we need to remove the "console=ttyAMA0,115200" and "kgdboc=ttyAMA0,115200" configuration parameters from the "/boot/cmdline.txt" configuration file.
To edit the file use this command:
sudo nano /boot/cmdline.txt
The file probably contains this default configuration line:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200
console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
After removing the two configuration parameters, it will look similar to this:
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4
elevator=deadline rootwait
The last step is to edit the "/etc/inittab" file and comment out the use of the "ttyAMA0" serial port. To edit the file use this command:
sudo nano /etc/inittab
Now towards the bottom of the file, look for a configuration line that includes the "ttyAMA0" port address.
Place a pound sign ("#") in front of the line to comment it out. With a pound sign ("#") at the beginning of the line, Linux will ignore this configuration line.
Save the "/etc/inittab" file and then issue this command to reboot the Raspberry Pi:
sudo reboot
Now you are ready to use the serial port with a software application and the operating system won't interfere with the port. Use the device address "ttyAMA0" in your application to access this serial port.
]]>If are interested in using the serial port with Java programming, please see this page: http://pi4j.com/example/serial.html
The overflow drainage lines are typically designed to drain in a place where they will be noticed by the homeowner. Commonly this emergency drain is located in either above bath/shower location (common for apartments/townhouses) or outside back porch. The intent is to draw attention to the problem. Unfortunately many homeowners are not aware that seeing water drain from these locations represents an underlying problem that needs immediate attention.
Homeowners are also instructed to routinely clean the primary and overflow drain lines using a bleach/water mix. But in reality your average homeowner is not performing this maintenance.
So there has to be a better way ... right? I want a more proactive means of getting notified in the event of a leak/drainage problem. In case I am not present to address the issue, I want the system to shutdown to prevent any damage until the issue is corrected. I want a "smarter" solution than the passive overflow drain which is not a fool-proof solution.
So after a bit a research (that is what I like to call shopping on Amazon and reading product reviews) I found a variety of solutions. Some involved modifications to the drain lines and others were simply alarms to help draw attention to the problem, but most of them didn't do anything to stop potential flooding. However the solution that I found that best suited by needs, goals and budget was the:
Diversitech® WS-1 - Wet Switch Flood Detector
The Diversitech® WS-1 - Wet Switch Flood Detector is placed directly in the overflow pan and upon water detection it shuts down the HVAC system. This is a simple solution that can be easily installed into any existing system without further modification. This solution proactively shuts down the HVAC system to prevent continued water spillage into the overflow pan. When you notice that your HVAC system is no longer cooling, you can inspect the The Diversitech® WS-1 - Wet Switch Flood Detector and overflow pan to see if there is a problem with your AC system.
Apart from simply noticing that the HVAC system is not cooling , the Diversitech® WS-1 - Wet Switch Flood Detector also includes additional wiring leads that can be connected to you central alarm system or other device for alert notifications. You can optionally purchase the Diversitech Universal Alarm UA-1 accessory which can be connected to provide an audible alarm. (I have mine connected to my Ecobee HVAC thermostat system for alert notifications --- I'll be posting a follow-up article detailing that installation.)
The Diversitech® WS-1 - Wet Switch Flood Detector comes with wiring nuts, instructions, and a warning label to affix to the HVAC unit.
The installation instructions provided with the Diversitech® WS-1 - Wet Switch Flood Detector are provided below. (You can also download a PDF file including these instructions here.)
Installing the Diversitech® WS-1 - Wet Switch Flood Detector is actually pretty simple. If you have basic electrical skills or have ever replaced a thermostat then installing the Diversitech® WS-1 - Wet Switch Flood Detector will be a snap. If you are not comfortable installing this on your own, any HVAC professional should be able to install and fully test the wetswitch in under an hour.
Once the installation is complete, make sure to place the wetswitch in your overflow pan. You should place it close to the drain pipe as the drain pan may be contoured or leveled to force overflow water to flow towards the drain pipe.
You should test your wetswitch by placing it in a small container of water to make sure the wetswitch trips properly and shuts down the HVAC system. The wetswitch should have the green LED illuminated before you place it in the water. After placing it in water, the wetswitch should illuminate the red LED indicating a TRIPPED condition. While tripped, the HVAC system should remain off. If wired as described above, the wetswitch opens (disconnects) the common lead to the thermostat, thus powering off the thermostat which in turn should power off the HVAC fan and condender/compressor. (You can alternatively wire your system to only disable the compressor if you prefer to keep the thermostat and blower fan working during a tripped condition.)
Note: You can also use the TEST button on the wetswitch; however, I prefer a real world test with water.
You can press the RESET button to reset the wetswitch. Please note that the wetswitch must dry out before the RESET will work. This could take in excess of an hour to dry out.
Here is a short video demonstrating a test of the Diversitech® WS-1 - Wet Switch Flood Detector.
Below is a video from the manufacturer:
]]>
My Raspberry Pi just got a whole lot *sweeter*.
While attending JavaOne this year, Oracle announced that the Raspberry Pi foundation would soon start shipping the Oracle JDK/JVM (Java) baked into the Raspbian distribution.
Here was the official announcement on raspberrypi.org:
http://www.raspberrypi.org/archives/4920
And a day later new images were posted for download that include Oracle Java SE fully "baked in".
http://www.raspberrypi.org/archives/4959
You can download the latest Raspian image that includes Oracle Java SE 7 here:
http://www.raspberrypi.org/downloads
Here is a slide (photo) from the JavaOne Community Keynote where this was announced.
Its a real treat to flash and boot up a fresh Raspberry Pi (Raspbian) image and Java be there without requiring additional steps to install it.
]]>Java SE 8 - Developer Preview
If you prefer to install the JDK8 developer preview/early access version, please see this page:
Install Oracle Java SE8 (Milestone 8) Developer Preview (JDK)
Thank You JavaOne attendees for joining my session today on I/O programming with Java using Pi4J on the Raspberry Pi. Thank You Oracle for accepting my talk and providing the opportunity to for me to spead the embedded/IOT message.
I do plan on posting additional in-depth articles to this blog that cover how I built the demo system and the access control solution. In the meantime, I have posted a couple of photos from the session as well as the slides and links to the source code below.
All of the source code examples used in the presentation can be found here on GitHub:
https://github.com/savagehomeautomation/pi4j-javaone-demos
Here is a recent interview with Steven Chin (steveonjava) on the NightHacking Tour for my upcoming JavaOne session.
]]>
Session: CON7968 - Let’s Get Physical: I/O Programming with Java on the Raspberry Pi with Pi4J
When: Wednesday, Sep 25, 11:30 AM - 12:30 PM
Where: Hotel Nikko - Monterey I/II
We will be reviewing into the fundamentals of programming with Pi4J and jumping into some real world demos of how you can use Pi4J and the Raspberry Pi platform to automate things in your life!
Session: CON7968 - Let’s Get Physical: I/O Programming with Java on the Raspberry Pi with Pi4J
When: Wednesday, Sep 25, 11:30 AM - 12:30 PM
Where: Hotel Nikko - Monterey I/II
Abstract:
]]>
The Oracle JDK8 Developer Preview (Milestone 8) for ARM v6/7 (hard-float ABI) is now available!
This release represents a feature complete and Oracle tested version of the JDK.
Please see Mark Reinhold's blog post for more details: http://mreinhold.org/blog/jdk8-preview
This article will provide the necessary instructions on how to install the Oracle Java Development Kit 8 (JDK8) on your Raspberry Pi.
All:
Windows:
Mac-OSX:
You can download the JDK 8 Developer Preview on this page:
https://jdk8.java.net/download.html
Select the Linux ARMv6/7 VFP, HardFP ABI distribution (jdk-8-ea-b106-linux-arm-vfp-hflt-04_sep_2013.tar.gz).
After downloading the Oracle JDK to you desktop computer, we need to transfer it over to the Raspberry Pi. We will use SCP to transfer the file over the network. If you are running on a Windows desktop, then download and install WinSCP.
If you are using Mac OSX, you can download and install Cyberduck. The screens will look different but the goals are the same.
Create a new session in WinSCP using the IP address of you Raspberry Pi. The default authentication credentials for the Raspbian Wheezy image is username "pi" and password "raspberry". Save the session and then login. You may be prompted to accept the SSH fingerprint, choose "Yes" to accept and continue.
After successfully establishing a connection, select the drive and folder location in the left pane where you download the Oracle JDK file to on your local desktop system. In the right pane is the file system on the Raspberry Pi, we will leave it in it's default location in the "pi" user's home directory. Drag and drop the Oracle JDK file from the left pane to the right pane and WinSCP will start the file transfer process. You will be prompted with a transfer dialog, just click the "Copy" button to start the transfer.
When the file transfer is complete, you can close WinSCP (or CyberDuck).
The remaining steps should be performed directly on the console of the Raspberry Pi or using a SSH terminal connection with shell access. In the last step, we transfered the Oracle JDK file to the "pi" user's home directory. We should be logged in as the "pi" user and already in the user's home directory.
Lets create a new directory where we will install the JDK files to.
sudo mkdir -p -v /opt/java
Next, lets unpack the Oracle JDK .gz file using this command:
sudo tar xvzf ~/jdk-8-ea-b106-linux-arm-vfp-hflt-04_sep_2013.tar.gz -C /opt/java
The unpacking process will take a few seconds to complete. It unpacks all the contents of the Oracle JDK gz file to a new directory named "jdk1.8.0" located in the "/opt/java" directory.
We can now delete the original .gz file as it is no longer needed
rm ~/jdk-8-ea-b106-linux-arm-vfp-hflt-04_sep_2013.tar.gz
To complete the JDK installation we need to let the system know there is a new JVM installed and where it is located. Use the following command to perform this task.
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.8.0/bin/java" 1
And finally we also need to tell the system that we want this JDK to be the default Java runtime for the system. The following command will perform this action.
sudo update-alternatives --set java /opt/java/jdk1.8.0/bin/java
Now java is installed. To test and verify we can execute the java command using the version argument.
java -version
You should get the following response:
That's it the Oracle JDK is installed and ready for use.
Some Java programs require a JAVA_HOME environment variable to be configured on the system. Add the following line to you "/etc/environment" using your favorite text editor.
JAVA_HOME="/opt/java/jdk1.8.0"
Also, edit your "~/.bashrc" file using this command
nano ~/.bashrc
and add the following two lines to the bottom of the file and save.
export JAVA_HOME="/opt/java/jdk1.8.0"
export PATH=$PATH:$JAVA_HOME/bin
Reboot or re-login to apply the export to your environment.
* Raspberry Pi is a trademark of the Raspberry Pi foundation.
* Oracle and Java are registered trademarks of Oracle.
]]>
If you prefer to install the JDK7 release version, please see this page:
Install Oracle Java 7 SE Development Kit (JDK)
The Oracle Java SE 7 JDK/JRE now comes pre-installed in Raspbian images!
See this post for more details: Oracle JDK/JVM Now Pre-Installed on Raspbian
The Oracle JDK7 for ARM v6/7 (hard-float ABI) is now available! This article will provide the necessary instructions on how to install the Oracle Java Development Kit (JDK) on your Raspberry Pi.
All:
Windows:
Mac-OSX:
You can download the Oracle Java SE Development Kit 7u40 on this page:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
First, select JDK Download button under JDK SE 7, then select the Linux ARM v6/v7 VFP Hard Float AB distribution (jdk-7u40-linux-arm-vfp-hflt.tar.gz).
After downloading the Oracle JDK to you desktop computer, we need to transfer it over to the Raspberry Pi. We will use SCP to transfer the file over the network. If you are running on a Windows desktop, then download and install WinSCP.
If you are using Mac OSX, you can download and install Cyberduck. The screens will look different but the goals are the same.
Create a new session in WinSCP using the IP address of you Raspberry Pi. The default authentication credentials for the Raspbian Wheezy image is username "pi" and password "raspberry". Save the session and then login. You may be prompted to accept the SSH fingerprint, choose "Yes" to accept and continue.
After successfully establishing a connection, select the drive and folder location in the left pane where you download the Oracle JDK file to on your local desktop system. In the right pane is the file system on the Raspberry Pi, we will leave it in it's default location in the "pi" user's home directory. Drag and drop the Oracle JDK file from the left pane to the right pane and WinSCP will start the file transfer process. You will be prompted with a transfer dialog, just click the "Copy" button to start the transfer.
When the file transfer is complete, you can close WinSCP (or CyberDuck).
The remaining steps should be performed directly on the console of the Raspberry Pi or using a SSH terminal connection with shell access. In the last step, we transfered the Oracle JDK file to the "pi" user's home directory. We should be logged in as the "pi" user and already in the user's home directory.
Lets create a new directory where we will install the JDK files to.
sudo mkdir -p -v /opt/java
Next, lets unpack the Oracle JDK .gz file using this command:
sudo tar xvzf ~/jdk-7u40-linux-arm-vfp-hflt.gz -C /opt/java
The unpacking process will take a few seconds to complete. It unpacks all the contents of the Oracle JDK gz file to a new directory named "jdk1.7.0_40" located in the "/opt/java" directory.
We can now delete the original .gz file as it is no longer needed
rm ~/jdk-7u40-linux-arm-vfp-hflt.gz
To complete the JDK installation we need to let the system know there is a new JVM installed and where it is located. Use the following command to perform this task.
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.7.0_40/bin/java" 1
And finally we also need to tell the system that we want this JDK to be the default Java runtime for the system. The following command will perform this action.
sudo update-alternatives --set java /opt/java/jdk1.7.0_40/bin/java
Now java is installed. To test and verify we can execute the java command using the version argument.
java -version
You should get the following response:
That's it the Oracle JDK is installed and ready for use.
Some Java programs require a JAVA_HOME environment variable to be configured on the system. Add the following line to you "/etc/environment" using your favorite text editor.
JAVA_HOME="/opt/java/jdk1.7.0_40"
Also, edit your "~/.bashrc" file using this command
nano ~/.bashrc
and add the following two lines to the bottom of the file and save.
export JAVA_HOME="/opt/java/jdk1.7.0_40"
export PATH=$PATH:$JAVA_HOME/bin
Reboot or re-login to apply the export to your environment.
* Raspberry Pi is a trademark of the Raspberry Pi foundation.
* Oracle and Java are registered trademarks of Oracle.
]]>
If you prefer to install the JDK8 developer preview/early access version, please see this page:
Install Oracle Java SE8 (Milestone 8) Developer Preview (JDK)
The stepper motor is controlled by pulsing the GPIO pins from LOW to HIGH states in a sequence that causes the motor to spin. Each time a GPIO pin state is HIGH an electromagnet is engaged inside the stepper motor to cause a rotational force on the center rotor. With the proper sequence and timing you achieve motor rotation.
Here is a fantastic article with photos and illustrations to help learn more about stepper motors and stepping techniquest:
http://www.lirtex.com/robotics/stepper-motor-controller-circuit/
Below are photos of the assembled board and attached stepper motor.
This breakout board includes two ports for controlling two separate stepper motors.
You can purchase an additional stepper motor to use on the second port here:
The two stepper motor controllers are mapped to GPIO pins on the Raspberry Pi's P1 header as depicted in the diagram below. The GPIO numbering in the diagrams below is based on the WiringPi / Pi4J numbering scheme. See below for a mapping chart for other numbering schemes.
Below is a cross reference chart to better help define the GPIO pin numbers used under the various pin numbering schemes.
A jumper is provided on the board to supply 5 VDC to the stepper motors directly from the 5 VDC output from the Raspberry Pi. If you would prefer to provide 5 VDC from an external power supply, please remove the jumper from JP1 and connect your power source to JP1 pins 2 and 3. See the diagrams below.
Make sure that you place the jumper between pins 1 and 2.
ATTENTION !
Never attach JP1 pins 1 and 3 together as this will cause a direct short on the 5 VDC power line from the Raspberry Pi. This would likely render the Pi defective.
Below is a sample Java program for controlling the stepper motor. The Pi4J project now includes a new stepper motor interface and component implementation for GPIO based stepper motors. This makes it really simple to control a stepper motor from Java. (Note that the stepper motor implementation is available in 0.0.5 and later versions of Pi4J.)
The source for this example is provided with the Pi4J installation package and can also be found on Github:
This was my first time working with a stepper motor and having this kit certainly made it much easier to understand and get started. For me the timing was the trickiest thing to get right. Fortunately with a little trial and error I was able to get it working. Here is a quick video demonstrating the final working project.
Happy New Year!
The Airlink 101 Wireless N 150 Ultra Mini-USB Adapter is another low-cost wireless network adapter for use with the Raspberry Pi. Here is what this little adapter has going for it:
(Click photo to enlarge.)
(Click image to enlarge.)
The latest Raspian distribution (Raspbian “wheezy” 2012-12-16) already includes the drivers for this adapter pre-installed. This greatly simplifies the installation. (If you are using a different distribution or an older distribution you may have to install the Linux driver for the Realtek RTL8192CU driver.)
Insert the Airlink 101 USB adapter into your Raspberry Pi's USB port. Next, lets make sure that the Raspberry Pi recognizes the device. Use the following command to verify that the Pi "sees" the Airlink 101 WiFi adapter.
lsusb
You should see the RealTek RTL8188CUS 802.11n WLAN Adapter device listed in the output. This is the chipset used by the Airlink 101 adapter.
Now that we have verified that the Airlink 101 adapter is recognized, lets check to make sure the kernel driver is loaded. Use the following command to list the kernel modules:
lsmod
You should see the "8192cu" kernel module loaded. If not, try removing and re-inserting the Airlink 101 USB adapter.
As a final validation check to make sure that the Airlink 101 adapter is ready to use, send the "iwconfig" command to display a listing of the current wireless network configuration.
iwconfig
We are just looking to ensure that the "wlan0" adapter is present.
Now we are ready to move on to the configuration steps.
One you have installed the adapter, verified the kernel driver is loaded, and confirmed that a wireless network interface ("wlan0") is available, you will need to configure the wireless connection settings to securely connect to your wireless network.
First, let's open the network interfaces configuration file for editing using the following command:
sudo nano /etc/network/interfaces
Make sure the following lines are added to (or un-commented in) your file
auto wlan0 allow-hotplug wlan0
iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
After modifying the network interface configuration file, we need to create the wireless configuration file. Use the following command to create (or edit) this file.
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Add the following data to this wireless configuration file. (Replace the "_SSID_" and "_WPA_SHARED_KEY_" text with your actual SSID and WPA key values.)
network={ ssid="_SSID_" proto=RSN key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP psk="_WPA_SHARED_KEY_" }
(Note: This configuration is intended for WPA protected wireless networks.)
Once the configuration files are complete, use the following command to restart the wireless adapter / interface.
sudo ifup wlan0
This command will restart the network interface and use the newly defined interface and wireless settings to establish a wireless network connection. Assuming the configuration is correct, the wlan0 interface should connect and acquire an IP address.
For connection verification and an alternate way to see your assigned IP address, use the following command to list the network configuration:
ifconfig wlan0
If you have any trouble getting connected using the "ifup" command, verify your wireless connection settings and reboot your Raspberry Pi. If you have the Raspberry Pi connected to a display you can watch the Pi attempt the connection during startup.
That's it, hopefully you now have a WiFiPi.
* Raspberry Pi is a trademark of the Raspberry Pi foundation.
Also check out the installation instructions for installing and configuring the
]]>The following article is an excellent resource describing many different wireless network configurations for Debian based distributions:
I picked up a new Raspberry Pi case a few days ago from Amazon and was impressed so much that I decided to write this review article.
PROS
CONS
I really do like this case overall and think it is my personal favorite so far. It is very compact and will make an excellent travel case for my Pi on the go.
You can purchase this case via the link below directly on Amazon:
Here are additional photos. Click any of the images to enlarge hi-resolution photo.
]]>
The Oracle JDK8 for ARM with support for hard-float ABI is now available as a developer preview edition! This article will provide the necessary instructions on how to install the Oracle Java SE 8 (with JavaFX) Developer Preview for ARM on your Raspberry Pi.
All:
Windows:
Mac-OSX:
You can download the Oracle Java SE 8 (with JavaFX) Developer Preview for ARM on this page:
http://jdk8.java.net/fxarmpreview/
After downloading the Oracle JDK to you desktop computer, we need to transfer it over to the Raspberry Pi. We will use SCP to transfer the file over the network. If you are running on a Windows desktop, then download and install WinSCP.
If you are using Mac OSX, you can download and install Cyberduck. The screens will look different but the goals are the same.
Create a new session in WinSCP using the IP address of you Raspberry Pi. The default authentication credentials for the Debian Squeeze image is username "pi" and password "raspberry". Save the session and then login. You may be prompted to accept the SSH fingerprint, choose "Yes" to accept and continue.
After successfully establishing a connection, select the drive and folder location in the left pane where you download the Oracle JDK file to on your local desktop system. In the right pane is the file system on the Raspberry Pi, we will leave it in it's default location in the "pi" user's home directory. Drag and drop the Oracle JDK file from the left pane to the right pane and WinSCP will start the file transfer process. You will be prompted with a transfer dialog, just click the "Copy" button to start the transfer.
When the file transfer is complete, you can close WinSCP (or CyberDuck).
The remaining steps should be performed directly on the console of the Raspberry Pi or using a SSH terminal connection with shell access. In the last step, we transfered the Oracle JDK file to the "pi" user's home directory. We should be logged in as the "pi" user and already in the user's home directory.
Lets create a new directory where we will install the JDK files to.
sudo mkdir -p -v /opt/java
Next, lets unpack the Oracle JDK .gz file using this command
tar xvzf ~/jdk-8-ea-b36e-linux-arm-hflt-29_nov_2012.tar.gz
The unpacking process will take a few seconds to complete. It unpacks all the contents of the Oracle JDK tz file to a new directory named "jdk1.8.0" located in the user's home directory.
With the unpack complete its now time to move the new unpacked directory to the Java install location that we created earlier under "opt/java".
sudo mv -v ~/jdk1.8.0 /opt/java
We can also delete the original .gz file as it is no longer needed
rm ~/jdk-8-ea-b36e-linux-arm-hflt-29_nov_2012.tar.gz
To complete the JDK installation we need to let the system know there is a new JVM installed and where it is located. Use the following command to perform this task.
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.8.0/bin/java" 1
And finally we also need to tell the system that we want this JDK to be the default Java runtime for the system. The following command will perform this action.
sudo update-alternatives --set java /opt/java/jdk1.8.0/bin/java
Now java is installed. To test and verify we can execute the java command using the version argument.
java -version
You should get the following response:
That's it the Oracle JDK is installed and ready for use.
Some Java programs require a JAVA_HOME environment variable to be configured on the system. Add the following line to you "/etc/environment" using your favorite text editor.
JAVA_HOME="/opt/java/jdk1.8.0"
Also, edit your "~/.bashrc" file using this command
nano ~/.bashrc
and add the following two lines to the bottom of the file and save.
export JAVA_HOME="/opt/java/jdk1.8.0"
export PATH=$PATH:$JAVA_HOME/bin
Reboot or re-login to apply the export to your environment.
* Raspberry Pi is a trademark of the Raspberry Pi foundation.
* Oracle and Java are registered trademarks of Oracle.
The Oracle JDK for ARM is now available! This article will provide the necessary instructions on how to install the Oracle Java Development Kit (JDK) on your Raspberry Pi.
All:
Windows:
Mac-OSX:
You can download the Oracle Java SE Development Kit 7u10 on this page:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
First, select JDK Download button under JDK SE 7, then select the Linux ARM JDK7 SE distribution (jdk-7u10-linux-arm-sfp.gz).
After downloading the Oracle JDK to you desktop computer, we need to transfer it over to the Raspberry Pi. We will use SCP to transfer the file over the network. If you are running on a Windows desktop, then download and install WinSCP.
If you are using Mac OSX, you can download and install Cyberduck. The screens will look different but the goals are the same.
Create a new session in WinSCP using the IP address of you Raspberry Pi. The default authentication credentials for the Debian Squeeze image is username "pi" and password "raspberry". Save the session and then login. You may be prompted to accept the SSH fingerprint, choose "Yes" to accept and continue.
After successfully establishing a connection, select the drive and folder location in the left pane where you download the Oracle JDK file to on your local desktop system. In the right pane is the file system on the Raspberry Pi, we will leave it in it's default location in the "pi" user's home directory. Drag and drop the Oracle JDK file from the left pane to the right pane and WinSCP will start the file transfer process. You will be prompted with a transfer dialog, just click the "Copy" button to start the transfer.
When the file transfer is complete, you can close WinSCP (or CyberDuck).
The remaining steps should be performed directly on the console of the Raspberry Pi or using a SSH terminal connection with shell access. In the last step, we transfered the Oracle JDK file to the "pi" user's home directory. We should be logged in as the "pi" user and already in the user's home directory.
Lets create a new directory where we will install the JDK files to.
sudo mkdir -p -v /opt/java
Next, lets unpack the Oracle JDK .gz file using this command
tar xvzf ~/jdk-7u10-linux-arm-sfp.gz
The unpacking process will take a few seconds to complete. It unpacks all the contents of the Oracle JDK tz file to a new directory named "jdk1.7.0_10" located in the user's home directory.
With the unpack complete its now time to move the new unpacked directory to the Java install location that we created earlier under "opt/java".
sudo mv -v ~/jdk1.7.0_10 /opt/java
We can also delete the original .tz file as it is no longer needed
rm ~/jdk-7u10-linux-arm-sfp.gz
To complete the JDK installation we need to let the system know there is a new JVM installed and where it is located. Use the following command to perform this task.
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.7.0_10/bin/java" 1
And finally we also need to tell the system that we want this JDK to be the default Java runtime for the system. The following command will perform this action.
sudo update-alternatives --set java /opt/java/jdk1.7.0_10/bin/java
Now java is installed. To test and verify we can execute the java command using the version argument.
java -version
You should get the following response:
That's it the Oracle JDK is installed and ready for use.
Some Java programs require a JAVA_HOME environment variable to be configured on the system. Add the following line to you "/etc/environment" using your favorite text editor.
JAVA_HOME="/opt/java/jdk1.7.0_10"
Also, edit your "~/.bashrc" file using this command
nano ~/.bashrc
and add the following two lines to the bottom of the file and save.
export JAVA_HOME="/opt/java/jdk1.7.0_10"
export PATH=$PATH:$JAVA_HOME/bin
Reboot or re-login to apply the export to your environment.
* Raspberry Pi is a trademark of the Raspberry Pi foundation.
* Oracle and Java are registered trademarks of Oracle.
Announcing the release of Version 0.0.4 of the Pi4J project!
Version 0.0.4 is the first "official" release of the Pi4J project. Development snapshot builds have been available since September but now an official release is available complete with an installer and a number of sample projects to help you get started.
Project Summary
This project is intended to provide a bridge between the native hardware and Java for full access to the Raspberry Pi in with a Java-friendly object-oriented approach. Pi4J provides a set of advanced features that make working with the Raspberry Pi an easy to implement and more convenient experience for Java developers.
The Pi4J website content has been updated with instructions and examples for 0.0.4.
The Pi4J project now posts announcements on Twitter.
Follow us to get the latest Pi4J release notices and other Pi4J news.
The Pi4J project has started a Pi4J Google Groups forum for community discussions on Pi4J project development.
For general questions and support try posting to the Java topic on the Raspberry Pi community forums:
Version 0.0.4 introduces a new installer package that makes it easy to install the Pi4J libraries and examples on a Raspbian / Debian OS distribution. See the link below for instructions on downloading and installing Pi4J.
With the release of 0.0.4, the Pi4J project artifacts are now available on Maven Central:
2012-12-16 :: 0.0.4
>> Click here to see the full: Release Notes
To get started using the Pi4J library, please see the Usage page and review each of the examples to explore the functionality provided by the Pi4j library.
]]>In a previous article we discussed how to use the Twine to monitor the state of a garage door and send alert notifications via text (SMS) or email if the door had been left open for a certain period of time. In that article/project we used the built-in orientation sensor in the Twine and the Twine mounted directly to the garage door to determine garage door state. While this was a simple and elegant solution there a certain practical issues for a long term garage monitoring solution that this project did not really address.
The number one issue is battery life. Mounting the Twine directly to the garage door forces the Twine to run solely on batteries and the battery life on the Twine may be too short to be practical for a permanent installation. Personally, I prefer a physically connected powered solution so that I don't have to concern myself with battery replacements. The second practical need for my installation was the need to monitor more than one garage door. Using the previous project concept, it would require 2 Twines to pull this off. Finally, it may not be practical to mount the Twine directly to the garage door for all installations.
In this article we will address these limitations by installing the Twine to the garage wall and not directly to the door. We will use external magnetic sensors designed for garage doors and we will connect two door sensors to a single Twine unit to monitor the state of both garage doors.
The installation time took about 30 minutes for this project. We start with opening the garage door sensors from their packaging. These sensors support both a normally-open (NO) and normally-closed (NC) mode of operation. In this project we will use the normally-closed (NC) behavior and contacts. (Normally-closed in this application means that when the magnet is not near the sensor, the circuit is closed. When the magnet is brought in range to the sensor, the circuit becomes open.)
The advantage of using a sensor that is designed for use with a garage/overhead door is that its sensor range is much greater and thus more tolerant than a traditional security system door magnetic sensor. The sensor range is 3 to 4 inches. These garage door sensors are designed to be installed on a concrete floor, but in my installation, I decided to install them on the wall above the door and not go through the effort of drilling into the concrete.
Install the sensor directly to the wall or floor and route the wires such that they will not interfere with the garage door as it travels up/down. Install the magnet and adjustable plate directly to the garage door so that the magnet is within a couple of inches of the sensor when the garage door is fully shut. I have two garage doors that I want to monitor so I installed a duplicate sensor on the adjacent garage door. (see photo)
Route the wires to the location where you want to install the Twine. You may need to use nylon cable ties to hold the wires in position to prevent getting in the way of the garage door travel. I installed mine in a location where I could easily access the Twine for battery replacement or maintenance. You may also want to consider a location that can easily access a power outlet so the Twine can be powered locally and not rely on battery power.
I used a 4D finish nail to hang the Twine on and a 6D common nail on the right-hand side of the Twine to hold it in place. The Twine breakout sensor board is also required and should be installed along with the Twine using the provided 1/8" stereo wire. The magnetic sensors can be wired directly to the Twine breakout board or you can extend them with additional wire if you need to install the Twine in a location that is a further distance than the existing sensor wires can reach. The black wires (common) from the sensors should be attached to the GND pin on the Twine breakout board. The red wires (NC) from the sensors should be attached to the IN pin on the Twine breakout board. The green wires (NO) from the sensors are not used in this project. Both garage doors are attached to the single Twine so that both doors can be monitored. Note, they are not monitored individually or discretely, but rather as one.
The last step is to use a micro-USB power supply to power the Twine locally. This will then use the mains power to power the Twine and the batteries will only be used for backup in the event of a power failure.
If you have not previously performed the initial setup configuration on your Twine, then please visit this article and perform the configuration steps before continuing.
Open a web browser and login to the Twine management web application:
https://twine.supermechanical.com/
Next, select the specific Twine device that you are working with from the drop-down menu at the top of the screen.
Next, we are going to create a new RULE to issue notifications when the Twine's breakout sensor is in the closed position for at least 15 minutes indicating that one of the the garage doors is open. (If you have any existing rules defined, you may want to delete them first.) Use the Add Rule button to create a new rule.
The new rule should be applied as follows:
WHEN
> "breakout" changes to "is closed" after "900" seconds
THEN
> send SMS text message (and/or email)
Also make sure to define the number of seconds for the trigger time and reset time under the "Options" section of the "When" trigger. I am using 900 seconds which is 15 minutes. So the garage door must be open for 15 minutes before triggering the notification.
Below is rule I am using:
Now that we have installed the Twine and garage soor sensors to the garage doors and configured the logic rule, let's test the system. Simply open one of the garage doors and wait the configured delay time, fifteen minutes in my case, and you should receive the text notification (and/or email).
While this project was a little more complex and involved than the first Twine garage door project, I believe that this is truly a better approach for a permanent installation. Using this approach, the Twine can be powered locally and you can monitor multiple doors with a single Twine. Have fun automating your home with the Twine.
]]>
Parts for Optional Ribbon Cable & Connector (below)
Assembly instructions can also be found on John's website: http://mypishop.com/Pi%208%20LED%20&%208%20Button.html
The kit includes the following components:
In addition to the parts provided in the kit, I also used a right-angle 26P male box header socket for connecting a 26P ribbon cable to the Raspberry Pi.
TIP: Click any image to enlarge and view a high-resolution photo.
STEP 1 > Insert the 26P male header socket in the position at the edge of the board and then solder the pins in place on the bottom side of the board. NOTE: If you are not using this optional IDC box socket connector and you are using the supplied female header, then be aware that it should be mounted to the bottom of the board and soldered in place on the top.
STEP 2 > Insert one of the A102J resistor networks into the RP1 position on the top of the board. Solder in place on the bottom of the board. You can bend the pins over to help hold the component in place while you solder.
STEP 3 > Insert the second A102J resistor network into the RP3 position on the top of the board. Solder in place on the bottom of the board.
STEP 4 > Next we will install the 8 LEDs. The LEDs have a short lead (cathode) and long lead (anode). The long lead (anode) should be insterted into the hole closest to the 26 pin header connector. See the photos below to make sure you have them in the correct orientation.
Insert the 8 LEDs in position and then carefully flip the board and solder each LED in place. TIP: You may find it easier to solder just one lead of each of the LEDs and then check the LEDs from the top and adjust any for final positioning.
After soldering each of the LEDs use a pair of wire snips to trim the excess lead wires.
STEP 5 > Next we will install the momentary buttons. Each button has four pins that will insert into the board. Press each switch in place firmly to fully seat the switch.
Once the switches are placed, flip the board and solder each of the pins on all the switches.
That's it. Now you have a complete assembled board ready for use with your Raspberry Pi.
The 8 LEDs are controlled by positive 3.3 VDC TTL voltage on each of the corresponding GPIO pins. Setting a GPIO pin to HIGH will cause the LED to turn ON and setting a GPIO pin to LOW will turn the LED OFF.
When depressing one of the 8 input buttons, the closed circuit will provide a ground drain for the GPIO pin thus causing it to go LOW. When an input button is not depressed the circuit on the GPIO pin will remain floating; therefore, each of the GPIO pins used with these buttons should be configured to set their internal resistors to pull up. In software, this means that the button will remain in the HIGH state when it is not pressed and will go LOW while a button is pressed.
The 8 LEDs are mapped to the P1 header on the Raspberry Pi as depicted in the diagram below.
The 8 buttons are mapped to the P1 header on the Raspberry Pi as depicted in the diagram below.
Below is a cross reference chart to better help define the GPIO pin numbers used for each button and LED.
If you are interested in native C sample code, please check out this article on Gordon's Project Blog:
https://projects.drogon.net/more-buttons-and-leds/
Gordon provides a sample program based on the WiringPi library.
The following Python source example was provided by John Scuteri
https://github.com/johnscuteri/OpenSourcedButtonBoardTest/blob/master/MyTestProgram.py
Below is a sample Java program for monitoring the 8 buttons on this board.
Below is a sample Java program for creating a cylon effect that cycles through the 8 LEDs on this board.
Assembling this kit was simple and takes about 30 minutes. This kit is a very convient tool to have on hand while testing and developing software for the Raspberry Pi. This kit is also a very good educational kit to begin interacting with the Raspberry Pi's GPIO pins.
The wiring for this project is quite simple. All we need are two wires to connect from the GPIO (P1) header on the Raspberry Pi to the PowerSwitch Tail power controller. Using male-to-female jumper wires make the task truly plug-n-play ... we don't need to solder or stip any wires.
The PowerSwitch Tail power controller works by turning on the high voltage AC circuit when a DC input of 3-12 VDC (3-30ma) is detected on its input terminal. When no input voltage is detected, the high voltage AC circuit turns off.
Fortunately the PowerSwitch Tail power controller input can be triggered directly by the Raspberry Pi's TTL 3.3 DC voltage supplied on its GPIO pins. This means that no additional transistors, relays, or other circuitry is needed to perform the switching.
In this project, we will use Raspberry Pi P1 header pin #12 (which is GPIO #1 in the Pi4J/WiringPi pin numbering scheme) as the positive control signal and we will use Raspberry Pi P1 header pin #6 for GND (ground). See the wiring diagram below. Insert the female end of the jumper wire on the Raspberry Pi GPIO header pins and then insert the male end of the jumper wire in the PowerSwitch terminal and tighten the captive screw to secure the wire in place. Make sure that your Raspberry Pi is not plugged in while attaching wires to prevent accidental shorts.
Below are photos of the completed and assembled project. Click any image to enlarge.
The software that determines sunrise and sunset times and controls the GPIO pins is Java based, therefore you must install a Java runtime to use this software.
To install the OpenJDK, simply enter this command via the Raspberry Pi's console:
> sudo apt-get install openjdk-7-jdk
(If you would prefer to install the Oracle JDK, please click here and read this article.)
The source code is provided as open source software and you can download the entire project from Github.
To run the software, a pre-compiled JAR is made available so that you don't have to compile the software on your own. Simply use the following command on the Raspberry Pi console to download the software to the current working directory on your Raspberry Pi.
> wget https://github.com/downloads/savagehomeautomation/raspi-sspc/raspi-sspc-1.0.0.jar
This software program also uses the Pi4J Project to manipulate the GPIO pin states on the Raspberry Pi; therefore, you must also download this prerequisite library to your working directory.
> wget https://github.com/downloads/Pi4J/pi4j/pi4j-core-0.0.3-SNAPSHOT.jar
To launch the program, use the following command:
> sudo java -classpath classes:./'*' SSPC
When the program starts it will prompt you for your longitude and latitude. These coordinates are used to calculate the sunrise and sunset times for your specific geographical location. You can use this web page to determine your specific longitude and latitude: http://itouchmap.com/latlong.html
At this point the program will continue to run and it will turn the power controller ON or OFF depending on the current time and it will schedule the next power event on the next available sunrise or sunset time.
Re-entering the longitude and latitude coordinates every time would be annoying, so you can also use command line arguments to start the program with specified coordinates. You could include this in a shell script to launch the program with the proper command line argument every time.
> sudo java -classpath classes:./'*' SSPC -longitude=-73.985538 -latitude=40.748362
Also note that while the program is running, you can manually force the power controller power state ON or OFF using the "on" or "off" commands via terminal.
The "help" command will display all the supported command options provided by the software:
Just leave the program running and it will automatically turn ON and OFF the power controller at the sunrise and sunset times for your location.
As you can see this is a very simple project to build and the software can be easily modified if you need some unique behavior. You can additionally take steps to include launching this program with a startup script if you want to ensure that it is automatically restarted each time the Raspberry Pi boots up.
This is an excellent example of an embedded Java application running on the Raspberry Pi and making use of the Pi4J project to control the hardware. This Java project includes a Maven build so you can easily re-build the project directly on the Raspberry Pi or your desktop if needed using Maven commands.
I hope you enjoyed this article and maybe thought of a few creative modifications that you can do in your home. Please add a comment if you find this project helpful or would like to share any modifications that you add to it.
Merry Christmas!
Related Holiday Projects:
More Raspberry Pi Projects and ArticlesThis page lists the articles posted on this blog about the Raspberry Pi
Oracle announces EA builds for Linux ARM hard float ABI will be available by the end of the year. #javaonebrasil
— Java (@java) December 4, 2012
This is great news for Java programmers on the Raspberry Pi! See this earlier post on JVM benchmarks using the current Oracle JDK for soft-float.
I will post updates to the Oracle JVM installation instructions and benchmarks articles when the new JVM for hard-float becomes available.
]]>The installation is quite simple. All you need to do is attach the Twine unit to the garage door. I used the hole that is provided on the twine and a single 6-32 x 1-1/2" machine screw to attach the twine to the garage door just under the garage door opener connector arm.
I placed my Twine on the top panel of the garage door; however, if you open leave the garage door slightly open for your pets to come and go, then you may prefer to place the Twine on a lower panel.
So, basically the way this will work is than when the garage door is shut, the twine will have an orientation of "BACK".
And when the Twine has an orientation of "BOTTOM", this indicates that the garage door is open.
If you have not previously performed the initial setup configuration on your Twine, then please visit this article and perform the configuration steps before continuing.
Open a web browser and login to the Twine management web application:
https://twine.supermechanical.com/
Next, select the specific Twine device that you have connected to the water level sensor from the drop-down menu at the top of the screen.
Next, we are going to create a new RULE to issue notifications when the twine's orientation is on "bottom" for at least 5 minutes indicating that the garage door is open. (If you have any existing rules defined, you may want to delete them first.) Use the Add Rule button to create a new rule.
The new rule should be applied as follows:
WHEN
> "orientation" changes to "bottom"
THEN
> send SMS text message (and/or email and/or twitter post)
Also make sure to define the number of seconds for the trigger time and reset time under the "Options" section of the "When" trigger. I am using 300 seconds which is 5 minutes. So the garage door must be open for 5 minutes before triggering the notification.
Below is rule I am using:
After creating the rules, make sure to click the Save to Twine button at the bottom of the screen. It will prompt you to flip the twine on its back to immediately save the new rule to the Twine unit. Now just wait until the save is complete. It takes around 20-30 seconds to complete.
You are done, that's all that is needed to setup notifications from the Twine. We will now move on to testing.
Now that we have mounted the Twine to the garage door and configured the logic rule, let's test the system. Simply open the garage door and wait the configured delay time, five minutes in my case, and you should receive the text notification (or email / or tweet).
This project was the simplest Twine project I have put together thus far. The fact that the only needed sensor is already embedded inside the Twine hardware meant that the only installation step required was just to mount the Twine on the garage door. This project is a very useful electronic reminder for your garage door.
You could also add (with the Twine breakout board) an external switch to act as an override for the cases when you purposefully want to leave the garage door open for an extended period of time. Just add the switch and add an "AND" condition to the "WHEN" part of your rule to include the breakout condition.
First you will need a water level float sensor. I have included several links above to various models and styles of these sensors. You may need to look at your Christmas tree stand and determine what type of mounting bests suites your needs and which sensor will work best for you. The water float sensor that I am using is a part that I had laying around from an old water cooler that I had cannibalized.
These sensors work by completing a circuit or opening a circuitry depending on if the sensor is NO (normally-open) or NC (normally-closed). My sensor completes that circuit when the float is at its highest position meaning that the water level is full. If you sensor works in the opposite manner that is not a problem, you will just need to reverse the trigger condition logic of the rule in the Twine configuration section. You can use the continuity test on a digital multi-meter to determine the circuit behavior of your sensor.
Below is a photograph of my Twine connected to my water level float sensor.
Next you will need to devise a method to attach the water level sensor to the Christmas tree stand. I used a metal "L" bracket and drilled a small hole in the Christmas tree stand (above the water line) and attached it with a screw.
You will need to make sure that you position the sensor such that the float descends from the top position at the water level where you want to be notified for a low level. Again, this make take some trial and error and experimentation to get the level right.
Below is a photo of the final product.
If you have not previously performed the initial setup configuration on your Twine, then please visit this article and perform the configuration steps before continuing.
Also, your Breakout Board should already be connected to the Twine at this time.
Open a web browser and login to the Twine management web application:
https://twine.supermechanical.com/
Next, select the specific Twine device that you have connected to the water level sensor from the drop-down menu at the top of the screen.
Next, we are going to create a new RULE to issue notifications when the water sensor opens the circuit indicating that the water level is below the target minimum level. (If you have any existing rules defined, you may want to delete them first.) Use the Add Rule button to create a new rule. We will define a Twine rule to take action when the circuit becomes open.
The new rule should be applied as follows:
WHEN
> breakout = "is open"
THEN
> send alert email (and/or text messages and/or twitter post)
An example of the rule I am using is displayed below.
You may also want to include a second rule that sends notifications when the water level is restored. This second rule should be applied as follows:
WHEN
> breakout = "is closed"
THEN
> send OK email (and/or text messages and/or twitter post)
An example of this second rule is displayed below.
After creating the rules, make sure to click the Save to Twine button at the bottom of the screen. It will prompt you to flip the twine on its back to immediately save the new rule to the Twine unit. Now just wait until the save is complete. It takes around 20-30 seconds to complete.
You are done, that's all that is needed to setup notifications from the Twine. We will now move on to testing.
Now that we have everything wired and configured, let's test the system. Fill the Christmas tree stand with water to the point where the water sensor float is in the high position and verify that you receive the water level OK email notification.
Next, drain some of the water from the Christmas tree stand to the point where the water sensor float is no longer in the high position and verify that you receive the water level ALERT email notification.
This project turned out to be a fun and simple project due to the simplicity of the Twine hardware and software. I also expect this to be a very useful project as we head into the Christmas season.
The most complex step was finding a means to mount the sensor and make sure that the water level and sensor float were calibrated appropriately. The Twine device is perfectly suited for this type of task. I will use it with batteries since it is a temporary/seasonal installation. Just remember to place the Twine device away from the water so that accidental spills don't get it wet. The Twine is not waterproof.
Merry Christmas!
Related Holiday Projects:
Connecting the Floodstop to Twine is an extremely simple task. The Floodstop unit comes with a short connector lead that plugs directly into the NO (normally-open) or NC (normally-closed) output ports.
Attach the two wires from this connector lead to the IN and GND (Ground) pins on the Twine Breakout board. (It does not matter which lead wire is connected to which pin, either direction will work.) Then plug the connector into the NO (normally-open) output port of the Floodstop unit.
NOTE:
If you are already using the NO (normally-open) port for use with the Furman power controller or for any other purpose, then alternatively use the NC (normally-closed) output port for the Twine connection and simply reverse the trigger condition logic of the rule in the Twine configuration section.
Below is a photograph of my Twine connected to my Floodstop unit.
If you have not previously performed the initial setup configuration on your Twine, then please visit this article and perform the configuration steps before continuing.
Also, your Breakout Board should already be connected to the Twine at this time.
Open a web browser and login to the Twine management web application:
https://twine.supermechanical.com/
Next, select the specific Twine device that you have connected to the Floodstop from the drop-down menu at the top of the screen.
Next, we are going to create a new RULE to issue notifications when the Floodstop detects a water leak. If you have any existing rules defined, you may want to delete them first. Use the Add Rule button to create a new rule. Since we used the NO (normally-open) output port on the Floodstop we will define a Twine rule to take action when the circuit becomes closed. The Floodstop will close the circuit when water is detected on its sensor pad.
The new rule should be applied as follows:
WHEN
> breakout = "is closed"
THEN
> send email and/or text messages and/or twitter post1
( 1 Twitter posts will be available in the next version of the Twine web application software)
An example of the rule I am using is displayed below.
After creating the rule, make sure to click the Save to Twine button at the bottom of the screen. It will prompt you to flip the twine on its back to immediately save the new rule to the Twine unit. Now just wait until the save is complete. It takes around 20-30 seconds to complete.
You are done, that's all that is needed to setup notifications from the Twine. We will now move on to testing.
Now that we have everything wired and configured, let's test the system. Just drip a few water drops on the Floodstop sensor pad and the Floodstop should sound its audible alarm and close the water valves. Within a few minutes (or less) you should receive the email, text message, and/or twitter post from Twine.
Verify that you received the SMS text message.
Verify that you received the email notitification.
This project turned out to be an extremely simple task due to the simplicity of the Twine hardware and software. For permanent installations, you may want to consider powering the Twine via its micro USB connection with a permanently plugged in power supply so that the system does not fail to notify you becuase of dead batteries in the Twine. I just don't like to rely on batteries for anything that is mission critical. (Same goes for the Floodstop, power it locally in addition to the batteries.)
]]>
Eleven months ago, I backed a startup project on Kickstarter called Twine.
TWINE
Listen to your world, talk to the Internet
Want to monitor things and environments remotely without a nerd degree? Maybe you want to get a tweet when your laundry's done, an email when the basement floods, or a text message when you left the garage door open.
Twine is the simplest way to get the objects in your life texting, tweeting or emailing
My long awaited Twine finally arrived today.
You can order a Twine device here:
It came packaged in an unassuming and simple cardboard box.
Upon opening the cardboard box, the Twine hardware device was revealed in a top compartment.
Lifting the Twine hardware out of the box reveals a finger hole to remove the upper compartment divider.
The lower compartment holds the supplied AAA batteries and any additional sensor accessories that were included in the order. My order only included the Breakout Board accessory. A mini phono cable is also included to connect the sensor board to the Twine hardware.
Install the AAA batteries and then slide the Twine cover shut.
Once the batteries are installed place the Twine upside down on a flat surface and the white LED should remain on. This prepares the Twine to be configured for network access. Proceed to twinesetup.com to begin the configuration process.
PREREQUSITE:
You will need to perform these steps from a computer with a wireless network card/adapter installed.
STEP 1 : Open a web browser to twinesetup.com to begin the configuration process. Once the web page is displayed, place the Twine upside down on a flat surface. Click the "I can see the light" button when the white LED light is on solid and not blinking.
STEP 2 : Next, change your computer's wireless connection to connect to the "\\||| Twine" access point.
Once connected, the web page will display a "Success" message and then automatically load the next page.
STEP 3 : Next, select the wireless network that you want the Twine to connect to and provide a password if required.
(You must connect to an access point that is broadcasting an SSID)
STEP 4 : After the wireless network connection has been configured flip the Twine and set it on its back on a flat surface.
(The "TWINE" logo should be facing up.)
STEP 5 : Next, change your computer's wireless connection back to your private wireless access point/router.
Once connected back to your private wireless network (with Internet access), the configuration page will display an "Excellent!" message and then automatically load the next configuration page.
The next part of the configuration is associating your Twine hardware with a cloud-based account. If you do not have an existing Twine account, then use the displayed form to create a new account. If you already have an existing Twine account, then use the "Sign-In" link at the top of the page.
Existing accounts can simply logon with their user credentials.
Next, the configuration pages will determine if the Twine hardware is eligible for any firmware updates. If a firmware update is available, you will be prompted with an update message.
To start the firmware update, you will be prompted to flip the Twine over on its back again.
Please wait while the firmware update installs.
Once the firmware update is complete, a success message will be displayed on the configuration page.
The final configuration step is to assign a friendly name to the Twine unit. Click the Finish button after you have provided a name.
Your Twine is now successfully configured and ready for use. You can change the orientation of the Twine and see it updated on the dashboard page. You can also create rules that allow you to specify conditions that trigger actions. Rules are what make the twine do something with the data it collects.
After configuring your Twine, you can insert the provided phono cable into any of the optionally purchased sensor boards and into the Twine.
The sensor will be displayed on your Twine Dashboard momentarily.
My first impressions of the Twine are very favorable. The hardware, plastics, and packaging are top notch. The tactile feel is inviting and size of the Twine is ideal. I was blown away with the initial setup/configuration process. Configuring a device with no display and no inputs can be very challenging and difficult for users to setup on private networks. Twine's approach of using it as a temporary WiFi hot-spot and the seamless integration of the configuration web application is unsurpassed. I literally had my Twine configured and attached to wireless my network in less than 5 minutes. That is a remarkable feat.
I do however have some longer term concerns/opinions ...
Despite my conerns, this device is still an impressive little beast. The magic is really in the software/firmware and with what we have seen thus far, we can continue to expect an elegant, intuitive and easy to use web user interface for working with the Twine. I do believe that Supermechanical will continue to improve on the software/firmware and we will see some very cool hobbyist projects emerge. I am looking forward to participating in a development community when an API emerges.
A twitter trigger is coming in the next software update, so I have a small project in mind to setup when that feature becomes available. Stay tuned for more articles to come involving Twine.
]]>While working on The Pi4J Project, I found the need to have some type of GPIO prototyping board to quickly visualize the state of GPIO pins and control the state of GPIO pins. I purchased a handful of electronics parts and set out to build my GPIO testing board.
The picture below is the final result of building this test board:
My design goals included:
I purchased most of the parts used in this project on eBay.
The following illustration depicts the wiring schematic used to create this GPIO test board.
(NOTE: The GPIO pin numbering is based on the Pi4J/WiringPi GPIO pin numbering scheme. But of course you can apply whatever GPIO pin numbering scheme to meet your needs.)
Click diagram to enlarge.
Click any photo to enlarge.
This is a simple demonstration video of this GPIO test board in action with a simple Java program cycling states on the 7 GPIO output pins.
]]>
In the previous article Raspberry Pi - Installing a RS232 Serial Port we discussed how to install a RS232 port on the Raspberry Pi. This is a follow up article to suggest a few alternative interface options as the XBit RS232 level-shifter board has been unavailable (sold out) for while now.
There are two primary RS232 interface options you can choose from for serial connectivity:
Once you have a serial interface connected you can use the serial port for
(Click one of the above options to jump to that part of the article.)
The following items are included in this article:
If you are just looking to communicate to your Raspberry Pi via its serial UART, then you may prefer a USB interface. Most recent models of computers and laptops do not have the traditional RS232 DB9 port anymore, so connecting using a USB port may be preferred.
The following adapter is only $5.47 USD and it provides a USB to serial converter chip:
This adapter is based on the Prolific PL2303HX chipset. To use this USB to serial interface you will have to install a USB serial port driver on your host operating system. Many operating systems already include support for theserolific drivers. But in case you need it, the drivers can be found here: http://prolificusa.com/portfolio/pl-2303hx-usb-to-serial-bridge-controller/
Below is a wiring diagram illustrating how to connect the USB to serial interface:
Photos of the connected USB to Serial interface (click to enlarge):
NOTE: Please secure the RED lead from the USB adapter so that it does not come into contact with any of the other pins or components on the Raspberry Pi. This RED pin carries +5VDC and could damage the Pi if it makes contact.
Now that you have the serial interface connected, you can skip down to the Serial Console section to test the interface.
For certain applications and especially project involving interfacing with other hardware devices a standard RS232 serial device with a DB9 connector is preferred. A standard serial port such as this does not require any drivers. RS232 serial communication is standardized at the hardware layer. RS232 communication can also achieve longer distance runs (maximum distance depends on baud rate).
The following interface adapter is available for $9.99 USD:
In addition to the adapter, you will need at least 4 female to female 2.54mm .1 in jumper wires.
Here are a couple of purchase options:
Why is special circuitry (level shifter) needed for RS232 serial communication?
So .. what a level shifter and why is it needed you ask. A level shifter is a circuit that can take the low voltage (±3.3VDC) TTL signals for serial transmit (TX) and receive (RX) from the UART on the Pi and shift them to ±5VDC the voltage signals required for RS232 standard communication. Want to know more? Click here.
Below is a wiring diagram illustrating how to connect the level shifter serial interface:
Now that you have the serial interface connected, you can skip down to the Serial Console section to test the interface.
(Use a straight-thru cable for connecting to a computer.)
The Debian/Raspbian distribution images include support out-of-the-box for accessing the shell console via the hardware serial port. This can be extremely convenient if you need to access your Raspberry Pi when it is not connected to a monitor and network remote access is not available.
Open a terminal emulation software such as Hyperterminal, Procom Plus, or Indigo Terminal Emulator and connect to the serial port using settings "115200, N, 8, 1". You may need to press the enter key a time or two to see the prompt. Authenticate using your credentials and you are good to go.
Here is a screenshot of the terminal displaying the boot up information and then prompting for a login:
If you intend to use the serial port for a software application running on the Raspberry Pi, there is a bit of configuration required to disable the console from using this port. By default, the serial port is configured as a console port for interacting with the Linux OS shell. The following steps will guide you through disabling the port from console access.
First, lets make of backup of the two files that we intend to modify.
sudo cp /boot/cmdline.txt /boot/cmdline.bak
sudo cp /etc/inittab /etc/inittab.bak
Next, we need to remove the "console=ttyAMA0,115200" and "kgdboc=ttyAMA0,115200" configuration parameters from the "/boot/cmdline.txt" configuration file.
To edit the file use this command:
sudo nano /boot/cmdline.txt
The file probably contains this default configuration line:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200
console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
After removing the two configuration parameters, it will look similar to this:
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4
elevator=deadline rootwait
The last step is to edit the "/etc/inittab" file and comment out the use of the "ttyAMA0" serial port. To edit the file use this command:
sudo nano /etc/inittab
Now towards the bottom of the file, look for a configuration line that includes the "ttyAMA0" port address.
Place a pound sign ("#") in front of the line to comment it out. With a pound sign ("#") at the beginning of the line, Linux will ignore this configuration line.
Save the "/etc/inittab" file and then issue this command to reboot the Raspberry Pi:
sudo reboot
Now you are ready to use the serial port with a software application and the operating system won't interfere with the port. Use the device address "ttyAMA0" in your application to access this serial port.
]]>If are interested in using the serial port with Java programming, please see this page: http://pi4j.com/example/serial.html
Announcing the Pi4J project!
This project is intended to provide a bridge between the native hardware and Java for full access to the Raspberry Pi in with a Java-friendly object-oriented approach. Pi4J is an open source project developed by professional software engineers. In addition to the basic raw hardware access functionality, this project also attempts to provide a set of advanced features that make working with the Raspberry Pi an easy to implement and more convenient experience for Java developers.
Project Website
Source Repository
Basic Features
Advanced Features
To get started using the Pi4J library, please see the Usage page and review each of the examples below to explore the functionality provided by the Pi4j library.
Simple Usage Example
Below is a simple example demonstrating controlling a single GPIO pin state.
(Please visit this page for a more in-depth view of this example: Control GPIO Example)
public static void main(String[] args) throws InterruptedException { System.out.println("<--Pi4J--> GPIO Control Example ... started."); // create gpio controller Gpio gpio = GpioFactory.createInstance(); // provision gpio pin #01 as an output pin and turn on GpioPin pin = gpio.provisionOuputPin(Pin.GPIO_01, "MyLED",
PinState.HIGH); System.out.println("--> GPIO state should be: ON"); Thread.sleep(5000); // turn off gpio pin #01 pin.low(); System.out.println("--> GPIO state should be: OFF");Thread.sleep(5000); // toggle the current state of gpio pin #01 (should turn on) pin.toggle(); System.out.println("--> GPIO state should be: ON"); Thread.sleep(5000); // toggle the current state of gpio pin #01 (should turn off) pin.toggle(); System.out.println("--> GPIO state should be: OFF"); Thread.sleep(5000); // turn on gpio pin #01 for 1 second and then off System.out.println("--> GPIO state should be: ON for only 1 second"); pin.pulse(1000); }
Stay tuned ... more articles to come on using the Pi4J library.
Just a quick experiment powering the Raspberry Pi using the 5VDC and GND pins via the 26P GPIO header. The Pi powered up with no problems including providing sufficient power for my direct attached Edimax EW-7811Un 150 Mbps Wireless 11b|g|n Nano Sized USB Adapter. I was able to remotely connect to the Pi using the WiFi connection and control the GPIO pins.
Important Note!
Please be aware that if you attempt this, you should use a regulated power supply. Don't connect a battery pack or unregulated power supply unless you are using a voltage regulation circuit. Un-filtered/unregulated power may cause damage to you Pi.
You can see the specific header pins used in the photo below:
* Raspberry Pi is a trademark of the Raspberry Pi foundation.
]]>I received my Pi Box from Adafruit and immediately assembled the kit.
I love the size and look of this case.
PROS:
CONS
Despite the CONS listed, I really do like this case overall. There is room for improvement but this is great looking simple little case. For assembly time, expect around 20-30 minutes.
You can purchase this case via the link below:
https://www.adafruit.com/products/859
Here are a few additional photos. Click any of the images to enlarge.
* Raspberry Pi is a trademark of the Raspberry Pi foundation.
]]>For users wanting to beginning working with the Raspberry Pi, here is a shopping list for the necessary supplies, optional components and other learning resources to get started.
Raspberry Pi
Books
Power Supply (5 VDC, at least 700 mA)
SD Memory Card (4GB or above)
HDMI Cable
Network
Wireless Network (Optional)
USB Keyboard & Mouse
Case / Enclosure (Optional)
Powered USB Hub (Optional)
Expansion (Optional - Programming)
Kits / Starter Packs
RATINGS
I only rate items that I have personally used and or tested.
- - Highest rating. I really like it and use it regularly.
- - Medium rating. It's OK, there may be a more preferred option.
- - Lowest rating. I don't really like it and/or no longer use it regularly.
Also, please see the Quick Start Guide on the Raspberry Pi website:
http://www.raspberrypi.org/quick-start-guideAnd the Getting Started post on this website
* Raspberry Pi is a trademark of the Raspberry Pi foundation.
* Oracle and Java are registered trademarks of Oracle.
You can install multiple Java virtual machines (JVM) on your Raspberry Pi and switch between them as needed. After installing the JVMs that you want, use the following command to select the default JVM/JRE.
sudo update-alternatives --config java
With the new JVM selected, you can test and verify that is is the new default by executing the java command using the version argument.
java -version
You should a response displaying the selected java version and VM:
* Raspberry Pi is a trademark of the Raspberry Pi foundation.
* Oracle and Java are registered trademarks of Oracle.
I have recently been performing some benchmarks of the various Java Virtual Machines available on the Raspberry Pi ARM11 platform and thought I would share the results. I used this test suite: http://dacapobench.org/
Thanks to forum member chrisg on the Raspberry Pi forums who posted these benchmarks results for the previous Debian "Squeeze" image. The results listed below for the OpenJDK are taken directly from chrisg's post. I also ran these same tests on my Pi with Debian "Squeeze" and received very similar (maybe slightly higher) results.
The following JVMs are represented:
The following chart includes all the tests performed and the resulting time in milliseconds that each test took to complete. Obviously the lower number the better :-)
I included a TOTAL line that sums up all the test results in minutes for each test case for rough comparisons, but please note that it does not compensate for the time missing from failed tests.
The test results are charted below for a visual representation.
I was particularly interested in the performance between the two available Oracle JVMs. The results (as expected) were almost negligible. The graph below illustrates the results of the two Oracle JVMs.
* Raspberry Pi is a trademark of the Raspberry Pi foundation.
* Oracle and Java are registered trademarks of Oracle.
The Oracle JDK for ARM is now available! This article will provide the necessary instructions on how to install the Oracle Java Development Kit (JDK) on your Raspberry Pi.
All:
Windows:
Mac-OSX:
You can download the Oracle Java SE Development Kit 7u6 on this page:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
First, select JDK Download button under JDK SE 7, then select the LinuxARM JDK7 SE distribution (jdk-7u6-linux-arm-sfp.tar.gz).
After downloading the Oracle JDK to you desktop computer, we need to transfer it over to the Raspberry Pi. We will use SCP to transfer the file over the network. If you are running on a Windows desktop, then download and install WinSCP.
If you are using Mac OSX, you can download and install Cyberduck. The screens will look different but the goals are the same.
Create a new session in WinSCP using the IP address of you Raspberry Pi. The default authentication credentials for the Debian Squeeze image is username "pi" and password "raspberry". Save the session and then login. You may be prompted to accept the SSH fingerprint, choose "Yes" to accept and continue.
After successfully establishing a connection, select the drive and folder location in the left pane where you download the Oracle JDK file to on your local desktop system. In the right pane is the file system on the Raspberry Pi, we will leave it in it's default location in the "pi" user's home directory. Drag and drop the Oracle JDK file from the left pane to the right pane and WinSCP will start the file transfer process. You will be prompted with a transfer dialog, just click the "Copy" button to start the transfer.
When the file transfer is complete, you can close WinSCP (or CyberDuck).
The remaining steps should be performed directly on the console of the Raspberry Pi or using a SSH terminal connection with shell access. In the last step, we transfered the Oracle JDK file to the "pi" user's home directory. We should be logged in as the "pi" user and already in the user's home directory.
Lets create a new directory where we will install the JDK files to.
sudo mkdir -p -v /opt/java
Next, lets unpack the Oracle JDK .gz file using this command
tar xvzf ~/jdk-7u6-linux-arm-sfp.gz
The unpacking process will take a few seconds to complete. It unpacks all the contents of the Oracle JDK tz file to a new directory named "jdk1.7.0_06" located in the user's home directory.
With the unpack complete its now time to move the new unpacked directory to the Java install location that we created earlier under "opt/java".
sudo mv -v ~/jdk1.7.0_06 /opt/java
We can also delete the original .tz file as it is no longer needed
rm ~/jdk-7u6-linux-arm-sfp.gz
To complete the JDK installation we need to let the system know there is a new JVM installed and where it is located. Use the following command to perform this task.
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.7.0_06/bin/java" 1
And finally we also need to tell the system that we want this JDK to be the default Java runtime for the system. The following command will perform this action.
sudo update-alternatives --set java /opt/java/jdk1.7.0_06/bin/java
Now java is installed. To test and verify we can execute the java command using the version argument.
java -version
You should get the following response:
That's it the Oracle JDK is installed and ready for use.
Some Java programs require a JAVA_HOME environment variable to be configured on the system. Add the following line to you "/etc/environment" using your favorite text editor.
JAVA_HOME="/opt/java/jdk1.7.0_06"
Also, edit your "~/.bashrc" file using this command
nano ~/.bashrc
and add the following two lines to the bottom of the file and save.
export JAVA_HOME="/opt/java/jdk1.7.0_06"
export PATH=$PATH:$JAVA_HOME/bin
Reboot or re-login to apply the export to your environment.
* Raspberry Pi is a trademark of the Raspberry Pi foundation.
* Oracle and Java are registered trademarks of Oracle.
Attention
A new article has been posted that provides additional RS232 serial interface options, hardware, and wiring digrams.
If you are trying to connect to a Raspberry Pi Compute Module Development board then see this article:
Do you need your Raspberry Pi to talk to serial controlled devices? Do you need to access the Linux shell when you don't have a network connection and don't have the ability to connect the Pi to a keyboard and monitor? Do you want to add more geek cred to your Pi by having a series of wires leads dangling from the GPIO header? If the answer to any of these questions is YES!, then this is the post for you!
Adding a RS232 serial port to the Raspberry Pi is actually quite simple. Add you need is a RS-232 level shifter and a four wire leads to connect to the GPIO header. So .. what a level shifter you ask. A level shifter is a circuit that can take the low voltage (±3.3VDC) TTL signals for serial transmit (TX) and receive (RX) from the UART on the Pi and shift them to ±5VDC the voltage signals required for RS232 standard communication. Want to know more? Click here.
There a many level shifters out there and the information here can be used to adapt any of them for you Raspberry Pi, but for wiring schematic and the illustrations used in this article I will focus on one that I had laying around the house available from XBit Electronics.
Xbit Electronics - RS-232 Level Shifter with DB9 Connector
Note: The Xbit RS-232 level shifter is no longer available. Any RS-232 level shifter that supports an input voltage down to 3 VDC should work juts fine. Here are a couple of examples:
I used the following jumper wires to connect between the level-shifter and the Raspberry Pi GPIO header. The Xbit level-shifter comes with a 5 pin header that you can solder directly on to the circuit board. Mine is soldered on to the bottom of the level shifter so that I can insert it directly into the prototyping breadboard. If you are not using a breadboard, then it is probably more convenient to solder the 5 pin header to the top of the Xbit circuit board.
I also used a prototyping breadboard to make my connections, but you could just as easily solder leads to the level-shifter if you want a more permanent solution. Do not solder wires to the GPIO header, that is not a good idea. Use either these prototype push pin connectors or a press-fit connect to interface with the GPIO header.
This level-shifter uses a source supply (VCC) voltage of 3.3-5VDC. Fortunately the Raspberry GPIO includes a pin that provide the 3.3 VDC neccessary for the VCC connection on the level-shifter. The next three wiring connections are as simple as it gets ... Ground to Ground, TX to TX, and RX to RX. A wiring diagram and close up photos are included below to help provide a clear picture of the connections.
Here are a few alternatives to the XBit level shifter including an option without the DB9 connector and a USB option.
(NOTE: I have not personally used or tested these alternative options but based on the specs they should work just fine. Also when connecting a level shifter, please take note of the source voltage required to drive the level shifter. Some are 5VDC only and other may support 3.3VDC. Make sure to get one that support 3.3 VDC and connect it to appropriate 3.3 VDC source voltage pin on the P1 header!)
Both the Debian "Squeeze" and Raspian "Wheezy" images by default include support for accessing the shell by connecting a terminal emulation program to the serial port. Just connect a straight thru serial cable (not a null modem cable) between the computer and your new DB9 port on your Raspberry Pi. Open a terminal emulation software such as Hyperterminal, Procom Plus, or Indigo Terminal Emulator and connect to the serial port using settings "115200, N, 8, 1". You may need to press the enter key a time or two to see the prompt. Authenticate using your credentials and you are good to go.
Enjoy the world of serial connectivity!
]]>The Raspberry Pi is an inexpensive little ARM-based embedded computer developed as a teaching and experiment platform. I wanted to experiment running Java applications on my Raspberry Pi so I need to install a Java Runtime to execute Java-based applications.
I first installed the Open JDK on the device since this is the JRE flavor most commonly found in mainstream Linux OS distributions. Installing the Open JDK is quite simple. All you have to do is enter the following command and it will download and install the Open JDK.
apt-get install openjdk-6-jdk
However, the performance I experienced while using the Open JDK on the Raspberry Pi was quite disappointing and dare I say unusable for any reasonably sophisticated Java program. ChrisG posts some pretty revealing benchmarks using various JVMs in this blog article: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=34&t=6369 I ran the same benchmark tests on my Pi and got very similar results. If you notice the Oracle JRE benchmark results in ChrisG's post you will see that they are an order of magnitude better in performance than the Open JDK Zero and Open JDK Cacao JVMs. For my goals, this make the Oracle JVM the only suitable candidate for running my Java applications.
This article will provide the necessary instructions on how to install the Oracle Java Runtime Environment on your Raspberry Pi.
All:
Windows:
Mac-OSX:
You can download the Oracle Java SE Embedded 7 JRE for ARMv6/7 Linux - Headless on this page:
http://www.oracle.com/technetwork/java/embedded/downloads/javase/index.html
Please note that you do unfortunately have to fill out a survey to download the JVM. This means that you cannot simply use a tool such as wget or curl to download the JVM directly to the Raspberry Pi. (oracle-fail!) Well I guess you could technically run "startx" and use a graphical browser in the X-Windows GUI to complete this step, but this article will use SCP to get the JVM file transferred to the Raspberry Pi.
After downloading the Oracle JRE to you desktop computer, we need to transfer it over to the Raspberry Pi. We will use SCP to transfer the file over the network. If you are running on a Windows desktop, then download and install WinSCP.
If you are using Mac OSX, you can download and install Cyberduck. The screens will look different but the goals are the same.
Create a new session in WinSCP using the IP address of you Raspberry Pi. The default authentication credentials for the Debian Squeeze image is username "pi" and password "raspberry". Save the session and then login. You may be prompted to accept the SSH fingerprint, choose "Yes" to accept and continue.
After successfully establishing a connection, select the drive and folder location in the left pane where you download the Oracle JRE file to on your local desktop system. In the right pane is the file system on the Raspberry Pi, we will leave it in it's default location in the "pi" user's home directory. Drag and drop the Oracle JRE file from the left pane to the right pane and WinSCP will start the file transfer process. You will be prompted with a transfer dialog, just click the "Copy" button to start the transfer.
When the file transfer is complete, you can close WinSCP (or CyberDuck).
The remaining steps should be performed directly on the console of the Raspberry Pi or using a SSH terminal connection with shell access. In the last step, we transfered the Oracle JRE file to the "pi" user's home directory. We should be logged in as the "pi" user and already in the user's home directory.
Lets create a new directory where we will install the JRE files to.
sudo mkdir -p -v /opt/java
Next, lets unpack the Oracle JRE tar file using this command
tar xvzf ~/ejre-7u4-fcs-b20-linux-arm-vfp-client_headless-12_apr_2012.gz
The unpacking process will take a few seconds to complete. It unpacks all the contents of the Oracle JRE tar file to a new directory named "ejre1.7.0_04" located in the user's home directory.
With the unpack complete its now time to move the new unpacked directory to the Java install location that we created earlier under "opt/java".
sudo mv -v ~/ejre1.7.0_04 /opt/java
We can also delete the original taf file as it is no longer needed
rm ~/ejre-7u4-fcs-b20-linux-arm-vfp-client_headless-12_apr_2012.gz
To complete the JRE installation we need to let the system know there is a new JVM installed and where it is located. Use the following command to perform this task.
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/ejre1.7.0_04/bin/java" 1
And finally we also need to tell the system that we want this JRE to be the default JRE for the system. The following command will perform this action.
sudo update-alternatives --set java /opt/java/ejre1.7.0_04/bin/java
Now java is installed. To test and verify we can execute the java command using the version argument.
java -version
You should get the following response:
That's it the Oracle JRE is installed and ready for use.
Some Java programs require a JAVA_HOME environment variable to be configured on the system. Add the following line to you "/etc/environment" or your "~/.bashrc" file using your favorite text editor.
JAVA_HOME="/opt/java/ejre1.7.0_04"
Reboot or re-login to apply the export to your environment.
Coffee & Pie - what could be better!
Hinkmond Wong and Gary Collins of Oracle are going to introduce you to developing for the Raspberry Pi using Java Embedded technology.
In addition to demoing the Raspberry Pi running Java Embedded, they will cover:
* Raspberry Pi is a trademark of the Raspberry Pi foundation.
* Oracle and Java are registered trademarks of Oracle.
For some applications you may not want your Raspberry Pi permanenenty attached to a monitor and keyboard or perhaps you just would like to be able to access your Raspberry Pi remotely. Enabling the SSH server on your Raspberry Pi will provide SSH terminal access over your network. This article will cover the steps need to enable the SSH server for remote access and how to connect to the Raspberry Pi using a SSH terminal enumation software from Windows and Mac OSX.
NOTE:
If you are running the Raspian "Wheezy" image or the Debian "Wheezy" image, please note that SSH is already enabled by default. You can also use the Raspberry configuration utility to enable/disable the SSH server by running the command and selecting the SSH item from the menu:
sudo raspi-configYou can skip this section and proceed to the next section in the article.
From the console on the Raspberry Pi please enter the following two commands:
sudo rm /etc/ssh/ssh_host_* sudo dpkg-reconfigure openssh-server
These steps will create the RSA and DSA encryption keys enable the SSH server. The SSH server will also be started automatically each time you reboot your Raspberry Pi.
Now, lets get connected.
Before we can connect remotely, we first need to determine what the IP address is for the Raspberry Pi. For most users, when the Raspberry Pi boots up and is connected to you router/switch/residential gateway it will dynamically obtain an IP address using DHCP.
Use the following command from the console to get the IP adress:
ifconfig
In the resulting output on the screen, look for the inet add for the eth0 device.
You can use any terminal emulation software you like; however, for this demonstration we will use Putty a very popular an free terminal software for Windows.
You can download the Putty software here.
Double click the putty.exe program to start Putty. You will be prompted with the Putty configuration dialog. Enter the IP address of your Raspberry Pi in the Host Name field and make sure the the connection type is set to SSH.
To persist these setting so you don't have to re-enter them every time you start Putty, enter a name such as "RaspberyrPi" in the Saved Sessions field and press the Save button.
Click the Open button to connect to the Raspberry Pi and start the SSH session.
You will be prompted with a message to cache the RSA2 fingerprint. Select Yes to accept the key and continue the connection.
Upon connection, you will need to provide the authentication credentials to logon to the Raspberry Pi.
The credentials may vary depending on the operating system image that you installed on your Raspberry. If you loaded Raspian "Wheezy" or Debian "Squeeze" then use username "pi" and password "raspberry".
Now you can interact with your Raspberry Pi just as if you where setting at the keyboard console.
No additional software is needed for OSX to connect to the Raspberry SSH server. Just open theTerminal application and enter the ssh command with the username@ip-address format:
ssh pi@10.1.1.194
Upon connection, you will need to provide the authentication credentials to logon to the Raspberry Pi. The credentials may vary depending on the operating system image that you installed on your Raspberry. If you loaded Raspian "Wheezy" or Debian "Squeeze" then use username "pi" and password "raspberry".
Now you can interact with your Raspberry Pi just as if you where setting at the keyboard console.
]]>
The Raspberry Pi is a revolutionary step forward in bringing low cost embedded computing to the masses. Designed as an educational learning tool and the "B" model priced at only $35 USD, the Raspberry Pi makes a great little device for DIYers and hobbyists.
This article will provide the necessary information on the basic supplies needed and instructions on getting started with your new Raspberry Pi.
A shopping list with direct linked items is available via this post.
To power the Raspberry Pi you will need a 5 VDC power supply with a minimum of 700 mA and micro USB connector to plug into the micros USB port on the board.
If you have an extra Apple iPhone charger laying around, this makes a perfect power supply for the Raspberry Pi. The Apple iPhone charger is 5VDC @ 1A (1000mA). Using the Apple iPhone charger or similar USB charger you will still need a USB to micro USB adapter (A Male to Micro B). I used this AmazonBasics USB Cable - 2.0 A Male to Micro B (6 Feet / 1.8 Meters)
NOTE:
Do not attempt to use your computer's USB port to power the Raspberry Pi.
The Raspberry Pi includes a HDMI port to connect the device to a computer or TV monitor. If you monitor does not accept a HDMI connection directly, then you many need a HDMI to DVI or HDMI to display port adapter/cable. I am using this HDMI/DVI adapter cable that I picked up from Amazon: Eforcity Black 6FT /2 Meter HDMI Male to DVI Male Cable
You can plug in just about any standard USB keyboard and mouse. I am using a USB to PS2 adapter with an old PS2 keyboard and PS2 mouse.
You will need a network (CAT-5) ethernet cable to connect the Raspberry Pi to you network switch/hub/router/residential gateway.
Before booting your Raspberry Pi for the first time, you will need to flash an operating system to a SD card using a Windows, Apple Mac. or other Linux computer with an SD card reader. You can download your choice of operating system image from the main Raspberry Pi download page:
http://www.raspberrypi.org/downloads
Or from the Raspberry Pi Wiki distributions page:
http://elinux.org/RaspberryPiBoardDistributions
The following page includes detailed instructions based on your desktop operating system for flashing the image to the SD card.
http://elinux.org/RPi_Easy_SD_Card_Setup
Once your SD card has been flashed successfully, you are ready to insert it into the Raspberry Pi and boot it up.
NOTE: If you are planning on running Java-based applications and want to run using the Oracle JRE, then you should use the "Debian ARM 2012-04-19 (Squeeze)" distribution at this time instead of the newer "2012-08-07 (raspbian/wheezy)" distribution. The newer distribution supports hardware floating point, but is incompatible with the Oracle JRE at this time.
On inital boot, depending on the image you load, the Raspberry Pi may reboot one or more times while setting itself up. Once complete a login prompt should be provided allowing you to enter credentials to access the console. The login credentials vary depending on which distribution you have loaded, but the default credentials for Raspbian and Debian distributions are username "pi" and password "raspberry".
If you are using the Raspbian "Wheezy" image, the raspi-config configuration utility should load on the first boot and allow you to select your local configuration options.
If you are using the Debian "Squeeze" image, you will need to run the following commands to configure the system your your locale, keyboard and timezone.
sudo dpkg-reconfigure locales
sudo dpkg-reconfigure keyboard-configuration
sudo dpkg-reconfigure tzdata
For information on other distributions, please see this page: http://elinux.org/RaspberryPiBoardDistributions
Run the following command from the console to start the graphical user interface.
startx
Now you are up and running .. have fun with your Raspberry Pi!
* Raspberry Pi is a trademark of the Raspberry Pi foundation.
]]>I recently found myself needing to replace almost every speaker in my 2002 Chevy Tahoe (non-Bose sound system). The factory speakers were all blown and sounding pretty pitiful. In fact I did not realize how bad it was until I removed the old factory speakers and noticed cone separation on every door speaker and the factory subwoofer.
In addition to replacing the speakers, I came across a forum post on z71tahoe-suburban.com that discussed bypassing the factory amplifier for each of the door speakers. It turns out that all the door speakers are routed thru the factory amplifier. I am not sure that it provides amplification to the door speakers, but it does have an internal crossover that removes much of the bass from the audio signal. Since I replaced all the door speakers with a better set of component speakers capable of handing more of the full audio range, I did not want the factory amp/crossover restricting the audio signal from the head unit (receiver) to the door speakers.
The forum post included a detailed set of instructions on how to build an adapter cable that will plug directly into the factory wiring harness and the factory amplifier and bypass the factory crossover for the four door speakers. This bypass cable does still send audio and power to the factory amplifier for the rear cargo area subwoofer and pillar tweeters. (If you don't need the factory amp because you are using an after-market amplifier, then you may choose not to include that portion of the cable or just not plug the adapter back into the factory amplifier.) This is a 100% non destructive modification to the Tahoe. This bypass adapter can be removed at any time.
The following parts are required.
Approximate Cost: $20-25 USD
Total Time: 1-2 hours
NOTE: You may notice that these wiring adapters describe that they are for a Saturn vehicle. Just ignore that, we are not going to use them as they are wired, we are going to reconfigure the wiring. We just need these as they are the correct connectors that will work with the Tahoe's factory wiring harness and factory amplifier.
I used the following tools and supplies to complete this project:
NOTE: If you are not comfortable with soldering, you could use wire nuts (twist on wire connectors, b-caps) instead to make each wiring connection. This take up more room, but is perfectly viable. Just make sure to use electrical tape or some means to ensure that the wire connectors don't vibrate loose and fall off over time.
We are basically going to use the two Metra GM connectors to create a bypass cable that will be installed in between the Tahoe's factory wiring harness and the factory amplifier/crossover.
<< STEP 1 >> - Disassemble the Metra 70-2002 Connector
The first step is to remove all the existing pins and wires from the Metra 70-2002 connector. The pins are released by inserting a small paperclip below each pin and using a push and pull technique on the wire until the pin is released. Don't use force to remove these pins, we will need to reuse each pin and wire.
<< STEP 2 >> - Disassemble the Metra 71-2002 Connector
The next step is to disassemble the Metra 71-2002 connector. Before removing the pins and wires, we must first remove the two retaining clips (gray and blue). Lets start with the gray clip. Gently insert the end of a small flat screwdriver between the connector and the clip's retention clasp. Repeat this for each side of the clip. Once released, pull the clip towards the rear of the connector to remove it. Next we need to remove the blue clip. For the blue clip we must insert the end of the screwdriver to release the retention clasp from the front side of the connector. Repeat this on both sides and then gently pull back the clip towards the rear of the connector to remove it.
(click any image above to enlarge)
With the two clips removed, we can now remove each pin and wire. To remove the pins in this connector, insert either the end of the large paper clip or the end of a CD/DVD disc removal tool into the face of the connector as show below to release the pin. (I found that the diameter of the CD/DVD disc removal tool was slight larger than the paperclip and was a little easier to use.) Use the push and pull technique on the wire to remove it from the connector. Again, don't use force to remove these pins, we will need to reuse a few of the pins and wires. The pins will easily slide out towards the rear of the connector once properly released.
(click any image above to enlarge)
<< STEP 3 >> - Rewire the Connectors
The next step is to reinstall the wiring between the Metra 70-2002 connector and the Metra 71-2002 connector. The wiring diagram below is what we will be building.
Wiring Connection Legend
WIRE 1 - RIGHT FRONT SPEAKER - NEGATIVE (A1 to A9)
Note that the red wire removed from the Metra 70-2002 Connector includes three pins and two short and one long wire segments. Cut the second short wire segment as close as possible to the pin connector so that you have a single short segment with two pins attached. Next, insert the pins into the rear of the Metra 70-2002 Connector in positions A1 and A9. If the pin does not stay in place, you may need to take the screwdriver and bend the clasp on the pin back so that it can catch properly.
WIRE 2 - RIGHT FRONT SPEAKER - POSITIVE (A2 to A10)
Wire 1 was the easy one, the remaining wires will have to be soldered together (or connected using an alternate electrical connector). Basically we need to connect two of the wires with pins together to create a single wire with a pin on each end. Wire two is a simple straight connection using the green and green with black stripe wire leads from the Metra 70-2002 connector. I trimmed the lengths down to eliminate bulk, but that is optional. Cut, strip the insulation and solder the two ends of the green leads so that you end up with a single wire with a pins on each end. Insert a length of heat shrink tubing around the connection and heat to shrink. Finally insert the pins into position A2 and A10 of the Metra 70-2002 connector.
WIRE 3 - RIGHT REAR SPEAKER - NEGATIVE (A3 to A11 to A11)
Wire 1 and wire two were straight connections that bypass the factory amplifier completely. Wire three is slightly different because it also feeds the amplifier the rear audio signal so that the factory amplifier can drive the cargo area subwoofer and pillar tweeters. If you do not want to use the factory amplifier at all you can leave out the A11 connection to the Metra 71-2002. The next wire is a connection using the black and black with white stripe wire leads from the Metra 70-2002 connector and the black wire from the Metra 71-2002 connector. Cut, strip the insulation and solder the three ends of the black leads so that you end up with a wire with two Metra 70-2002 pins and one Metra 71-2002 pin. Before soldering make sure to stage a length of heat shrink tubing around the connection and after soldering slide the heat shrink tubing into place and heat to shrink. Finally insert the pins into position A3 and A11 of the Metra 70-2002 connector and also A11 of the Metra 71-2002 connector.
WIRE 4 - RIGHT REAR SPEAKER - POSITIVE (A4 to A12 to A12)
Repeat the same steps as wire three using the orange and orange with yellow stripe wire leads. Insert the pins into position A4 and A12 of the Metra 70-2002 connector and also A12 of the Metra 71-2002 connector.
WIRE 5 - POWER ANTENNA (A5 to A5)
Wire 5 is a simple straight through connection from A5 of the Metra 70-2002 connector to A5 of the Metra 71-2002 connector using the yellow wire leads
WIRE 6 - LEFT FRONT - NEGATIVE (B1 to B9)
WIRE 7 - LEFT FRONT - POSITIVE (B2 to B10)
Wire 6 and 7 are both simple straight bypass connection just like wire 1 and 2 except that they are installed on the "B" side of both connectors. Wire 6 uses the blue with yellow strip and the tip of the red wire from the Metra 70-2002 connector. There were not two blue leads and we need to reuse every pin, so I used just the tip of the remaining red wire lead and trimmed off the extra red wire. See the photo for details. Wire 6 should be inserted into positions B1 and B9 on the Metra 70-2002 connector. Wire 7 uses the gray and gray with black strip wire leads from the Metra 70-2002 connector and should be inserted into positions B2 and B10 on the Metra 70-2002 connector.
WIRE 8 - LEFT REAR - NEGATIVE (B3 to B11 to B11)
WIRE 9 - LEFT REAR - POSITIVE (B4 to B12 to B12)
Wire 8 and 9 are identical to wires 3 and 4 except that they are installed on the "B" side of both connectors. These wires provide the rear audio signal for the factory amplifier to deliver sound to the factory subwoofer and pillar tweeters in the cargo area. Wire 8 uses the purple and purple with black stripe wire leads from the Metra 70-2002 connector and the purple with black stripe wire from the Metra 71-2002 connector. Wire 8 should be inserted into positions B3 and B11 on the Metra 70-2002 connector and position B11 on the Metra 71-2002 connector. Wire 9 uses the white and white with black stripe wire leads from the Metra 70-2002 connector and the white wire from the Metra 71-2002 connector. Wire 9 should be inserted into positions B4 and B12 on the Metra 70-2002 connector and position B12 on the Metra 71-2002 connector.
WIRING COMPLETE
That all the wiring steps, next, we will test the connections and complete the assembly.
<< STEP 4 >> - Testing
If you have a multi-meter or continuity tester, its a good idea to test all the pins to make sure that the connectors are wired correctly before installing into the Tahoe. Set the multi-meter to continuity testing mode and then test the following pins in the Metra 70-2002 connector and make sure there is a connection between them. Also touch the other pins to ensure that no other pins have a connection for each test.
Next let's test the Metra 71-2002 connector. To do this you can use the small paper clip to insert into each pin for testing. Ensure the following connection are valid:
<< STEP 4 >> - Tidy Up
All tests passed? Great! Let's finish by re-installing the retention clips in the Metra 71-2002 connector and and adding a few nylon wire ties to tidy up this bypass connector.
Install a few nylon tie straps and trim all the excess strapping.
Now that your have constructed the bypass adapter, the installation inside the truck is very simple. Empty the glove box and then depress the right side towards the drivers side of the vehicle to allow the glove box door to open completely and drop open.
Next, locate the factory amplifier directly to the right of the cabin air filter on the right side of the glove box cavity.
Next, release the mounting retention clip located on top of the amplifier.
Tilt the amplifier up to gain easier access to the wiring connectors plugged into the amplifier. Unplug the lower wiring connector from the amplifier. There is a release on the back side of the connector, you must depress this release before the plug can be removed from the amplifier.
Insert the Metra 70-2002 connector on the bypass adapter into the vehicles wiring harness. Insert the other end of the bypass adapter (the Metra 71-2002 connector) into the factory amplifier. Don't worry, you can't screw this up, the plugs only fit in their correct locations.
Tuck the bypass adapter away above the amplifier so that does not interfere with the glove box. Put the amplifier back in place and re-attach the retention latch and then raise the glove box and fire up your stereo for a test. That's it -- we are all done!
More information about the wiring harness in the Tahoe and more specific details about this adapter can be found in this document:
Please note: the wiring coloring scheme used in this document is different than what is posted in this article. The article used the best mix of colored wires based on what came in the Metra connector packages and trying to remain as consistent as possible for all connection leads.
This document was originally posted on this forum posting:
]]>The original Floodstop - Washing Machine post suggested the use of the Furman MP-20 or Furman MP-20 to disconnect electric power from your washing machine in the case that the Floodstop detects water on its sensor pad.
However, I have received a number of feedback comments asking about alternatives to the Furman. The Furman devices are only available in 120V with US style connectors and they are somewhat costly. This article will attempt to provide a couple of alternatives and a D.I.Y. approach for those who are comfortable with a soldering iron and simple circuits. These alternatives are targeted at a lower cost solutions and at higher voltage solutions such as European 220-240VAC systems.
The PowerSwitch Tail II is a simple inline power controller that can switch the high voltage 120VAC power using a separate and isolated low voltage 3-12 VDC source. This device is attractively priced in the ~$25 USD range.
This option is only viable in installations that use the US style plug and only require 120V and a maximum load of 15 amps. (Thus this option is a direct replacement for the Furman MP-15.)
The PowerSwitch Tail II is available via the following links:
To use this device with the Floodstop you will need a separate DC power source to power the low-voltage IO circuit between the Floodstop and PowerSwitch Tail II. Any low voltage DC power supply between 3-12 volts should work fine. Here are a few options available on SparkFun.com:
(The type of barrel connector on the power supply does not matter as you will end up cutting off the barrel jack and stipping the insulation to the bare wire to connect to the Floodstop and PowerSwitch Tail II.)
Unlike the Furman configuration, this configuration will use the NC (normally-closed) pins on the Floodstop unit. When no water leak is detected by the Floodstop, the NC pins on the Floodstop will allow current to pass thru from the low voltage power supply to the PowerSwitch Tail II. This in turns engages the relay inside the PowerSwitch Tail II allowing the high-voltage circuit to power the washing machine plugged into the PowerSwitch Tail II. When the Floodstop detects a water leak, then the NC circuit inside the Floodstop unit becomes "opened" and no control current is allowed to pass through to the PowerSwitch Tail II, thus the relay inside the PowerSwitch Tail II is disenganged and the high-voltage circuit to the washing machine is switched off.
The wiring diagram below illustrates the low voltage circuit needed to drive the PowerSwitch Tail II from the Floodstop unit.
Below is a schematic of the PowerSwitch Tail II and it's specifications:
>> Instructions Manual for PowerSwitch Tail II
The PowerSwitch Tail IIU is a power controller kit that can switch higher voltages and higher current loads than that of the standard PowerSwitch Tail II unit described above. This option is viable in installations that require voltages up to 240VAC and a maximum load of 20 amps. (Thus this option is a replacement for the Furman MP-20.)
There are two distinct models to choose from based on the voltage requirements that you require.
This is a D.I.Y. kit that will require the ability to follow a simple schematic and solder components to a circuit board. Please see the following instructions to determine the skills necessary to assemble this kit.
>> Instructions Manual for PowerSwitch Tail IIU
This kit is attractively priced in the ~$18 USD range but it should be noted that additional supplies are required to build a fully functioning power controller. You must provide your own AC plug connectors for your specific application. Below is an example of a fully assembled unit with US and European style plugs. The best option for the washing machine application may be to buy a short extension cord property rated for voltage and amperage required and to cut off both ends and use the ends to solder directly to this board. Cut the extension cord ends with enough length on each end to meet your installation needs, but avoid leaving unnecessary and excessive lengths of cord as this will result in additional resistance in the high-voltage circuit.
To use this device with the Floodstop you will need a separate DC power source to power the low-voltage IO circuit between the Floodstop and PowerSwitch Tail IIU. Any low voltage DC power supply between 3-24 volts should work fine. Please see the PowerSwitch Tail IIU instructions to install the correct resistors based on the supply voltage. Here are a few options available on SparkFun.com:
(The type of barrel connector on the power supply does not matter as you will end up cutting off the barrel jack and stipping the insulation to the bare wire to connect to the Floodstop and PowerSwitch Tail IIU.)
Unlike the Furman configuration, this configuration will use the NC (normally-closed) pins on the Floodstop unit. When no water leak is detected by the Floodstop, the NC pins on the Floodstop will allow current to pass thru from the low voltage power supply to the PowerSwitch Tail IIU. This in turns engages the relay inside the PowerSwitch Tail IIU allowing the high-voltage circuit to power the washing machine plugged into the PowerSwitch Tail IIU. When the Floodstop detects a water leak, then the NC circuit inside the Floodstop unit becomes "opened" and no control current is allowed to pass through to the PowerSwitch Tail IIU, thus the relay inside the PowerSwitch Tail IIU is disenganged and the high-voltage circuit to the washing machine is switched off.
The wiring diagram below illustrates the low voltage circuit needed to drive the PowerSwitch Tail IIU from the Floodstop unit.
Below is a schematic of the PowerSwitch Tail IIU:
Building your own simple power controller circuit is relatively simple. Using the two devices above as examples, you can purchase your own relay and other components and build a power controller.
The design should take care to provide isolation between the low-voltage "control" circuit, the magnetic coil and the high-voltage "load" circuit. The PowerSwitch Tail designs use an opto-isolated solid state relay to accept a low-voltage control signal and use it to drive the high-voltage magnetic coil of the relay. This completelty isolates the low-voltage control circuit from the high-voltage coil circuit and high-voltage load circuit.
Your design should also consider magnetic coil flyback using a coil suppression technique. More information on coil supression can be found here. The PowerSwitch Tail designs use metal oxide varistors to address coil suppression.
Unlike the PowerSwitch Tail designs you may prefer your power controller circuit to use a NO (normally-open) control circuit to control when the load circuit is powered ON. If you use a SPDT relay, you should be able to use the NO (normally-open) ouput lead of the relay for your load circuit instead of the NC (normally-closed) lead. The reason for using a NO control circuit is because in the washing machine application the power should be flowing to the load circuit almost 100% of the time. Thus it makes more sense that the while the relay is a "REST" you want the load circuitr to be ON. Only in the rare cases where the Floodstop detects a water leak do you want the relay to be engaged and power to be disrupted to the load circuit and thus powering off the washing machine.
Although it is not recommended to use this device as is due to safety concerns and insufficient load capacity, here is one additional design example you can use as a reference:
This example uses a transistor instead of an opto-isolated solid state relay to accept the control voltage and drive a low-voltage coil relay. This example uses a couple of diodes instead of varistors for coil suppression.
I have not personally tested each of these power controllers independantly or with the Floodstop controller. I have included these devices and examples here to help others find workable solutions for their sitations where the Furman is not a viable option. I have documented the information and wiring diagrams to the best of my ability based on the available product documentation for each of the devices. If you find an error in the content, please let me know so that I may make any necessary corrections.
Safety-First. Make sure to use caution and the appropriate safety measures while working with high-voltage AC power. If you are not confortable or experienced working with AC voltage, please consult an electrician or experienced preofessional. Additional disclaimer information is listed here.
]]>An alarm system is an essential component of any modern home. However, many homes that have alarm systems installed don't have a monitoring service actively monitoring the alarm. The high cost of traditional alarm monitoring service companies can be a major deterrant for many. Many have cut the phone cord and do not have a dedicated home phone service and this can be a deterrant for alarm monitoring.
If the high costs of traditional alarm monitoring service companies have kept you from signing up, or if you have an existing system and monitoring service but would like to sign up with a new service provider at a significantly reduced rate, or if you don't have a home phone line, but would like to have alarm monitoring service, please read on.
For going on about 8 years now, I have been using the Internet-based monitoring service NextAlarm.com. (Please note that this article is not an advertisement or paid review for NextAlarm.com. I truly use the service and am a paying customer.) The NextAlarm monitoring service costs anywhere between $11.95/month to $17.95/month depending on the service plan and how long you sign up for. More details on pricing can be found here. I typically renew at the annual rate.
NextAlarm caters to the Do-It-Yourselfer and they provide a number of help articles and instructions for many of the supported alarm systems. Their technical support staff can be extremely helpful as well. Check out this page for programming tips.
Please Note, you will need the installer code for your existing alarm system so that you can re-program it. You may be able to obtain this from your existing alarm company or you many be able to completely reset your alarm system and re-program it with a new installer code. Be aware that completely re-programming any alarm system from scratch can be a tedious process, so make sure to have all the necessary instruction manuals and make sure that you feel comfortable taking on this task. Please review the installation manual for your alarm and/or search the Internet for more information about your specific alarm system brand and model.
Alarm Monitoring via the Internet
You can use your existing home telephone line for the alarm monitoring service or alternatively if you do not have a dedicated home phone line or if you prefer to not use an existing line, you can optionally purchase NextAlarm's ABN Broadband Adapter. The ABN uses your broadband Internet connection instead of your telephone line. (Technically speaking it is establishing connection and communicating using VoIP) The ABN adapter requires a Contact ID compatible alarm system; please check this page for alarm system compatibility.
The ABN hardware is a Cisco/Linksys PAP2T running a custom firmware and custom configuration for communicating with the NextAlarm VoIP servers. If you already own a Linksys PAP2T, you may be able to contact NextAlarm technical support and acquire the custom firmware to load into your PAP2T to enable it as a ABN adapter.
The NextAlarm ABN includes two telephone line ports and a single network (Ethernet) port. Connect the security system telephone line to the telephone line 1 port on the ABN and connect the network port of the ABN using a network cable to your Internet gateway or network router.
Alarm Monitoring Web Console
A NextAlarm account provides a simple to use web console that allows you to perform the following tasks:
We will dive a little deeper on a few of these options to further demonstrate these features.
Alarm Status
When logged in to you NextAlarm account, the alarm status is displayed in the upper left corner of the screen directly above the menu options.
Test Mode
You can place your security system into test mode for a user specified amount of time to allow you to test your system without the Police or Emergency services being contacted in the event of an alarm signal.
Please Note: the testing mode only works with security systems that support the Contact ID format.
Arm / Disarm System Remotely
The NextAlarm web console provides an option to remotely ARM or DISARM your alarm system. You will need to enter a user code to arm/disarm the system and it may take up to two minutes for the action to take place. Disclosure: At the time of this writing, this is the first time I have seen this new feature and in a quick attempt to test this, I was not able to get this to work on my system. It could be that I don't have something configured correctly to allow the remote arming/disarming, but it will take some further investigating on my part to try to get this working.
Alarm System Zones
An extremely helpful feature with NextAlarm is that they provide configuration options that allow you to name the alarm zones with friendly names. So instead of getting an alert that Zone 1 has been breached, you can get a friendly notification with a helpful descriptive name such as "Garage Zone" has been breached.
In additon to the friendly names, you can also associate the type of alert and the designated emergency responder for each zone. See the screenshot below for an example:
Alarm Notifications (E-Notify / Latchkey / V-Notify)
The NextAlarm system provides a comprehensive set of notification options to message you via email or voice call when an alarm zone has been triggered.
The E-Notify options allow you to define one or more email addresses for notifications to be delivered and allows you to define which zones should trigger these notifications. When an alarm is signaled in one of the configured zones, a notification email is broadcast to the list of email recipients.
The E-Notify feature also allows for email notifications to be directed to a list of email addresses based on each user code that arms/disarms the system. This is a handy notification if you want to actively monitor when your alarm is armed or disarmed. In the NextAlarm E-Notify control panel you can define a friendly name for each user code (user number) and discretely configure notifications for (a) ARMING events, and/or (b) DISARMING events.
E-Notify supports an option for you to define prefix text to all E-Notify alarm notification email messages. This can be used to describe the name of the location if you are monitoring multiple sites or allow you to define some trigging text for email rule processing to prioritize these notification emails.
The NextAlarm notification system also offers a feature called Latchkey E-Notify. Latchkey E-Notify alerts are just the opposite of the E-Notify alerts. Rather then sending alert notifications when an event takes place, these alerts are sent when an expected action does not take place within a configured time span. The intended goal is to notify you when expected actions don't take place such as when you expect someone to arrive home and disarm the system or times in which you expect the system to be armed. See the screenshot below for more examples.
V-Notify is a seperate notification system provided by NextAlarm that works in conjunction with E-Notify. For each alert configured in E-Notify you can enable V-Notify to place a telephone call to a user defined phone number such as your mobile number. The V-Notify automated caller will announce the alarm event to you and then offer to connect you directly to the Police, Fire, or other Emergency number.
Alarm Activity Log
An audit and activity log is available in the NextAlarm web console that records all system activity including system arming, system disarming, zone violations, system tests, communication failures, and silent alarms. This detailed log is a very useful tool to check on alarm usage and detect if any system communication problems or failures are occurring.
Homeowner's Insurance Discount
An added benefit to having an alarm system with an active alarm monitoring service is a discount on your homeowners insurance. Please check with your homeowner insurance company so see what discount they may offer. The discount alone may more than cover the cost of alarm monitoring.
Conclusion
NextAlarm is just one of many of the low-cost alarm monitoring systems that have emerged over the past decade. However, it offers many advantages beyond a fair price such as technologically advanced Internet based monitoring, sophisticated alerting and notifications, web based management and configuration, and much more.
NextAlarm has also expanded into offering new home security services and products for remote camera viewing and management. They have created mobile apps for iOS and Android phones for viewing and controlling the cameras and security system. I have not had an opportunity yet to use the camera solution, but it is something I have always wanted to do and will likely target in a future project.
Going forward, I would love to see NextAlarm open up a web services platform for cross application integration with other solutions and third-party developers. I understand that it may have to be limited API to preserve the integrity of security, but even if it were just an alarm status and notifications API that would be an excellent next step for NextAlarm.
I have been a satisfied customer for several years and just wanted to share this solution with others who may be looking for an affordable way to maintain an alarm monitoring service. While this article may not technically be about a home automation project, I felt that home security is an important part of any complete home system and a monitoring service should be carefully considered. Maybe in a future project we can do some custom integration with the alarm system or find ways to mine automation information from the ABN.
Happy New Year!
]]>
Have you ever experienced a flood in your home due to a faulty water supply line to your washing machine? The amount of devastation and damage can be well into the many thousands of dollars not to mention the time and inconvenience cleaning up the aftermath. Fortunately there are several detections systems on the market that can help prevent these type of catastrophes.
Unfortunately, I was not able to find a unit that met *all* my needs and concerns. So I found the next best thing .. a device with IO ports. The Floodstop Washing Machine Valve Shutoff Kit provides auxiliary IO (input-output) ports that enables you to extend the device's capabilities thru custom integration.
The Floodstop unit itself does provide a water sensor pad, a control unit, and the hot & cold water shut-off valves. It is designed to shut-off the water supply in the event that water is detected on the sensor pad which typically would be located on the floor behind the washing machine. You can also purchase additional sensors and daily chain them if you want to detect water in multiple locations. The Floodstop unit has worked really well for me and has passed nearly two years worth of testing in my home. The control unit seems to be built cheaply which is a downside, but it has worked flawlessly so I really can't complain too much.
Ok, so why is the design of the Floodstop no enough? Well if the supply lines are compromised, then you should be covered, but if the drainage line becomes disconnected, stopped up, or fails, then the Floodstop will shut off the water supply, but if your machine is running a cycle, it can pump the entire water contents of the tub out on your floor. (This very thing happened to a neighbor of mine.)
Here is where we really get started with this project.
I wanted to kill the power to the washing machine to (a) prevent it pumping water out if the drainage line is compromised and (b) prevent the washing machine from trying to run a cycle if the water supply has been cut off by the Floodstop to prevent any damage to the washing machine. Since the Floodstop provides both a NO (normally-open) and NC (normally-closed) contact leads, all I needed was to find a power controller that could be controlled via contact closure.
Enter the Furman MP-20 Power Relay Accessory. This is an industrial quality power controller and can handle electrical loads up to 20 amps. (Please see the addendum to this article at the bottom of the page for 15 amp circuits using the Furman MP-15) Perfect for my washing machine. Unfortunately the Furman it is a little pricey; however, I was able to pick up a slightly used unit on eBay at a very reasonble price. A second important feature of the Furman MP-20 is that it includes a low voltage (12 VDC) power supply built into the unit itself --- so no additional ugly and bulky wall warts to supply power for this low-voltage circuit.
Locate the NO (normally-open) IO contacts on the Floodstop control unit. Please note that the instruction manual and diagram that came with the unit were wrong (at the time of this writing). I used a continuity tester to verify which port was which. When the Floodstop unit is running normally the NO contacts provide an open circuit and when water is detected and the Floodstop sounds its alarm and closes the water valves, it will also close the NO contacts thus allowing the completion of our trigger circuit.
On the Furman locate PIN 1 (+12 VDC) and PIN 3 (REM). These are the two pins that we will use with the Floodstop to control power to the outlet. When a circuit is completed between PIN 1 (+12 VDC) and PIN 3 (REM) the Furman will turn the power to the outlet off.
So all we need to do is wire the Floodstop NO (normally-open) pins to the Furman on PIN 1 (+12 VDC) and PIN 3 (REM). Thus when water is detected the Floodstop will close the NO circuit allowing the +12 VDC a complete circuit to the Furman's REM (remote) pin and subsequently will shut off the power. The diagram below shows the wiring connection. By the way, good news, the Floodstop does come with two short wires and connectors to interface to the Floodstop IO ports. We only need to use one of them.
Now the setup is complete by installing all the equipment and plugging in the washing machine to the Furman outlet. The picture below is my complete installed system.
A few final words of caution. A few reviews for the Floodstop on Amazon report that the Floodstop unit quits working over a period of time and has failed to protect a few customers. I personally have not encountered any failures in the almost two years that I have had it installed. Just a few drops of water on the sensor pad and the Floodstop will come to life sound its alarm and shut-off both hot and cold water valves. I do perform routine tests of the system to ensure it continues to function properly and I would recommend that if you install a system like this that you do the same. It only take about two minutes to test it out.
When you install the Furman or other power controller, please don't leave it on the floor. Make sure to install it on the wall or at least place it on a shelf or somewhere where it would not be exposed to water in the event of a failure.
The Floodstop unit can be battery powered or plugged into the wall. Please plug it in and use the batteries as a back-up only. This whole system is vulnerable if it relies on being battery powered only.
There are alternatives to the Furman and you may be able to find a more economical option. I have seen an article where a similar setup was built using a X10 power controller. While I'm sure this will work just fine, I am reluctant to build a protection system that relies on either a wireless or powerline signal such as X10. Perhaps that is just me being over protective, but why take the chance?
Thank you and feel free to provide any comments questions and success stories.
]]>Feel free to follow along by subscribing to the RSS feed or following updates one on your favorite social platform (see top right corner of page for social links) and please provide feedback to let me know if you find the projects useful or if there is a project that you would like to see. My goal for now is to try and post a new project each month, but that may vary from time to time depending on real life work and family commitments. Again Thank You and I hope you enjoy. - Robert
]]>