todbot

me okay

Mar 262014
 

About a year ago, while I was developing the blink(1) mk2, I created both a PIC16F1455 development board and a little assemblage that was tiny enough to toss in my laptop bag but powerful enough to let me develop on the PIC.  I could now develop firmware in a coffeeshop!

Portable PIC16F1455 Development Platform

It consists of:

All taped together with double-stick foam tape.

The Sabrent USB hub is because it acts a partial goof-protector if I short USB power & ground and the per-port power switches make it easy to power-cycle the device I’m developing without unplugging-replugging.  The solderless breadboard is just big enough to support the addition of a few extra components.  And my dev board has female headers with male pins that stick into the breadboard, holding it securely place and making wiring to the dev board a snap.

If only MPLAB X & PICKit3 wasn’t so pokey for programming (it can take 15 seconds from the time you click “Upload”  to having your code running on the device)

 Posted by at 2:36 pm
Dec 102013
 

[originally posted on the ThingM blog]

The theme for the Caltech Entrepreneurs Forum’s November event was “The Internet of Things, Arduinos and the ‘Maker Entrepreneur’“.

caltech-entforum-talk-normal.001

My talk “Intro to the Arduino Entrepreneurial System” touched on all these topics. The entire event was a blast, including a wonderful talk about commercial making with open source by Quinn of QtechKnow.

Slides with notes and MP3 audio of the entire event are below.

Download MP3 of the entire Forum proceedings, including Tod’s talk.

 Posted by at 1:39 pm
Aug 082013
 

[originally posted on the ThingM blog]

makerfaire

Whew, MakerFaire Bay Area 2013 is over and it was astoundingly fun. Not only did we get to interact with so many people doing awesome things with ThingM products (like these BlinkM MinM earrings) but we got to show off a bunch of projects made with blink(1) and BlinkM-family stuff to thousands of new people. We heard tallies of 120,000 people showed up over the weekend, and we love seeing the concepts the Maker community inspires diffusing out into the larger world, as this LA Times article speaks to.

This year not only were we fortunate enough to have a ThingM table in the Maker Shed (Thank you Leah, Alex, Will, Carlyn, & Mike for helping staff it), but we also gave talks. Mike spoke about the future of manufacturing in a work filled with Maker-inspired tools and techniques, while I gave a talk on the process we went through to take blink(1) from an idea to Kickstarter to production.

Slides from my talk are below.

 Posted by at 9:17 pm
Aug 072013
 

[cross-posted from the ThingM blog]

photo-main

We’re working on an improved version of blink(1) and have launched a Kickstarter for it.

blink(1) mk2 is an updated version of the blink(1) super status light. The original blink(1) made it easy to connect any data source in the cloud or on your computer to a full-color RGB LED so you can know what’s happening without checking any windows, going to any websites or typing any commands. blink(1) mk2 maintains backward-compatibility while adding better functionality and great new features.

The main new features are:
- Better USB support
- Brighter via dual RGB LEDs
- Independently-addressable LEDs
- Improved Blink1Control application

We think it’s going to be great.
blink1mk2-ani

 Posted by at 11:14 pm
May 112013
 

I finally got around to updating the BlinkMuino guide for turning your BlinkM, BlinkM MinM, or BlinkM MaxM into a tiny ATtiny85 or ATtiny84 Arduino system. BlinkM boards make great tiny development boards, especially if you’re interested in driving LEDs. BlinkM MaxMs are particularly great because they have more inputs and those three beefy MOSFET power transistors. And MinMs are good because they’re super tiny, but still contain a fully-programmable computer.

Thankfully, the ArduinoISP sketch has also been updated for Arduino-1.0, meaning you can use your Arduino as an AVR-ISP programmer, like this:

blinkmuino-arduino-500px

Here’s the original video I made about BlinkMuino:

We’ll be showing off some examples of BlinkMs programmed with Arduino at Maker Faire, some say “hi”!

 Posted by at 12:37 pm
Apr 292013
 

In late 2006 I wrote “arduino-serial“, mostly for myself, to help with stuff I was working on at the time. It was a very simple & small, cross-platform tool written in basic C for reading/writing serial ports.

Now nearly seven years later I still get regular questions and frustrations about it. Part of this is due to how Arduinos have changed over time. You used to have to hand-reset an Arduino board, now the act of opening the serial port resets it. This has its plusses and minuses, but it really made my original use-case of arduino-serial fail. Then there were just all the minor deficiencies of the program.

To address some of these issues, but still keep things small & light, I’ve done a bit of fix-up of arduino-serial. It’s now hosted on Github at:
https://github.com/todbot/arduino-serial/

