Category Archives: Technology

Using the SCIO in gardening

Ages ago, I funded a kickstarter for a “consumer molecular scanner”.  It’s a pocket spectrometer of sorts that can be used with your smartphone to analyse the chemical composition of just about anything.  It works by spraying an object with photons from an LED on the device.  Different chemicals react differently with different wavelengths of photons.  On the device is a sensor, that analysis which photons bounce back.

The android app that you use with the device, communicates over bluetooth to read data.  Data is then sent to the cloud for analysis.  What comes back is a spectrum that represents the object.  Included in the app are a number of applets for doing things from estimating body fat to estimating the BRIX rating of a fruit product.  You can also create your own “mini-applet” to capture and analyze your own objects.

Tomato leaf deficiency mini-applet

I wanted to create a mini-applet to analyse tomato leaves and perhaps identify any deficiencies.  I started with some healthy leaves and took some scans.  Unfortunately, I need to produce leaves with known deficiencies, scan those leaves and name those scans after the deficiency for this to be really useful.  I did however, notice some strange leaf formation, took some scans and the results were different than the normal “healthy” leaf.  If I can identify this as a nutrient deficiency, I’ll have a good way of identifying it moving forward.

Produce Selector applet

This is a built-in applet that allows you to scan your favorite fruit and get a BRIX rating.  BRIX is basically the sugar content in a solution.  Unfortunately for this applet, it didn’t recognize any tomato I scanned :(.  I scanned my unripe fruit and the store bought roma tomato.  I provided feedback via the app to the developers.  I hope there will be an update soon.

Fruit and Vegetable applet

This applet lets you estimate the carb content in the fruit or vegetable.  I used this on my unripe tomato growing in my greenhouse.  It came up with 5% carbs.

I snapped a picture of the fruit and I’ll be able to check later for changes.  I’m exciting to see what happens over time with these readings.  Here’s the “spectral fingerprint” from my phone (5/10/17):

For comparison purposes, I scanned a store-bought roma tomato.  The readings were identical from what I can tell and I’m not sure exactly what that means yet, but another scan of my greenhouse fruit when its ripe might reveal something.

 Conclusion

The SCIO is pretty fun.  I foresee it will be very useful moving forward to help identify plant and fruit quality.

Grow Lights 101: What kind of light matters

If you are following my youtube channel, you’ve probably already seen this.  If not, here it is again.  This is an introduction to grow lights where I cover what are the important aspects of light relevant to plants and compare a couple different types of grow lights (T5 vs LED).

To sum things up, T5’s are cheaper out of the gate.  But LEDs are more bang for the buck in the long run.

I am building LED grow lights for anyone interested.  Head on over to the new tripzero.io store.

10W Far Red LED Grow Floodlight

Far red (740nm) might be very beneficial to tomato production.  Studies have shown that it can help produce longer “hypocotyl” (the seedling shoot that becomes the stem) by just blasting the plant with 12 minutes of light at the end of the day (16hr photoperiod with T5 lights).  Other studies claim that far red can help reduce or eliminate sucker growth.

Parts:

Total cost: $33

 

50W Blue grow light build for seeding

According to my research, blue light is primarily used in plants for vegetative growth.  It follows, therefore that blue light is best for seedlings and clones that you want to grow in size quickly.  Is this logic sound?  I’ll experiment, and report back.

This video is a live build video where I make a $54 dollar blue-only grow LED floodlight.  Note that at the time of posting, the floodlight price has already changed on Amazon.  You can typically find these on ebay for a reasonable price.

Materials:

Total Cost: $54

LED Stair Lights


Stairs are pretty boring, but they don’t have to be.  I convinced my loving wife that she needed stair lights.  I put the project off for over 6 months while I’ve been greenhousing, but now that that project is more completed, I have time to get back to house projects.  Let’s get building.

Building

First, we will use the APA102 lights.  These are individually controllable.  They are the same lights we’ve used in our ambilight project with the minnowboard max.

I came up with a simple light protocol that supports “instructions” rather than just raw pixel data so it’s fast and light.  I’ve published the library here on github (be sure to use it with my forked Adafruit_dotstar library which has the “driver” for the LightProtocol).  I loaded that onto a particle photon, combined with an level shifter, and powered the thing with a Drok DC-DC power supply and a 24V 5A AC-DC adapter.

To install the LED strips on the stairs, I picked up several aluminum channels from superbrightleds.com and the corresponding “frosted” covers.  To stick the channels on the stairs, I used 3M automotive double-sided tape.  The aluminum can be drilled and screws can be used to mount, but I didn’t do that.  I used a simple dremel to cut the channels where I needed to.

I’m hiding the photon and the power supply in the closet which is adjacent to the stairs.  I cut a small hole in the wall on the closet side and put a 4 wire, 14AWG cable through the wall.  This is low-voltage (5V), so you don’t need an electrician or a expensive permit to install inside the wall… at least in my area.  On the other side, I combined a 2 socket “keystone” faceplate with a couple two wire speaker jacks.  This doesn’t look half bad.

Effects

Using the same python library as the minnowboard max ambilight project, and adding a “driver” that can speak our “LightProtocol” that we’ve installed on the particle photon, we are able to to complex effects and themes on the desktop and change the lights over wifi.

I have three effects coded up: “Chase”, “Random Rainbow Transforms”, and “Rainbow”.  Check out the video for how these effects look on our lights.  What other cool effects can we do?

 

Smart Grow light

The first law of plant growth is light.  Typically this light comes from the sun at an incredible intensity of up to 100,000 lux (lm per square meter).  Different plants have different sunlight requirements.  Typically these are categorized as “full sun” or “partial sun” plants.  Full sun plants require at least 6 hours of direct sunlight per day (30,000 – 100,000lux).  Partial sun plants need about 3 – 6 hours.

Winters in the Oregon Portland area are dark.  So dark that humans suffer from the lack of light.  This condition is known as Seasonal Affective Disorder.  Most of this period is dominated by overcast clouds which reduces the light to about 1000 lux.  That’s 3% of the minimum  light required for full sun plants.  To grow food all year round, we are going to have to compensate for this lack of light.

There are many different types of artifical lighting.  The most power efficient of which are LEDs.  The problem with LEDs is that they typically have a very narrow range of light.  To make white, LED’s combine 3 diodes with some red, green and blue.  The human eye sees these three as white.  It cannot perceive the gaps in the spectrum that the LEDs do not transmit.
White LED from Cree (TM) http://www.cree.com/~/media/Files/Cree/LED%20Components%20and%20Modules/XLamp/Data%20and%20Binning/XLampXTE.pdf

White LED from Cree (TM)
http://www.cree.com/~/media/Files/Cree/LED%20Components%20and%20Modules/XLamp/Data%20and%20Binning/XLampXTE.pdf

Other light sources cover a lot more of the light spectrum.

Example of a LED spectra

Given that lights light incandescent lights have a wider spectrum, why use anything else?  The answer is, plants don’t need all that light.  Plants use light in the blue and red spectrum and reflect the green and yellow spectra.  That means that any grow light that includes these wavelengths are wasting energy.

LEDs for growing

LEDs for growing do not have the green diodes.  This makes LEDs, which are already the most efficient artificial light source available even more efficient for growing.  While you can purchase may LED-based artificial light solutions, I set out to build my own in such a way that I can control the amount of light my plants get based on sunlight.  If there is full sun, I don’t need to activate the lights.  If there is less than full sun, I can adjust the brightness of the LEDs to compensate.

I found some grow LEDs on ebay for a decent price from the seller sungrowled.  These are 30W but I have also used the 50W variants.

IMG_20150905_160134855

To keep the LEDs cool, I picked up a 36 inch aluminum strip and mounted 6 LEDs evenly spaced on the surface.  I used thermal adhesive to mount them.

IMG_20150905_160250763

On the ends of the strip, I drilled a 3/8″ hole and attached something I could attach to some rope to hang.

IMG_20150905_155443572

I then wired up the LEDs in parallel.

IMG_20150922_231445339

The aluminum strip helps spread the heat, but probably will still get to hot.  To increase the surface area for cooling, I used the thermal adhesive to attach some aluminum heat sinks to the top of the strip opposite of the LEDs.  This unit will be passively cooled.

IMG_20150922_231548752

Power

Six 30 Watt LEDs run at a total of 180W.  Amazon has a bunch of adjustable current/voltage power supplies from Drok.  Oddly, the power supply ratings seem to go from a few watts to 100W  and then jump to 300W and then to 600W.  Really?  No 200W?  Sigh.  I grabbed the 600W power supply version.  To supply the AC power, I picked up a 300W 24V AC to DC converter.

What’s nice about the Drok power supply, is that I can supply constant voltage AND constant current.  LEDs have an upward sloping current draw relative to the forward voltage.  This means if you oversupply voltage, it’ll draw enough current to burn out.

Typical ways to drive LEDs include supplying a constant current, so that you can safely over drive the voltage, a resistor which will also limit the current, or constant voltage.  If you never go over the volts, the current draw will be just fine.  With this Drok boost converter, I have POTs that I can dial both.  I started at 24V and slowly adjusted both the current and volt POTs until I read about 170 Watts on the kill-o-watt.  Waddayaknow!  It worked!  It’s really… really bright too!

IMG_20150905_185538582

To finish off the light power, I put both the Drok buck boost converter, the AC-DC power supply, a couple fans, and  Drok buck 12 power supply in a nice case and mounted it in the redhouse.

IMG_20151003_181251416

IMG_20151003_181241613_HDR

Light Controller

At the moment, our lights are dumb.  They turn on and off manually and do not care about sun.  We need a smart controller.  I used the Particle Photon, which is a cheap wifi-enabled MCU that’s only $20.  I’ve been using the photon a lot lately.  This is actually the third unit inside the Redhouse and I plan on using at least one more.  We also need a sensor to measure how much light we are getting from the sun.  I had an SI1145 sensor breakout from adafruit laying around so I used that.

To control the LED brightness, I use a MOSFET.  By modifying the signal’s pulse width on the MOSFET gate, I can control the voltage allowed to pass through the MOSFET.  I wired everything up, wrote a few lines of code using the Particle builder and this is what came out:

IMG_20150922_230801671

The light sensor won’t work without light, so I need a case with a clear lid.  I found a waterproof project case on amazon that had a clear lid.  Perfect.  I installed the board in the case, wired it up, and installed it in the Redhouse.

IMG_20151003_181301893_HDR


Conclusion

How much did this cost me?  I try not to think about it, because I’m not building to necessarily save (although, I believe I am).  Here’s a list of components and their costs:

LED Light:

  • 6 x 30W LEDs –  ebay seller sungrowled – $77
  • Aluminum strip and screws – home depot – $15
  • 24V AC-DC 350W converter – Amazon.com – $35
  • Drok 600W buck boost converter – Amazon.com – $21
  • 5 x aluminum heatsinks – Amazon.com – $25
  • Power enclosure – Amazon.com – $30
  • Grow light hanger – amazon.com – $10

Controller:

  • Particle Photon Wifi MCU – particle.io – $20
  • SI1145 visible light sensor – adafruit.com – $10
  • MOSFET n-channel – sparkfun.com – $2

Total: $245

For comparison, you can get a nice (but dumb) 160W grow LED for about $350.  No wifi/internet control.  No smarts.

I think I saved some bucks and get more features.  Here’s the final product growing some nice Roma variety tomatoes:

IMG_20150924_201416771

Do they work?  Early indications suggest they do.  The plants under the light look more lively.  One plant NOT under the light has a livelier branch under the light where the other branches are not as lively.  So, pending future observation, I conclude, it works.  I only have 2 more of these to make :).

