Using yocto combo layers and adding a new layer

It’s easy to add your own layer using the combo layer system.

  1. Edit conf/combo-layers.conf and add a section for your layer.
  2. cp conf/combo-layers-local-sample.conf to conf/combo-layers-local.conf and add a section for your new layer
  3. run scripts/combo-layer init
  4. after you have a build directory (by sourcing oe-init-build-env) edit build/conf/bblayers.conf and add your layer
  5. bitbake as per normal

 

Geohouse – Risks

I feel like the geohouse project is something unique that carries lots of risks.  What I’m doing has been done, but not quite the way I’m doing it.  What if my assumptions are wrong?  What are the costs?  This post hopes to answer those questions.  First, what components will this geohouse have?

  • Solar Power System – $2,000 (5 panels, 4 batteries, charger)
  • Pump and tubing system – $140
  • Greenhouse plastic – $170
  • Wood – $250
  • PVC pipes – $120
  • LED grow lighting – $120

The worst case scenario is that I cannot keep plants alive during the coldest months (Nov – Feb).  This system gives me at least 3 months extra growing and production in the absolute worst case.  Best case is that I get 12 months of production.  Here’s a short list of other things that can go wrong:

  • Not enough sun to power solar array (North West sun hides for substantial parts of the year)
  • Too much heat loss
  • Not enough sun to add energy to system
  • Not enough heat storage (geo-battieries)
  • Components break (power supplies, pump, etc).

Geohouse – The geo-exchange heated smart green house

Once my first raised bed garden is happy producing food I started planning the next raised bed.  It was to be an 18 inch wide and up to 16 feet long bed in the Mittleider tradition.  However, while watching youtube videos about people using the Mittleider method, I became inspired to try and extend my growing season -perhaps even year round by using the earth as an energy storage system (aka, a battery).

Each gram of wet soil can hold 0.35 calories of heat energy.  At depths from 4ft to 6ft, the soil is far enough down to be insulated from the air above and maintains a year-round temperature from 55 to 60 degrees F.  Many residential and commercial buildings utilize this almost free energy and feed it into heating and cooling systems that would normally be pulling from less optimal sources such as trying to cool air from outside during the summer time or trying to heat cold air during the winter.

I started researching methods of accessing this geo energy.  After digging around on youtube some more, I found several systems that blow air through the ground via tubes and back into the greenhouse.  The air would be heated by the sun and then some of that energy would be transferred into the ground where it can be used during the night.  Air, however, is a poor conductor of energy at about 1/4th the specific energy as water and less than the soil itself.  So I wondered if there was a better way.

Water has one of the highest specific heat properties of any medium.  At first I thought about pumping water through a radiator and warming or cooling air via that method.  However, it occured to me that the system could be much simpler.  During warm days, a common method of cooling the plants is to water them.  The plants, via the roots then become cool.  The same principle should be possible with heat as well.  If the soil temperature is maintained, we may be able to keep the plants happy.  Can water be used to heat/cool the soil directly?  Yes!

An efficient way of heating businesses and homes has been in-floor radiant heating.  The method pumps hot or cold water through PEX tubing in the flooring system.  The warm/cool floor then heats or cools the ambient air in the room.

To make a long discovery process short, I decided to combine these methods.  I will pump water into the earth and cool a 12 ft by 18 inch bed directly at the root level.  To insulate the bed, I’ll put a double layer 6mm green house film around it.  The hope is that I can keep the temperature around 50-60 degrees all year (+20 degrees in the winter).  Can it be done?  Let’s find out.

Auto-irrigation Raised Garden – Part III: Rainwater

Another important part of this automatic irrigated raised garden project is rainwater gathering.  Instead of using expensive house-water, we can gather and use “free” rainwater from the sky.  Untreated rainwater is more health for the plants.

I’m using two 55 gallon drums that I was able to find on craigslist for about $20 a drum.  I got an extra two drums for my brother.

IMG_20150529_121146853_HDR

 

All four drums fit snugly in my minivan for transport back home.

After getting them home, I need a support structure to put them on.  A friend of mine offered me a pre-built structure that his mother was using.  I accepted and with a few modifications, this is the result:

IMG_20150606_143133986

 