Changes & Improvements

Some changes that I recently made to arduino-serial:

  • Separation of the application (arduino-serial.c) from the library (arduino-serial-lib.{c,h})
  • Fixed probable --read bug
  • Fixed --port open to allow re-opens
  • Added --sendline command to send a string followed by a newline
  • Added --flush command to clear out receive buffer
  • Added --eolchar option to let you specify your own end-of-line character if ‘\n’ isn’t appropriate
  • Added --timeout option to specify a read timeout (reads no longer block infinitely)
  • Added --quiet flag to make output more terse/machine-readable

Here’s what the new usage help screen looks like:

laptop% ./arduino-serial
Usage: arduino-serial -b <bps> -p <serialport> [OPTIONS]

Options:
  -h, --help                 Print this help message
  -b, --baud=baudrate        Baudrate (bps) of Arduino (default 9600)
  -p, --port=serialport      Serial port Arduino is connected to
  -s, --send=string          Send string to Arduino
  -S, --sendline=string      Send string with newline to Arduino
  -r, --receive              Receive string from Arduino & print it out
  -n  --num=num              Send a number as a single byte
  -F  --flush                Flush serial port buffers for fresh reading
  -d  --delay=millis         Delay for specified milliseconds
  -e  --eolchar=char         Specify EOL char for reads (default '\n')
  -t  --timeout=millis       Timeout for reads in millisecs (default 5000)
  -q  --quiet                Don't print out as much info

Note: Order is important. Set '-b' baudrate before opening port'-p'.
      Used to make series of actions: '-d 2000 -s hello -d 100 -r'
      means 'wait 2secs, send 'hello', wait 100msec, get reply'

Using arduino-serial

arduino-serial has always been designed so you can “pipeline” commands/options, but it wasn’t implemented very consistently. It’s a bit better now. You can do multiple send/read pairs, even use multiple serial ports, all from a single command-line invocation.

For example, if you have the “SerialCallResponseASCII” sketch from the Communications examples loaded onto your Arduino, you can run commands to take multiple data readings. In the example below, the order of operations are:

  1. serial port is opened (at 9600)
  2. the string “A” is sent (a single-byte)
  3. the first line is read
  4. sleep for 1000 milliseconds
  5. send “A” again
  6. read second data line
  7. flush read buffer (just to show we can)
  8. send “A” a third time
  9. and take a final reading
laptop% ./arduino-serial -b 9600 -p /dev/tty.usbmodemfd131 \
            -s "A" -r  -d 1000  -s "A" -r  -F  -s "A" -r
send string:A
read string:465,396,0

sleep 1000 millisecs
send string:A
read string:358,352,0

flushing receive buffer
send string:A
read string:307,305,0

The flush was put in there to demonstrate that you could flush the receive buffer mid-command if you wanted. It’s not required, but might help some situations.

To use multiple serial ports, you can do something like the below, which opens up one serial port at 9600 bps, does a send & receive, then opens another at 57600 bps and does a send & receive on it:

laptop% ./arduino-serial -b 9600 -p /dev/tty.usbmodemfd131 \
        -s "A" -r \
        -b 57600 -p /dev/tty.usbserial-A800f8ib \
        -s "hello" -r 
 Posted by at 5:43 pm
Jun 242012
 

BlinkM coin cell holder

Did you know you can power BlinkMs or BlinkM MinMs off two 3V coin cells? Here is a tiny 3d-printable coin cell and header socket holder for BlinkMs and BlinkM MinMs. It snaps together and has mounting holes to turn it into a pendant or mounting additional diffusors for the LEDs.

And you don’t need many parts to build it:
- one each of plastic pieces here (see the STL files on Thingiverse)
- two CR2032 3V coin cells
- one 4-pos female header socket (Digikey S7037-ND or equivalent)
- two short pieces of solid wire (old resistor leads, 26 gauge wire stripped, etc.)

BlinkM coin cell holder

Steps:
1. Push the 4-pin socket into the hole until it stops. It should friction-fit in without any need for glue.
2. On the bottom, feed the two wire pieces in as shown in the photos, and solder them to the two pins on the header socket. These wires become the battery terminals.
3. Bend the wire battery terminals so they make good contact with the cells.
4. Insert coin cells, snap together top piece.
5. Insert BlinkM and watch it play its light sequence.
6. To protect the back, put a small piece of gaffers tape or similar over the terminals.

For more info and pix, see this project’s Thingiverse page or the Flickr pictures.

 Posted by at 9:48 pm