fbpx

Defcon #24 and small scale farming

What did this years version of the annual hacker convention in Las Vegas have to tell about small scale farming? Nothing directly, being that kind of  happening where the participants and speakers seem to thrive in cellars and abandoned mines, rather than the open air. Indirectly, a lot.


The theme this year was Human vs Machines, and of course, the internet of things was among the most frequent topics. It’s always amusing to watch hackers exploit old gadgets that their manufacturers given a prolonged product cycle by connecting them to the internet, and pranking the neighbours by exposing their porn surfing habits through a vulnerable online toaster mostly raise the question: why did that guy buy a connected toaster?

So why should the small scale farmer be concerned about IoT security (except for the earlier mentioned reason)? The first link in the food supply chain is about to get more complex, as the demand for both locally produced and refined food grows. The specialized farmers that sells crop, meat or milk to industrialized facilities will have a hard time competing with producers that controls the complete value chain, from hay to cheese and steak, and understand to add ethical, esthetical and cultural value to their products.

There are two ways for the small scale farmer to accomplish a substancial increase in value, either by focusing on cultural and estethical factors, and become artisans, or by focusing on efficiency and interamplifying (is that a word?) processes. It’s with the interamplifying processes the internet of things makes its entrance. Automation, surveillance and statistics might not add the cultural value of a handmade cheese from Grannies recipe, but it ensures high food quality, and uniform products even in small batches, and that will allow you to make a larger variety of products, without being an master artisan in every field.

So the sensors and relays that will help you make the best food on the market, will they work for you, or for anyone that comes by digitally? Their information can be a great asset, as they provide the customer with unique data about their meal, but if you expose the controls, you also expose the possibility to replicate or sabotage your products. That’s the downside of shifting knowledge from human to machine.

In the great battle between man and machine, the machines are definitely winning. Knowledge is power, and we keep rely on the knowledge we stuff into machines, while we stress our brains back to the stoneage in our efforts to keep up with them. It’s when we taste the delicious cheese that where made with their help and without our efforts, that we realize who the real winner is. Just keep your networks segmented.

Mölkky step-by-step

The finnish game Mölkky is fun to play, but Nils said ”No way we are buying a bunch of numbered sticks. We’ll make our own!”

Step 1 – get wood. 

Step 2 – cut it into 12 pieces, plus an extra piece for throwing. 

Step 3 – cut the tips off of the 12 pieces, diagonally.

Step 4 – number the pieces and set up the game!

Step 6 – set it up again..!

Final step – playtime 😄

Diy wireless pH-meter

In cheese-making, the key to a tasty, and reproducable, cheese, is keeping track of the  exact pH and the temperature in the active culture. You can do this with manual tools, such as a kitchen thermometer and pH-strips, but the measurements will be crude, and depend on your constant presence. That leading to inconsistencies between batches,  and difficulties in tracking errors in the process.

Michel Lepage is cutting the curd. Photo taken at the craft cheese-making course we took at Eldrimner in 2014.
A digital pH-meter is expensive. You can find some from €100, but you wont get built-in temperature correction for less than €250, and wireless goes beyond €350. For continous readings and  the possibility to recalibrate your sensor yourself, instead of sending it to the manufacturer,  add a lot more… I havn’t yet found a device capable of tweeting its readings 😉

My diy pH-sensor is not exactly cheap either. It ticks in at about €150 in material costs. I’ve seen people look pensive when they see the casing, and subconsiously push it closer to the recycling, so a slightly pricier casing than the pet bottle might be an investment. Otherwise, the bill of materials looks like:

Sensor

  • Atlas pH meter kit $149 (EZO version)
  • Arduino mini pro 3.3v $1.90
  • NRF24L01 radio $1
  • DS18B20 waterproof temp sensor $1.63
  • Battery holder $3
  • 2xAA batteries
  • Cables

With todays exchange rates, it translates to around €150.
If you’re setting up a new sensor network, you need a radio gateway and a computer to run the controller software on too

  • Arduino nano $6
  • NRF24L01 radio $1
  • Cables
  • Old computer or raspberry pi $25-$50

      You can order everything from ebay or aliexpress through the Mysensors store, but the items listed there may not always be availible in singel packages. Anyway, you will need more of those radios.

      Shipping is usually free from China (who is paying that?), but the pH-kit comes from the US, so add a few euros for shipping and customs.

      Features:

      • Measures pH-level in fluids and semi-solid compounds.
      • Calculates the correct pH from the latest temperature reading.
      • Measures temperature
      • 30 seconds between samples.
      • Continous measuring, just leave the probe in the milk and watch the readings.
      • Wireless transfer of data to the raspberry pi based controller unit
      • Presents the readings as a datastream or in nice graphs in a web interface. Use your phone or tablet to monitor the process from anywhere.

          Prerequisites:

          Tools

          • FTDI USB programmer, to program the arduino  mini pro and perform calibration. If you use arduino nano instead, you can skip this, but the nano is more expensive and power consuming.
          • Soldering iron, lead, soldering paste.
          • Computer with arduino ide or codebender running.
          • Pliers, knives, screwdrivers and that kind of stuff.

          Skills

          • Basic soldering. The only soldering done in my prototype is on the on/off switch. For a sturdy and reliable device to use in a kitchen environment, I recommend soldering the connections rather than using Dupont cables.
          • Basic programming. You can clone my code from codebender and hope it will work out of the box, but since things changed quickly on the internets of things, you will probably need to change some code to adapt to new version etc. So some understanding of coding will be helpful.
          • Arduino/MCU experiences. I wouldn’t recommend to make this your first microcontroller or Mysensors project. Start out with a simple blinking light and then a temperature sensor to make sure you get the IDE and Mysensors API.
          • Raspberry pi/Linux experiences. You could use a Windows computer as controller and user interface server, but if you’re up to arduino hacking, you might as well use an embedded device right away.