This is situated right around the corner from the first raised garden.  It will not take much tubing to get the water there.  Also, the top of the drums is 7 feet.  This will give me about 3 PSI of pressure (assuming 2.3 ft/PSI).  That should be enough pressure.

Update: this post has been over a month in the making.  During that time I’ve had no rain to fill the drums.  I have water now and it works!  Part IV we will look into hooking up the Edison and making a schedule.

Auto-irrigation for raised garden – Part II: The raised garden

Quick update on the raised garden project.  The first garden bed is built!  This is a 6 x 3 ft bed with 5 x 3 ft of growing space.  I used cedar outdoor wood and I think it looks pretty nice.

IMG_20150530_180730682

Shortly after building, I did a bit of research on the Mitleider gardening method.  In order to do vertical gardening, I need taller posts which I initially thought I would just use for grapes or other vine plants.  I may end up redoing the post system or at least modifying it so I can vertically grow my tomatoes and melons in order to maximize space.

IMG_20150530_180721561

This bed is also equipped with an equipment box.  This is where most of the auto-irrigation system will go (valves, Edison module, panel charger, energy storage, etc).

IMG_20150531_210933185

Finally I’ve mounted my 10 watt solar panel.  After observing, I don’t like this position.  It should go on the back pillar to avoid casting shadow on my other solar panels: the plants below.

Next Part: Rainwater gathering

 

Auto-irrigation system for raised garden using the Intel Edison

The Plan

I want a raised garden but I don’t want to have to manually water it like my lawn sprinkler system.  So I’ve been planning and gathering parts for an auto-irrigation system.  Here are the key parts:

  • Rainwater gathering system
  • Valve control to drip-water plants
  • Solar power (with solar tracking?)
  • Soil temperature and humidity sensors
  • Auto water-soluble fertilizer mixing

In this part, I’ll talk about the solar power system -specifically power storage.

Solar Power: Power Storage

I have a bunch of 350 farad super capacitors laying around.  The cool thing about super capacitors is that they can charge directly from the solar panel.  I picked up a balancer on ebay and connected six of them in series to give me about 16 volts.  I also have a spare 10W Instapark solar panel that I’ll use to charge the cells.  The Instapark solar panel is rated for 22V closed circuit.  I shouldn’t charge my super caps over 16 volts so I will need to reduce the voltage a bit.  The easiest way to drop the voltage is to use a resistor.  Using Ohm’s law we can calculate how much resistance we need:

R = V/I

My voltage drop (V) is 22V (the panel max) / 16V my super cap array max which is 6V.  The current (I) I expect to see is 600mA or 0.6A.  Plugging in my variables I get

36.66 ohms.  I want 10 watts to be safe (I figure, probably wrongly so, that a 10W resistor for a 10W panel will be fine).

Enclosures

I found some water resistant enclosures on amazon.  This was perfect size for my super cap bank.  I got an additional one to put the Intel Edison and related circuits in.  To keep it water tight, but also allow cables to get in and out I picked up 4 of these from adafruit along with matching water resistant cables.

IMG_20150522_103840101

 

I used a 5/8″ spade bit to create two holes for the cable glands for the super cap box.

IMG_20150522_132851431

 

Carefully I screwed in the glands and put some gasket sealer on the inside to seal some of the uneven spots from the drill.

 

IMG_20150522_132846462

I did the same thing with the “Edison box”, but on opposite sides.

IMG_20150522_132835959

 

I then stacked two power supplies on top of each other.  I got the power supplies from amazon.  They have adjustable output and a wide input range.  I have one set at 12V for the valve solenoid and the other at 4.2V for the Edison.

IMG_20150524_194308646

Finally, I attached a power button so I can turn on and off. This too needed to be water resistant.  The white LED color is a nice touch, IMHO:

 

IMG_20150524_194240476

Finished Power Enclosure

The enclosure works pretty well.  It took about 15 minutes to fully charge.  My hope is that it will power the Edison and friends for an entire day and most of the night.  If it turns off in the night, I can live with that.

 

IMG_20150524_194222183

Next?

Next part we’ll look at the 2nd Enclosure for the Edison and friends.  Stay tuned!

Geek Home Theater Update – Minnowboard Max and lights in action

