Indoor Growing Project – Part 6

This post is part of a multi-part series on my indoor growing. If you want, you can start from Part 1.

Not too much of an update this week, other than the plants were repotted because they were starting to outgrow their starter boxes.

I bought some 4″ pots to start with to take the pending doom plants out, but then I ran out of potting mix:

2018-03-25 22.07.39.jpg

That was last week. This week I got my hands on more potting mix. I used the starter mix to re-pot the previous ones, but after some reading, it seemed to make more sense to use a mix that was specially formulated for indoor plants. So this week I just repotted them all, again:

2018-04-01 21.27.57.jpg

The plants are starting to improve overall. A few of the leaves started to look a bit sad, so I suspect they were running out of nutrients in the starter mix. Hopefully this new mix will introduce more nutrients to help them grow better. I’m also thinking of getting some stakes for some of the more aggressive plants that aren’t able to stand up too well.

I haven’t forgotten about the sensors/electronics work. Last weekend involved putting some pieces together before me realizing I was missing some other bits to help put together. This weekend was some emergency yard work. So more electronics work will have to wait until next weekend. Some upfront spoilers I’ll note here is that I have thought about an automatic watering system for these, with some peristaltic pumps, controllable over I2C via the raspberry pi.

Stay tuned!

Posted in Uncategorized

Indoor Growing Project – Part 5

This post is part of a multi-part series on my indoor growing. If you want, you can start from Part 1.

It’s been a while since I last updated, since life and such has gotten in the way. If you recall one or two posts ago, I acquired some sensors to try and wire up to monitor the greenhouse “health” (where the greenhouse = my front porch area) so that I can have metrics and graphs for such.

I started writing code for the sensors about a week ago. The idea I had was to use a small embedded to track sensor data and periodically either save it to a database, or publish it to some external metrics tracking system. Normally people would use an Arduino or similar, but I wanted the additional complexity of external API calls, having maybe a local webserver/page that shows data, and also the database storage, so that meant I needed something a bit bigger, and what was readily available to me was a Raspberry Pi 3.

The sensors I got all use the I2C bus to communicate, which luckily is provided with the pi-specific driver i2c_bcm2835. However since I’m writing my own userspace code, I wanted the i2c interface a bit more readily available to develop on. Fortunately this seems possible through the i2c_dev driver, which exposes the bus in /dev/i2c-?.  For some reason my sensors show up in /dev/i2c-1, out of the 3 possible interfaces (3 possible busses?):

Screen Shot 2018-03-25 at 1.11.29 AM.png

You can rudimentarily poke at these interfaces using the i2c-tools package:

Screen Shot 2018-03-25 at 1.12.23 AM.png

Specifically you can use i2cdetect to detect devices on the bus:

Screen Shot 2018-03-25 at 1.11.16 AM.png

I have my BME280/CCS811 combo sensor hooked up, which shows up as two I2C devices; the BME280 sensor is at address 0x77, while the CCS811 sensor is at address 0x5b. So now I needed to figure out how to write code to talk to I2C bus to extract data out of these sensors.

Common sense (i.e. my previous interactions with writing code for TPMs) told me that I probably just needed to open the file interface and shuffle through some bytes, but the question was how. The arduino libraries provided by sparkfun were not very helpful, likely because there is a different method of interaction with the arduino i2c bus than in linux.

I googled “i2c linux” and came across this page which gave some helpful information: https://elinux.org/Interfacing_with_I2C_Devices . It appears the magical formula for interacting with I2C devices in Linux is as follows:

  1. Open the file, acquire file descriptor
  2. ioctl the file descriptor with I2C_SLAVE with the address of the target device
  3. read/write as normal (probably device-specific)

Now came to the writing the code part. I could write this easily in C, since that is what I am most familiar with, but the overhead of having to deal with C libraries for things like writing to databases or interacting with webservers promised a bunch of pain. I also really disliked writing Makefiles. So I took this opportunity to learn a new language that I had heard about recently, called Rust. Overall my first impressions are that while the syntax and memory management system takes some getting used to, it’s actually fairly easy and fast to get started, and the compiler is pretty helpful at pointing you at the right direction when you’re stuck. If you’re an established programmer, you should probably be able to pick up the language within a few days.

I haven’t gotten terribly far yet, but I do have some working code to at least extract a temperature for now:

