Sunday, January 29, 2017

Pura Vida


In an intro college Spanish class, I had a project to create a travel brochure on a Latin American country, and "sell" it to the rest of the students.  I was arbitrarily assigned Costa Rica.  I learned that they have a ton of flora and fauna, free public education, a strong economy supported by tourism, and that they produced an astronaut in the 80's.  I developed a mental image of the country as paradise, and promised myself that I'd visit someday.  After letting that image bake in my head for almost a decade, I finally went there, and I'm thrilled that the experience met my idyllic expectations.

Compared to my other international trips, I felt at home in Costa Rica.  The smaller timezone difference might have something to do with that, but I think the bigger factor was being able to speak the language.  I refreshed my Spanish skills with a 94-day Duolingo streak before we arrived, and I leaned heavily on my ability while we were there.  Being able to have nuanced conversations with locals really makes the world feel like a smaller place.


The country is tiny, but it's overflowing with natural beauty.  Costa Rica is the convergence zone of several ecosystems, so there's a lot of variety between terrain and the animals that live there.  The Costa Rican people - Ticos - are aware that their environment is special.  It's hard to go very far without hearing the colloquial term "pura vida" which kind of means "hakuna matata."  The weather is warm year-round, and the availability of fresh ingredients makes the local cuisine simple and delicious (Felicia fell in love with the casados - plates composed of rice, beans, salad, fried plantains, and some kind of protein).  It's easy to understand why the Ticos celebrate just being alive.


Arenal is an active volcano in the northern central valley.  It last erupted in 1968.  We were drawn there by the mountains and rainforests, and the plethora of activities that are offered by tourism companies.  On our first day we went swimming under the La Fortuna waterfall, then took a zipline tour through the canopy hundreds of feet above it.  The next day, we shared a raft with a German couple and toured the class III whitewater of the Rio Balsa.  We also learned how to process sugarcane on a local farm, and took shots of the sugarcane moonshine.  We spent most of our third day in Arenal hiking the Cerro Chato trail.  Cerro Chato is a smaller volcano in the shadow of Arenal.  The hike was rugged and challenging, but we were rewarded by the lake that fills the crater on top with colorful mineral water.



the trail to Cerro Chato
we made it to the crater!
Arenal is basically Death Mountain, minus the Gorons
The lava beneath Arenal provides heat for several hotsprings. We visited a different one each day we were there. My favorite spot was Rio Tabacon, which is a 100+ degree river that flows from the volcano into the expensive resorts nearby. It's kind of a hidden place that you can only get to if you know where to pull over on the side of the highway, but the search is worth the alien experience of bathing in a heated river.
Arenal was an amazing way to explore the inland volcanoes and rainforests, but Costa Rica is also renowned for its beaches.  We decided to visit a place called Drake Bay (named after Sir Francis Drake) on the southern Pacific coast.  We decided on Drake Bay because of its remoteness. Recent travels have taken us to Paris, Tokyo, New York, Los Angeles, and San Francisco, and we were ready for a change of pace.


There are pros and cons to visiting an isolated place.  The biggest downside was the difficulty in getting there.  We spent most of one day driving, flying, shuttling, and boating from Arenal to into Drake Bay.  On one hand, I missed the efficiency of Japan's bullet trains.  On the other hand, there's a real sense of adventure flying at low altitude on a tiny plane, and riding a small boat down a winding river in order to reach your destination.  We found lodging at a lovely B&B just a short walk up the dirt path from the boat landing.


Corcovado biological reserve is about an hour's boat ride away from Drake, and it's an animal lover's dream.  The reserve is heralded as the most bio-diverse place on Earth.  In one day there, we saw five different species of monkeys, two-toed and three-toed sloths, coatis, acutis, tapirs, a bull shark, and lots of exotic birds including toucans and macaws.


On our last day, we took a snorkeling expedition to the warm waters of Cano island.  We swam with turtles, sharks, sting rays, and tons of other exotic fish.  We took a midday break on the crabbiest beach I'd ever seen.  A full day of boating and snorkeling left my back with a wicked sunburn, but thankfully there are few better places to nurse a sunburn than Seattle in January.

Costa Rica didn't feel like the most foreign place that I've ever visited, but it was the best vacation I've ever taken.  When (not if) I go back, I'll make it a point to visit the Caribbean coast.  I'd love to visit a turtle sanctuary, and apparently rafting the Sarapiqui river is a must-do.  I've also been told by multiple people that the food on the Caribbean side is incredible.  The only question is, who's coming with me?

Pura Vida!
TGIB

Sunday, September 11, 2016

My Summer of Peppers

I've wanted my own greenhouse ever since I worked at the Controlled Environment Agriculture Center in college.  (Did you know my tomatoes were featured on the Martha Stewart show?)  I learned some basic green-thumb skills on that job, and as an engineer I also identified that many day-to-day tasks were simple enough to be automated.  The intersection of plants and engineering has piqued my interest for years, and it's been rewarding to finally dive into it.
I planned this project as a pilot program for future growing adventures.  My goals were:
  1. Take some plants on the journey from seed to harvest
  2. Build some hydroponic systems, and compare the experience to growing with soil
  3. Record greenhouse operational data for analyses and visualization
  4. Understand how software interfaces with electronic devices, then actually automate some tasks
  5. Build modular components which could be reused in future projects