Quick update to the home theater system.  I installed the max with silverjaw lure (adds mpci-e and msata).  To attach the lights, I also required a level shifter to take the 3.3V up to 5V required by the Apa102’s.  Adafruit had just the component for the job: The 74AHCT125.

Here’s the panel with the max in there:

The results are pretty awesome.  The APA102’s peform much better than the WS2801’s.  No flicker.  Fast, and most of all, more lights!

Next up is to add some buttons to turn the thing off when needed and add USB capabilities and a remote.

Intel Edison + Koyo Sprinkler Controller

AKA: How to build a smart sprinkler controller in less than 100 lines of code

Sound impossible?  It isn’t.  Here’s how I did it but before we start, lets define what we mean by “smart”.  “Smart”, in a sprinkler context (yes, this will be highly subjective), to me means it waters my lawn and other things that need watering at just the right amounts at just the right time.

It must be green.  If it rains, it can’t water unnecessarily.  So it has to be able to understand the weather.  It also cannot water more than my lawn or other plant needs.  This means that it has to know what I’m watering and how much water it needs.  With those features in mind, lets begin.

First, the brains of the operation: The Intel Edison.  The Edison is a powerful and small unit with built in wifi and bluetooth.  That means it’s really easy for it to connect to both other devices and to the cloud.

The wifi feature will help us get weather data from the cloud and also evapotraspiration data (ET say whut?  More on this later).  The Edison also has USB, which we will need later on.

The Second piece of hardware we will use is the “Koyo”.  It’s a PLC.  My brother had an extra one that he was willing to donate.  I understand you can do the same thing with the Edison and a relay array, but if you have a PLC, why not use it, right?

The koyo uses UDP for control.  My brother wrote a python library to interface with the unit.  It’s pretty easy to use, the readme that comes with the library will help you find the koyo on the network and change its IP address.  The library also allows us to toggle the koyo’s relays.  The koyo python library requires a connection to the koyo.  If you can plug the koyo into your network via ethernet, awesome.  If not, you need to use something to bridge to the koyo over wifi.  The Edison has wifi, so we are good there.  But it doesn’t have ethernet.  This is where USB comes in.

I picked up a usb to ethernet adapter on digikey.  Using the Edison breakout board and a USB OTG to USB female I now have working ethernet -well almost.  Connman, the network manager, which comes installed on the Edison was a bit of trouble here.

Once we have a connection set up, we need some data from the Internet so we can make the system smart.  There are two sources we will use for data.  Weather Underground and Agrimet.  Whether Underground can tell us if it has rained and Agrimet will tell us how much to water.

Agrimet has a table that contains the evapotranspiration data for several crop types including “lawn”.  Evapotransperation (ET) is how much transpiration and evaporation of water has occurred during the day.  This number takes several variables into account including precipitation, solar irradiation, wind, and several other variables.  For more on ET and how it is calculated checkout the Wikipedia page.  Many local weather stations calculate ET for different crop types and Agrimet aggregates that data. Agrimet organizes the data per station so  we will need to find you nearest weather station to our location.  You can find your station on a map here.  Remember the station id. We will need it later.

Once you have the weather station id nearest your area, we can get an ET data table for that station.  The URL to get the table is this:

Replace {stationID} with your station and open the URL in a browser and you should see the data table.  To parse the data I used this script:

To use this class do the following:

“cropName” can be any crop that you see in the chart.  Since we are watering grass, I will use “LAWN” for my crop.  The next thing we want to do is see if it’s rained today.  Since our forecast was predicted using yesterdays numbers, if it rained today, it will not have factored in.  So we will just subtract the amount of precipitation if any from our forecast.  I use weather underground to get the current weather conditions.  Here’s my sprinkler.py that combines the Et with weather data and turns on/off my sprinkler zones.

 

The zones are defined in a json file:

I got the rate for each zone by putting a cup and running the sprinkler for 10 mins then dividing by 10 to give me how much water my system produces per minute.  Type is LAWN, but it could be any crop.  No I’m not using this variable in my code.

The last thing to do is set it up on a schedule.  To do that, check out my video.

Conclusion

I’m almost completely happy with this setup after a few weeks of operation.  I love being able to ssh into the sprinkler and turn it on and off -even from my android phone.