Screen Shot 2018-03-25 at 1.26.36 AM.png

That’s all for now. If you’d like to follow along on my coding expeditions in rust for the rest of the sensors, all of it is on my github: https://github.com/worldwise001/greenhouse .

Continue on to Part 6.

Posted in Computers, Green Things

Generic update – when things go wrong

I am trying to write posts on a weekly-ish cadence, but sometimes I miss that SLA. This past weekend is an example of that where I didn’t really get too much stuff done; however that’s okay!

I’ve decided to take this opportunity to talk a little bit about what I have managed to get done, that’s in bits and pieces, but also a bit about what has gone wrong lately. I personally think sometimes there is a huge focus on talking about only positive or successful work, so sometimes we need to talk about negative or failed work as well.

So, the good:

The plants are still growing. I’ve stopped taking pictures of them really. The mint and rosemary finally sprouted, as did the hot peppers, so I am basically at 100% yield for each kind of plant I planted. I have all the pieces for the electronics to monitor them too, but I’ve just been very tired recently.

I took a class on how to bake bread! Specifically it was this class at The Mill in SF. I got to take home some starter sourdough culture in addition to a finished dough that I could bake myself. The culture has been named Steve.

2018-03-08 10.18.58

growing steve

2018-03-08 22.56.13

steve has been fed

I finally finished setting up Linux on my laptop which should make it a tad easier to flash SD cards for use in the raspberry pis.

I have some new recording cameras because some friends of mine have expressed interest in watching me put things together. I can’t guarantee the best watching experience for you, but hey, learning is fun.

The bad:

When I baked my dough I did not have a dutch oven nor a pizza stone; I did have a cast iron pan which sort of did work okay, but I had nothing really to cover it, and the foil hat I made was too shallow which impeded the oven rising upon baking. I don’t have a picture of this (I felt kind of bad about it), so you have to take my word that it didn’t quite come out okay. It still tasted good though.

I haven’t started talking about my companion cube mini compute cluster yet because! I don’t have all the parts for it yet. The motherboard has been taking ages to ship from a Newegg third-party seller; it’s been three weeks and I’m in contact with the seller, but I’m crossing fingers that it will eventually arrive. Since the motherboard is the largest component, as much as I could try and model around it in SketchUp, it would be nice to have the actual physical motherboard to measure things.

My garlic plant got mold on the surface of the soil! Thankfully it didn’t spread to anywhere else, so I dumped out the soil and repotted and hopefully it’s going to be fine. I’ve also discovered the pots I got on sale from the local grocery store have no drainage capability, so I probably will have to drill out a hole on the bottom.

As much as the 3D printer worked really well for the sample print, it turns out it’s actually way harder than I thought to get 3D models to slice correctly to be sent to the printer. Proper slicing appears to be critical for a good print (on a cheaper printer). So far I have discovered I am really good at making nice plastic coasters (i.e. printing the bottom leveling raft before the main model is being printed) but that’s about it. On 3D printing days, I’ll probably try and stream the experimentation process so other people can follow along to see what works and doesn’t work.

2018-03-08 23.17.05

attempt at printing something that involved concentric rings

2018-03-08 23.17.24

a nice coaster I guess

That’s all for now; hopefully there will be more updates this weekend!

Posted in Uncategorized

New 3D printer!

I made a questionable purchasing decision: I decided (after several years of deliberating and trying to self-justify the decision) to purchase a 3D printer for projects that need small weird bits that may not be easily found somewhere.

Upon recommendation from my brother, I bought the MP Mini Delta 3D printer from Monoprice for ~$160:

It ships from LA and so if you’re in the state of California, it can arrive in 1-2 days for reasonably cheap shipping. According to the manual, the printer supports multiple temperatures, so you can use ABS or PLA filament. I bought 1kg of 1.75mm PLA filament from Amazon for about $30.

It appears to be self-calibrating, which is really impressive to me for a cheap printer. I decided to print out the test model they had on the packaged SD card and took some pictures of the progress. It took just over an hour for printing after it had gotten to proper preheating temperature.

2018-03-03 12.25.37-1.jpg 2018-03-03 12.46.22.jpg

 

2018-03-03 13.03.07.jpg 2018-03-03 13.03.25.jpg

2018-03-03 13.27.20.jpg 2018-03-03 14.30.59.jpg

2018-03-03 14.40.23.jpg