I wanted to understand the finer points of plant cultivation and agriculture methods, and how I could augment them with my software skills.  To do this, I had to try it out at least once without knowing what I was doing (I call this knocking out the hoodrats).  The experiment would be successful whether or not it produced a big yield.  It's simply a nice bonus that I got a bountiful harvest of peppers :)

I chose these seeds as the basis for my trial.  I started them in peat moss cubes and kept them in a covered tray under a grow lamp for a few weeks, using a 20/4 on/off cycle for the light.  This process was mostly hands off, which gave me time to prepare their transplant habitat.

I planted the peppers in two batches.  The first batch was 16 plants (4 of each type).  The second batch was 36 plants (9 of each type).  I started the second batch about a month after the first.  This gave me time to learn from the first batch and correct course for any mistakes I made.  Out of 52 plants, 5 seeds didn't germinate.  Of the 47 that did germinate, 2 didn't survive to adulthood. 

The first batch was started under the LED shown in the picture to the right.  The second batch needed a bigger light, so I opted for something different.  I didn't notice if either lamp outperformed the other with respect to plant growth.  I imagine the LED is more power efficient, especially when running 20 hours a day for a few weeks straight.


I placed the tent directly against the house because I needed access to water and electrical.  The location wasn't ideal from a sunlight perspective, but the summer days in Washington are so long that just the afternoon sun is sufficient.

I needed room for a few dozen plants, and also a dedicated space for my electronics.  Fire-safety and dryness were my biggest concerns for the electronics, so I dedicated one corner as a plant and water free zone.  Another corner was used for the hydroponic systems, and I used the other half for potted plants.  I made sure to leave enough space to move around in the middle.

I built hydroponic chambers inside of containers that were lying around the house.  Some old styrofoam boxes were perfect for deep water culture, while a 5-gallon bucket was used for an aeroponic reservoir.  I picked up some pumps, airstones, tubing, net pots, clay pebbles, and spray heads as construction materials.  I also needed a power drill and some hole saw attachments, which I didn't previously own.  I wrapped the containers in black trash bags in order to keep light out, which prevents algae from growing in the nutrient solution.









15 of my plants were grown hydroponically, while the other 32 were planted in pots with soil.  I installed a drip irrigation system for the soil plants.  I used a Y-splitter to add an additional tap to my garden hose connection, then I added a backflow preventer, a pressure reducer, a mechanical timer, and a 1/2 inch tubing adapter.  1/2 inch tubing runs from the faucet into the greenhouse, then flexible 1/4 inch tubes run from the mainline to each potted plant.  Each drip line is capped with a 1/2 GPH or 1 GPH emitter, depending on the size of the pot.

 You can't beat soil for "set it and forget it" farming.  Mother Nature can attest to that.  Hydroponic methods give you more granular control over nutrient delivery, but they require more effort.  If you micromanage your plants in a hydroponic system, you can create an interface for sensors and devices, which can then be used to automate some of the predictable maintenance tasks.

I wanted to explore automation with respect to watering, nutrient delivery, and environmental control.
I used a PC battery backup as the power source for greenhouse electronics.  It provided me with 10 outlets, 5 of which could survive power outages for a couple hours.  This was a safety measure for the control computer, and for one of the pumps which runs on a two minute cycle.

My electrical components are two submersible pumps, two air pumps, a space heater, an oscillating fan, and a raspberry pi.  The water pumps are running on timers, while the air pumps are on 24/7.  The heater is controlled by a thermostat.  I turn on the fan and open the windows if I know it's going to be a warm day.

The raspberry pi is connected to my home network via wifi, and connected to a webcam and an arduino board via USB.  The arduino is connected to light, temperature, and humidity sensors.  Once per minute, the arduino provides environmental readings to the pi, and the pi logs the data to network attached storage.  Communication between the arduino and raspberry pi is done using the pyserial library for Python.

I use another raspberry pi as a web server.  The web server reads from network attached storage and serves pages to visualize the data.  The web application was built using Spring MVC and runs inside a Tomcat container.  Routing is handled by Nginx running on the same machine.  Data is rendered in the browser using D3JS.  I opened up HTTP requests to the web server on my router, and I use NO-IP to access it over the internet using a custom domain.  To see today's dashboard, go to tgibriday.noip.me.  To see the dashboard for a specific day, use a URL like tgibriday.noip.me/greenhouse/dashboard/8-4-2016.  To watch my plants grow in real time, go to tgibriday.noip.me/cam.



I wanted to keep things iterative, so the first version of the control system was only used to monitor and record data.  I kept the electronics on isolated circuits, controlled by individual timers and switches.  Version 2 was to use the arduino to control the pumps, fan, and heater.  An integrated system provides a few benefits:
  1. Less hardware needed (substitute timers and thermostats for a relay board)
  2. More data is recorded, which leads to better performance analysis and improvements
  3. Overrides to the system can be controlled remotely over the network