Redhouse – System Test 1

I may have built up my own excitement, but the redhouse (geo-thermal “smart” greenhouse) is really coming together.  In theory, I can put my overgrown bathtub tomato plants tomorrow.  This makes me extremely excited.  On to the test.

This test will see if the pump, the piping in the beds and the irrigation system all work.  These are the questions this test was hopefully going to answer:

  • Will the pump have enough pressure to water both beds?
  • Will the holes drilled in the irrigation PVC spray acceptable water?
  • Are there water leaks?
  • How much can I water with a 7 gallon reservoir?

Most of the answers can be found in this video:

The short version of the test is:

  • Enough pressure? Yes
  • Holes? Acceptable
  • Leaks?  Yes.  Around the valves and in the pump box
  • 7 gallon enough?  Maybe not.

The reservoir is the biggest disappointment.  I quickly ran out of water in the 7 gallon barrel during this test.  Further, it fills up slower from the rain water store than I can put into the soil beds.  This will likely limit my watering to only a couple minutes at a time.  I will also have to be careful not to run out of rainwater.  If I need 14 gallons per day of water, I’ll only have 7 days in the store (two 55 gallon tanks).  It is possible to use my brothers two barrels.  That will give me a couple weeks and worse case I can fill up the tanks with house water.

Next test should be hooking up the controller.  We should be able to start getting some measurements to see the benefits of the geothermal system.

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.