Overall I am pretty happy with the results and ease of use of this device. The quick-start guide maybe could be a bit better and include some pictures for someone who is a complete beginner such as myself. But if you want a cheap small printer that has great results, I think this qualifies as an excellent starter printer. I am very impressed with how much 3D printing technology has overall improved over the past decade!

Posted in DIY

Indoor Growing Project – Part 4

This post is part of a multi-part series on my indoor growing. If you want, you can start from Part 1.

Because there is a fairly small window in the porch area where my plants live, it seemed to make a bit of sense to get some grow lights. Apparently there is quite a bit of variation on what kind of grow lights you could get depending on what you’re favoring, and there’s a whole rabbithole one could go down for this, but I decided to skip all that and just pick the top result on Amazon searching for “grow lights”:

 

These arrived yesterday so I decided to put them to work through the day today to see how it would fare. Despite what the reviews say, these lights are fairly bright. I had some hesitancy that it might make a noticeable glow to my neighbors and I was right, since this is what I came home to today:

2018-03-01 20.49.53.jpg

I swear my house is not haunted.

In person they also seem fairly blinding:

2018-03-01 20.51.18.jpg

I’m trying to figure out the best way to not hurt my eyes too much going past this area, and I have some ideas of maybe walling off this section with some kind of two-way mirror material.

The plants themselves seem to be doing okay, having straightened up a bit after leaning over for the sun the past few days:

2018-03-01 20.52.27.jpg

That’s all for now. The parts from Adafruit and SparkFun all arrive tomorrow, so this weekend should have some starter posts as I try and get the sensors to work.

Continue on to Part 5.

Posted in Green Things

Indoor Growing Project – Part 3

This post is part of a multi-part series on my indoor growing. If you want, you can start from Part 1.

I have decided that I need more science in this project, so it’s off to SparkFun and Adafruit for some sensors. They’ve just been ordered, so updates to come as I put things together and hook them up. Here’s a sneak preview of what’s to come.

SparkFun Environmental Combo Breakout – CCS811/BME280:

14348-01.jpg

Chirp! The Plant Watering Alarm (I am not going to have it chirp at all):

1965-01.jpg

SI1145 Digital UV Index / IR / Visible Light Sensor:

1777-00.jpg

I have bought more than one of some of these, and will be hooking them all up over I2C to log to a spare Raspberry Pi 3 I have lying around. For now I have to wait until the order arrives.

As tempting as it is to buy a $80 weather kit, I have no means to set that up for now and so it is out of scope for this (admittedly restricted to indoors) project.

Continue on to Part 4.

Posted in Computers, Green Things

Indoor Growing Project – Part 2

This post is part of a multi-part series on my indoor growing. If you want, you can start from Part 1.

It’s been a few weeks since I started planting. If you recall, I planted 10 herbs, 2 peppers, chives + scallions + garlic, and 2 cat plants.

Here are some progress pictures as I’ve checked in through the weeks.

2018-02-16-09-33-18.jpg

2018-02-16 20.55.20.jpgThe garlic really went to town after the first day or so of being in the soil.

2018-02-16 20.55.16.jpg

Cat grass started sprouting basically immediately.

2018-02-17-13-32-17.jpg2018-02-20-10-53-42.jpg2018-02-25-14-03-43.jpg

2 weeks of sprouting in the main tray. All except the mint and rosemary sprouted, not sure why. I also got really low yield with sage (only one sprouted), and medium yield with dill. I was surprised at how quickly and able the parsley was able to sprout, considering the packet said it would take 21-28 days to germinate. I may retry the mint and rosemary at a future date. More research is needed here.

And finally, an update on the garlic + friends:2018-02-25 14.03.00

You may have noticed that this has been growing primarily on my kitchen table. The problem with this is the sunlight is a bit inconsistent; although there is a south and west window available, because of the nearby buildings, there is not enough direct sunlight coming in. The west window has some nice direct sun, but is partially obstructed by trees. The other problem is that I don’t get to use my kitchen table.

The next step is to move this out into the porch area, and set up a monitored mini greenhouse.

2018-02-25 21.50.53.jpg

This also gives me the opportunity to use some electronics to monitor light level, temperature, and humidity, and maybe even take some timelapse clips to track growth.

There will be more updates through the week; stay tuned!

Continue onto Part 3.

Posted in Green Things