I built an electronics control box inside of a plastic container.  The control pi and arduino sit inside the box along with a relay board.  The arduino powers the relay board and closes or opens circuits when commanded by the pi.  Each circuit on the relay board is connected to an outlet on the outside of the box, and is powered by an extension cable which connects to the battery backup.  My controllable outlets were a little extra work compared to cutting the power cords of my appliances and wiring them into the relay directly, but I think they'll work out in the long run when I reuse the control box for other projects.

I've constructed the control box, written most of the software, and tested it a few times, but I don't think I'll get it installed before the peppers are done growing.  Things are running smoothly now, and I'd rather not "fix" something that isn't broken.  I'm also not confident that my electrical work meets modern safety standards, especially inside a warm and humid environment.  Thankfully I designed my components with the future in mind, so I can let the hub of timers and gadgets finish what they started this season while I prepare the integrated box for next season.


A greenhouse is meant to provide ideal conditions for plants, but it also provides ideal conditions for pests.  At first my pest problem was localized to a couple plants, so I optimistically ignored it.  When the damage started to spread, I kicked myself for being foolish and decided to take action.  This was is one of the most challenging parts of the project for me.  I couldn't catch the buggers in the act, and I was unable to identify them by the damage patterns, so I'm pretty much shooting in the dark trying to purge them.




This stuff slowed the bugs down, but didn't stop them
After a few weeks of waiting (and chasing the ghosts of bugs), flowers started appearing.  In nature, flowers mostly get pollinated by bees and butterflies.  I don't have any bees, so I had to pollinate the flowers by hand.  I put on some baby-making music and grabbed some cotton swabs, and then things got intimate.  It was super exciting when the first little fruits started appearing.  I'm really happy with the quantity that each plant is producing.



My alpha jalapeno plant has several dozen peppers on it!
Throughout the course of this journey, things didn't always go as smooth as planned.  I needed to calibrate the watering schedule for my felt pouches.  The Raspberry Pi shutdown a couple of times due to high humidity.  The electronics and hydroponics systems didn't turn out exactly as designed.  Other things, such as the irrigation system, would have taken much less effort had I bothered to plan at all. Mistakes and shortcomings are OK though because that's how we learn, and at the risk of sounding cheesy, my biggest harvest from this greenhouse was an education.

I'll keep the plants alive as long as they're bearing fruit.  I'm not sure what to do with all of the peppers, though, so if you want some then let me know!  I'll probably try some broccoli in the fall/winter.  I'll continue growing some stuff in soil and some stuff without it, since both techniques have their benefits.  Most of the components I built can be recycled, which will make things simple for the next iteration.  If/when we ever decide to buy a home, I'll definitely keep a consideration for greenhouse space in the yard and room for a hydroponic system in the basement or garage.

I started this greenhouse with a vision of a self-sustaining food production system.  The goal was to install it, then perform minimal weekly maintenance while reaping regular harvests.  That goal is still within reach, but I'm working kinks out of the timing and setup process.  It's hard to appreciate the complexities of a smart greenhouse at a small scale, like my setup.  Keep a lookout for projects like mine, though, and you'll understand why reliability and scalability are important for supporting human populations on this planet and elsewhere.

Thanks for reading about my plants!  This was a really fun project for me.  If you're interested in setting up something like this yourself, then please feel free to ask me for help :)

TGIB!

Edit: Here's a direct link to my presentation of this topic at Bellevue College's "Life on Mars" panel.

Thursday, August 4, 2016

27

26 was a year self improvement.  Since my last birthday I:
  • got into the best shape of my life
  • joined teams for ultimate frisbee and flag football
  • read a variety of fiction and non-fiction books
  • got promoted
  • grew my hair from Owen Wilson to Thor
  • taught myself about electricity and plant cultivation (more on that soon)
  • explored somewhere new
  • did a bunch of other stuff that I can't remember, because a year is a long time
26 was also a year of maturation.  I feel more grounded than ever, emotionally.  I'm shifting from constantly planning ahead to more just living in the moment.  I'm very lucky in that I don't need to worry about much.  Still, for the first 20+ years of my life, stressing about the future was my M.O., and I've found peace in letting that go.



On the other hand, every year after college has felt increasingly like the year of boring adulthood.  I'm going to bed earlier than ever.  I make sure to eat a decent breakfast every day.  I set aside time to exercise.  I guilt myself out of bad habits like video games and TV.  I'll be the first to admit that those changes are anything but exciting, but they do come with a silver lining of discipline.  I've gained the discipline to prioritize the most important things, to focus on what's in front of me, and to unplug myself in some ways from consumer culture that I've always loathed being a part of.

26 was chill in a really professional way.  Even though I still don't know what I really want out of life, I'm not tripping on it.  When the right opportunity presents itself, I'm confident that I'll be prepared to take it.  Until then, I'm just trying to stay sharp and enjoy each day for what is brings.

TGIB