Wednesday, May 01, 2013

Using Forth to question the Status Quo

Whenever I face a  tough problem I try and break it down to the essentials.

Often using traditional methods only leads you to traditional solutions.  Sometimes traditional solutions are just fine, but what if you need something special?

This isn't about programming in Forth. It's about taking the Forth Approach. This means looking at the problem in a different way.  You can use your own favorite language, but consider the path taken (time and time again) by Chuck Moore (Forth's inventor). His chip designs are novel. His approach to problem solving is stunningly minimalist.  Go ahead and google him, I'll wait...

Sometimes is worth it to think; "What is the simplest possible way to do this?".
In my mind, simple doesn't (necessarily)  mean easy.

Consider designing a wireless temperature sensor.  You want to mount them in every room in your house. Now before you whip out your Raspberry Pi, consider three factors: Cost, Power and Size.  This sensor should cost under $20 in parts, be discrete enough to attach to a wall, and should run for at least 1 year reporting temperature once per minute.

Now, thoughts of Wi-Fi enabled Raspberry Pi (too power hungry and expensive) wane. How about something with Bluetooth LE? ($15 at best; no money left for the board, battery and other parts, plus you have to deal a fairly complex "standard").

I've discussed my approach a year ago here (Why Forth still matters in this ARM/Linux...). It basically describes a $7 RF transceiver and a $3 MCU (that requires only a couple of resistors and caps to function).  The MCU has a built in temperature peripheral.   I hand wrote an implementation of RC4 for a modicum of security. I've coded this all in Forth, but I could have used C. The implementation language doesn't matter -- the approach is inherently Forth-ish.

A year later and I still can't find anything cheaper.  The status quo says I should go to Bluetooth LE (or at least Zigbee). But, at what benefit?

Update:
Okay, this is an even cheaper RF transceiver (just $2.99, but in the crowded 2.4GHz band): http://www.ebay.com/itm/HopeRF-RFM73-2-4GHz-Transceiver-/251209604525?pt=LH_DefaultDomain_0&hash=item3a7d425dad



2 comments:

  1. Anonymous5:25 AM

    Hi Todd,

    Enjoying your blog, as I share your love of Forth and modern microprocessors.

    Regarding radio comms:-
    Why not make your own 433Mhz transmitters (depending on what is legal in your country) ?
    You should be able to find plenty of decent and cheap designs in a ARRL handbook etc.

    Perhaps buy a decent 433 Mhz receiver as you only need *one* of those ?

    Cheers
    Terry

    ReplyDelete
  2. Interesting idea. But modules are getting so cheap these days that the labor and costs for me to roll my own (at that level) is too much.

    I think SiLabs have some simple transmitters for around $2 a chip. I just need a breakout board...

    ReplyDelete