Building the Geekiest Home Theater: TV wall mounting

My room TV is working great.  I’ve got the minnowboard max hooked up to some ws2801 LEDs and acting as a DLNA renderer.  Since my last post on it, I’ve also paired up my PS3 six-axis controller and have been using it as a mouse.  I have other cool ideas planned for it, but before those are finished, I wanted to get a Max-based system on my other TV and work it into a home theater setup.

First thing I have to do is get my TV off the floor.  The base for the TV broke, so when we moved we decided to mount it on the wall.  We found an “articulating” wall mount that looked like it would meet our needs:

What I like about this system, is that it has an open area on the base mount on the right and left that’s perfect for a double gang box.  So I grabbed one of these

It fit very nicely in the open area:

2015-04-18(2)

2015-04-18

I think it looks really clean -especially after I zip-tie up those cables!

I also wanted to add some ambilights to this setup like I did my room TV.  However, I want to do something better.  Enter, APA102.

The APA102 is similar to the older WS2801 in that it’s an individually addressable LED strip that supports 24 bit color.  But that’s about where the similarities end.  The WS2801, shown on the image below on the right, is a larger chip that takes up valuable space.  You can only typically find strips of 32 LEDs/meter of the WS2801 flavor.  The APA102 (shown on the left), however, have the IC built right into the LED.  This allows up to 144 LEDs/meter.

