In this tutorial, you will learn how to build your own Grassberry High. But first what is a Grassberry High? The Grassbery High is an intelligent multi-plug, you can define rules for each outlet in your Browser. E.g. plug a lamp into the outlet I and set it to on for twelve hours every day at 8 a.m. or plug a fan into outlet II and switch it automatically on if the temperature rises above X degrees. It's up to you which devices you want to control!
If you don't feel comfortable building your own, we have a subscriber list for our Kickstarter campaign. Register there, and we will let you know when you can buy an already mounted version.
If you need help installing the Grassberry High, use the comment box below or the support reddit to ask questions.
On the main page, there is a detailed shopping list with all the parts you need for the project. You need a RaspberryPi 4!
There are many steps because I decided to make the tutorial as detailed as possible. If you feel something is missing or hard to understand, just leave a comment below. It is straightforward to do, most of the steps are only plugin cables together.
Click the download link: (version 12.09.2019) for the software. The file is several GB, so the download takes ~1h depending on your internet connection. In the next step, I will explain to you how to burn the software to an SD card.
1.2 Burn the Image to an SD Card
The file you have downloaded is an image. You can install this image with etcher.
Download etcher and follow the instructions on the etcher.io website.
2 Hardware - Part Plug & Play
Please unplug the device (if plugged) to prevent any damage to the SD or any other parts while connecting and also to protect yourself. As a rule of thumbs with PCBs & microchips, please try to touch them on the sides of the board and avoid touching the things on the board. Also, it is a good idea to watch out for electrostatics (no worries, it's usually not a thing). An easy trick is to touch a heater or something grounded before.
2.1 Insert the SD card
On the underside of the pi, there is a micro-sd card slot. Just slide it in.
2.2 Add the I2C Output to the Pins of the Raspberry PI4
The black part where the flat cables go in later looks away from the USB ports. The adapter PCB is facing inwards, and the text on both PCBs are aligned.
Not like this:
2.3 Cables, Relay Controller & Sensors
There exist two ways to plug in the flat cable. A good one and yes you guess a bad one. Luckily the bad one just will prevent it from working and does not damage the device.
The brown wire in the flat cable is the GND (ground). On the relay controller and the sensors you find a small G guess what, this is the abbreviation for ground. Always double-check that the brown cable is on the right side.
So make sure that each cable your plugin looks like this:
2.3.1 Connect the Relay Controller & Sensors
Outgoing from the raspberry pi, connect each device you have to the chain. One by one, it will be easy. Start with the connection between the raspberry pi and the relay controller. Then follow with the sensors. If you have more than one sensor of the same kind, please check out advanced tips on the bottom.
On most of the devices, there is an In and an Out label. The pi only has an output. So the output goes into the input of the relay controller, then the output of the relay controller goes into the input of the first sensor and so on. Some devices don't have an output. For these devices, you need to either combine cables or use an adapter.
For the CO2-sensor you will need the I2C cross-over adapter for I2C cable reversing (or as in the picture above you manipulate one of the flat cables) because the input is the other way around. Also, make sure the small switch next to cable input is set to "I2C" (not "UART").
If you bought only one sensor of each kind, you could skip this part. Don't be afraid of the next part it is simpler than it sounds ;-)
On each sensor, you have 2 pads with pins. The first pad is to set the pull-up resistors (the yellow area), we don't need to touch that. The second one (the blue) is to configure the I2C address of the sensor.
It is important that each address exists only once in the network! If we have two parts which have the same address in the network, we can use those pins to change the address. There are four configurations:
No jumper: this leaves the sensor (or relay) with its default address, e.g., the temperature/humidity sensor has a default address of 0x40 (0x is a hex number and converts to 64). By placing a jumper that connects both "0"-pins on the pad, we increase the address by 2^0 (1) which gives us the new address: 0x40 + 2^0 = 0x21. If we want to increase the address by two, we need to connect the "1"-pins: 0x40 + 2^1 = 0x42 To give you an overview of the possible combinations:
- no jumper: 0x40
- only "1"-pins: 0x41
- only "2"-pins: 0x42
- both jumpers: 0x43
In the image above the jumper connects the "0"-pins but does not connect the "1"-pins which configure this temp/hum sensor to the address 0x41.
The relay controller has a default address of 0x20 because we only use one relay controller we don't have to adjust the address. The CO2 sensor has an address of 0x4d (77).
2.4 connect the Micro-USB cable to your pi.
I guess you have done that before ;-) in your life.
3 Hardware - Part Electrical Installation
☠️ Attention these steps can cause serious harm to you or others if done wrong.
There is a maximum current you can use on your outlets at home. E.g., your fuse box restricts the power of an outlet to 16 Amps. Remember the part with the smallest amount of possible current will be limiting the circuit. Never ever exceed this current, it may start a fire! This can be anything down the line from the fuse, the wires to the Grassberry High, the power input, the relay, etc.
Wire diameters and current:
Check the Cable Colors for your country.
The relay controller has 8 outputs. We divide these two outputs into two separated circuits. But let's get back to this later.
If you use the laser cut case of step 4, cut all the cables as short as possible. If the cables are too long, it will be difficult to fit everything into the case.
Now you can strip the cables' insulation. Using a wire stripper makes it easy to get the insulation off and prevents damaging the copper inside. Strip approx. 0.5cm/0.2inch off of each side of the cable.
3.1.1 Cables going to and away from the relay-controller
The conductor which goes to the relay-controller and away requires a terminal on one side of the cable. The other side which will go into the lever nut is left blank. Never put anything on the side of the wire which goes into the lever nut to prevent the copper from slipping out.
Twist the front gently with your fingers, this helps the tiny copper hairs to stay together. Then place the terminal on the wire and crimp it. Make sure that the connection is tight. Use a heat gun to shrink the shrink tubing to the cable.
Each relay on the relay controller has three connectors.
- COM: The power is going in here
- NO: Normally open (power only when switched)
- NC: Normally closed (power unless switched)
The power goes into COM, if a sensor or timer switches the relay it will conduct electricity through NO, otherwise through NC.
We will use only COM & NO because we want everything switched off initially. The Grassberry High switches then the relays based on rules or timers. This is safer because e.g. in the case of a power-down everything is out initially.
This is a basic circuit diagram which shows the correct wiring.
Now you should have sixteen phase cables with one terminal on a side. Take eight of them and attach a cable end sleeve on the other side. Use the crimp tool with the correct diameter for your cable to ensure the connection is tight. Double-check before crimping that none of the hair wires are outside of the sleeve. This is dangerous because it may short circuit and spark. Leave a blank end on the other eight. Use the heat gun to shrink the tubing to the cable.
3.1.2 Controlling the power of ventilators
If you want to use a vent which is usually switched to, e.g. 50% and you need maximum power in situations where e.g. the temperature is exceeded. You can use both NC & NO. In this case, you direct the output of NC to your transformer and the output of NO to the ventilator.
3.2 Wiring the Inlets and Outlets
Take the first power inlet and wire it. If you have a version to solder, you need to connect the cables via soldering. Otherwise, you bolt it.
The middle part is connected to the ground. The left pin is the phase, the right pin is neutral. For each wire put the other end into a separate lever nut. Start from left to right to have everything tidy. Now you should have 2 circuits, each has three lever nuts with one cable inside.
Start with the lever nuts with the neutral wire. Add four cables into each lever nut. Remember the side which goes into the lever nut is left blank after the insulation has been stripped away. On the other side, attach a cable end sleeve as seen earlier in the tutorial.
The side with the cable sleeve is mounted into the sockets. Repeat this for the ground cables. And attach the eight-phase wires going out of the relays' NO output. Do not mix up the two separate circuits! E.g., the phase from circuit one goes into the lever nut, to the relay, to the socket and from there the neutral wire goes into the lever nut and from there back to the same input.
You can download the Adobe Illustrator files at thingiverse. These files contain several layers. The colors in the layers are red (cut), blue & black (engraving). If you cut it yourself, you need to activate only one layer at a time.
The first time you plugin in the Grassberry High, a wifi hotspot with the name gh-config will appear. Connect to this wifi hotspot with password highhigh.
After connecting to the hotspot, type into your browser: http://grassberry.local (don't forget the http://; otherwise, your default search engine may take over). Browse to the general setup, there you can configure your wifi.
Select your wifi (it must be visible) and double-check the password you entered.
The Grassberry High reboots now this may take a few minutes. Be patient and do not unplug the device! Unplugging the device may result in a bricked Grassberry High!
During the reboot the wifi hotspot is disabled, your computer usually connects to your preferred wifi then. In my case El Tigre 5G. If gh-config is still in your wifi list, then something is wrong, you may have mistyped the wifi password.
Leave the tab open in your browser, and you will get notified after the reboot in case of success. Again this takes a few minutes, so grab a coffee in-between.
From now on, you will be able to access your Grassberry High with http://grassberry.local from any device in the same wifi network.
You can access the public Github repository. It's MIT License, if you want to build hardware on top/ integrating the project into, e.g. a cabin which is sold, please drop an email and we will support you and feature your project!
I'm only able to work part-time on the project, so bear with me in case something doesn't work and needs to be fixed.
Please ensure that you have the required electrical knowledge & certifications to do this! There is a severe risk of injury or death.
* The use of the open source software stays free forever. You can help by:
- Giving feedback
- Taking part in the development (software, designs...)
- Writing crisp grow reports or reviews about the Grassberry High