The GarageUino is my first Arduino project that has resulted in a product that I actually use. It’s a garage port controller that features a 20 by 4 character LCD display, four LEDs, a button, two connectors for position sensors and an USB connector. Oh! And of course an Ethernet port for Internet access. I’ll get back to that later.
Read on to learn how I created the GarageUino, and how you can make one yourself.
I get a lot of whys. Why do you have to control your garage door from your phone? Why do you need an 80 character LCD? What’s wrong with the wireless remote that came with the original opener? Why?
And the answers are; I don’t. I don’t. Nothing. Because I can.
I started with the external connectors for the position sensors, the Ethernet connector and the USB port. I used a combination of a drill and a small saw blade for all the cutting, and a glue-gun to make things stick together. Next I made all the cut-outs in the front cover, for the LCD, LEDs and the button.
I soldered the resistors directly to the LED pins to save space and to ease the wiring. I also soldered together the grounds so I only have to ground one wire as opposed to four. A little heat shrink tube later and it all looks pretty good. You can barely see the resistors.
How do I activate the actual garage door opener?
There isn’t an external trigger available on my garage door opener, so I had to modify my original remote control to be able to control it. I took apart the remote and soldered two wires parallel to the toggle button on the remote. After making a hole for the wires, I screwed it back together. Now I have an external wireless trigger.
There isn’t much spare room inside the GarageUino, and it took some time to arrange everything so that nothing came in the way of each other. An Arduino with a screw shield, an Ethernet shield and a relay shield gets pretty high when they’re stacked on top of each other. The front cover actually touches the yellow relays when the casing is screwed together.
To power the GarageUino, I use a 12V transformer that’s actually intended to be used for 12V indoor LED spotlights, but it’s perfect for supplying both the Arduino and my 12V inductive position sensors with enough power.
The GarageUino has four LEDs. A green standby/ready LED, a red error LED and two yellow LEDs, one to indicate that the garage door is open, and one to indicate that it’s closed.
The external USB connector is a female USB-A connector from an extender cable I had laying around. I chopped of a USB-B male connector and soldered the two ends together to make the custom USB cable in the second picture below.
At this point I thought it might be a good idea to test the hardware before I started to wire it all together. I also wanted to make sure that my custom internal USB cable actually worked.
I hooked up an Ethernet cable to my network, and a USB cable to my computer. As you can see on the picture below, a flat custom patch cable connects the Ethernet extender port to the Ethernet shield.
I transferred a simple test program to the Arduino, and that of course confirmed that the USB port was functioning. The test program on the Arduino requested an IP address from my router and printed it to the serial port. I started to ping the Arduino on the IP address and the ping replies confirmed that the Ethernet was working perfectly also.
Assigning The Pins
Right from the beginning and up until the point where I was going to start with the wiring, I thought to myself that there was plenty available inputs and outputs on the Arduino Uno to suit my needs, and luckily there were, but not by much. You have to remember that you may not be able to use all the pins on the Arduino exactly as you want to, because some of them may be reserved for other purposes. You’ll also have to consider which pins to use for what. Features such as PWM aren’t available on all the pins.
As you can see on the picture to the left, I’ve cut away three pins going to the relay shield. That’s because the relay shield uses pins 4 through 7 to activate the relays. And because I only use one of the relays, the one on pin 7, I’ve cut away the other pins so that I can use them for my LEDs instead. Pin 5 and 6 provide PWM output which is great, because it means that I can dim my LEDs if I want to. I use pin 5 for my red LED and pin 6 for the first yellow LED. Pin 4 does not provide PWM output and it’s also part of the SPI bus (for the Ethernet shield), which uses the pins 4, 10, 11, 12 and 13, so they’re all reserved. For my remaining two LEDs, I use pin 3 (green LED) and pin 9 (second yellow LED), which are both PWM outputs as well.
The button is connected to pin A1, yes that’s right, the analog pins can be configured as digital pins as well. And the signal from my position sensors are connected to pins 2 and 8. Pins 0 (RX) and 1 (TX) are reserved for serial I/O. To communicate with my LCD I use the I2C/TWI bus, which is a two wire interface. I2C uses analog pins 4 and 5.
So in my case, 7 out of 14, of the digital pins are reserved. As well as 2 out of the 6 analog pins. That leaves me with 7 digital pins and 4 analog pins, of which I use all the 7 digital pins, including all available pins with PWM output and one of the analog pins (as a digital pin).
Time to wire it all together.
The wiring on the GarageUino isn’t complicated at all, and the screw shield simplifies the task even more. I use heat shrink tubes and cable ties to route the wires and keep them together. They make the wiring look a lot nicer as well.
Some pictures from the wiring process:
The GarageUino is installed in my garage and is currently in daily use. Here are some pictures from the installation. The second and third picture below shows the positioning sensors.
- 1x Plastic Casing
- 1x 20×4 Characters I2C LCD
- 1x Green LED
- 1x Red LED
- 2x Yellow LED
- 4x 320Ohm Resistor
- 1x Push button
- 1x Arduino Uno
- 1x Ethernet Shield
- 1x Screw Shield
- 1x Relay Shield
- 3x RJ45 Extenders
- 2x 12V Car Relays
- 1x 12V Power Supply
- 1x Garage w/Garage Door Opener
- Solder, wires, heat shrink tubes, RJ45 connectors…
The “GarageUino Remote” for Android
I wanted to be able to remote control the GarageUino from my Android phone, so I created the GarageUino Remote app.
The app looks exactly like the actual GarageUino. There is a “LCD” screen in the app that shows exactly the same information as the physical LCD, and the same goes for the four LEDs and the button. I’ve even used a plastic case texture that mimics the physical casing.
The source code for the Arduino as well as the source code for the Android app is open source and are available on my GitHub from the links below.
If you create your own GarageUino or something else based on this article, I would love to hear from you.