2015-04-16

The protocol is very similar to the WS2801.  You send an array of bytes, but in 32bit segments.  The first 32bit segment must be all 0’s.  The next byte is for brightness, usually all 1’s, and finally the 3 bytes is the data.  I updated my python light library to support the APA102 in only a few minutes.  Here’s basically the meat of the code:
data = bytearray()

#startframe
data += chr(0x00) + chr(0x00) + chr(0x00) +
     chr(0x00)

for rgb in ledsData:
data += chr(0xff)
# apa102 is GBR because THINGS
data += chr(rgb[1]) + chr(rgb[2]) + chr(rgb[0])

#endframe
data += chr(0xff) + chr(0xff) + chr(0xff) + chr(0xff)

self.spiDev.write(data)
The fun thing was discovering that it uses GBR color format.

Mounting the LEDs

Instead of mounting the LEDs on the back of the TV, I’ll be attaching them to the wall.  I’m using the same aluminum brackets I used with my last LEDs.  However, this time I’m going for a flat black strip 60LEDs/meter.  4 total meters of it for a grand total of 240 LEDs.  To power them all, I need 80Watts @5V.  This turned out to be a problem.  I was only able to find a 5V power brick that was 50W.  Not good enough.  After some more searching, I was able to find this on amazon:

This can supply up to 100W @5V which should be more than enough.  The problem is… where am I going to put this?  It’s too large to fit in a double or triple gang.  And if I run a cable through the wall for this, I’m guaranteed to lose a bit of voltage (4-8% depending on which wire I use).  I also need a place to put the Max.  After a trip to the Home Depot, i found what I need.  It’s an “telecommunications” box 14″ by 14″.  It fits and mounts between two studs.  Turns out this was almost perfect.  I cut a hole in the laundry room, right behind the TV, to the size of the box.  One thing I didn’t plan well, was that the double-gang box for the TV prevented both being in the same spot.  To fix this, I just cut a large hole in the box to let the gang box come through.  This ends up being advantageous because it’s so easy to wire and rewire from the box instead of removing the outlet.

IMG_20150418_170128295

I have plenty of room to mount a max in the middle.  There’s also a nice looking cover that screws shut to protect the insides from little hands:

2015-04-18(3)

That’s it for this part.  Next part I’ll continue the adventure building a home theater including mounting the LEDs, the Max and speaker system.