Arduino (6)


To Build a SmartWatch… (Part 1)

Having seen the fuss around smart watche, I wondered exactly how difficult would it be to build one from scratch? All the technology usually packed in to one of the current generation of watches is widely available in breakout board form or equivalent, which brought me to another thought:

“How far can I get without building my own board?”

Thus, the Smart Watch project was born; an attempt to build a functional watch connected to a handset (in my case, a Nexus 5) and used to notify the user of incoming messages, etc. using only readily available hobby breakout boards and parts, so that as many people as possible could have a go at beating my designs!

If you, the reader, want to have a go, the rules are thus; The watch must:

  1. Only use readily available breakout boards to build it’s circuitry.
  2. Have the basic functionality of a smart watch, namely, to tell time, and show notifications from a host device.

Oh, and do let me know if you do have a go. I’d love to see the results!

The Parts

Because of the breakout board rule, I decided to base all my buying decisions around the single largest part required. As the display is likely to take up the lions’ share of the front surface of any watch, I attempted to cram all my other components behind that breakout.

The one I settled on in the end was the Adafruit 1.8″ TFT + SD Card Breakout with it’s whopping 128×160 resolution, 5v or 3.3v operation, and integrated Micro-SD card holder, it was a pretty easy choice to make – it gave me the added feature of storage, as well as providing a nice sized base to build the rest of the watch behind.

Conveniently, the stock image on Adafruit is a cat. I approve greatly.

The stock image on Adafruit’s display products is a slightly bemused looking cat. I approve greatly.

Conveniently, the processor board I had been looking to use for this project happened to be exactly the same height as the short dimension on the screen.

The Teensy 3.1 sports an ARM Cortex-M4 processor ( an MK20DX256VLH7 ), has hardware driven SPI, and has integrated USB support and handily runs a port of Arduino code, letting me use the Adafruit display libraries directly, rather than having to write my own ( although this came back to bite me later, but more on that another time ).

A Teensy 3.1! Nifty!

A Teensy 3.1! Nifty!

As this is to be a watch, it’s going to need to be battery powered, ( semi-obviously, I wasn’t keen on running about with a USB cable up my sleeve all the time ), and as small size was the main requirement when I decided on these parts, I tried to pick a battery with the largest capacity for approximately the right height available.

The 400mah LiPo battery from Sparkfun is about the right size, and should provide plenty of power for a working day ( a personal requirement of mine was that this should run for at least 8 hours )

It's a LiPo, what did you expect it would look like?

It’s a LiPo, what did you expect it would look like?

As the battery is a LiPo, it required it’s own charging circuitry, and luckily, the guy over at Pesky Products produces an ‘appallingly small’ ( their words, not mine! ) add-on board for the Teensy, which includes all the required circuitry, as well as breaking out a charge status pin and using the Teensy’s own USB connector for input power. It was perfect.

It's really tiny! Really handy too!

It’s really tiny! Really handy too! JST for scale?

Now that the device has power, a processor and something to display data on, a radio was needed to bridge to the host device. Adafruit once again provide the solution with their Bluetooth Low Energy, nrf8001 breakout which turned out to be the second largest single component to cram behind the screen ( the battery was the largest ) and proved to be quite a pain to mount sensibly.

Eventually I opted to put the board back-to-back with the display breakout, as thankfully, the radio breakout has no components on the back side, so could be simply stuck down with double sided foam ( more on the fun with sticky foam later… ). But even so, the sheer size of the breakout was – and still somewhat is – a problem.

The hilariously large - for my purposes - Adafruit nrf8001 breakout board.

The hilariously large – for my purposes – Adafruit nrf8001 breakout board.

More to come, when I can find the time to type everything up!




Arduino Batch Tool Prototype, version 1.2

I’ve been poking around in my batch tool, and have been pushing what you can do in the Processing IDE‘s add-on tool framework (turns out, not that much that’s every interesting without doing some fun Java hackery!).

With some slightly fancy trickery, the Arduino Editor now looks like this:

Stress testing the Arduino Batch Tool

Stress testing the Arduino Batch Tool

Yes, this is all loaded from an addon tool – not a rewrite of the IDE, not a custom build, just the stock editor with a single jar loaded from ~/sketchbook/tools and enabled in the menu.

Thus far, additions include:

  • A tabbed script console
  • Multiple target boards are configurable (for single-button-flash-everything functionality)
  • Multiple serial ports can be opened in their own tabs at the same time (and auto close and reopen during flash operations)

Non-visible additions include a partially implemented preferences dialog, and mutli-sketch multi-device support (flashing device A with sketch 1, flash device B with sketch 2, C with 1, etc. all from one button press, once configured).

I’ll be updating the download on the  Arduino Batch Flashing Tool page once I’m sure the tool is fairly stable.

If anyone uses this, I’d love to hear from you, especially those on Windows or Mac, as I’ve only tested this under Linux, but it should work on anything the Arduino IDE works on, as it doesn’t use any special binaries.




Arduino Batch Tool v1.1

Development!

Arduino Batch Tool 1.1 - Port configuration

Arduino Batch Tool 1.1 – Port configuration

With the addition of tabbing, multiple serial monitors can be instantiated at once – and the batch tool will manage them all during flash operations (disable, write, enable).

Arduino Batch Tool 1.1 - Embedded Serial Monitor

Arduino Batch Tool 1.1 – Embedded Serial Monitor

The tool doesn’t create its own serial monitors, but instead instantiates additional Arduino serial monitors and embeds them in the tool’s tabs.

The stock IDE serial monitor should still work, as long as you don’t try to open the same port in both at the same time!

Release should be soonish, check back in the near future!




Lions, Tigers and Site Updates, Oh My!

It’s been a while, I know, but I’ve finally got around to updating various bits on here, including and update on my RS-485 projects along with a new page for my Micro-CNC Milling Machine.

screenshot-yellow

I also have uploaded a new app to the Google Play app store, CheerLights Live Wallpaper which pulls updates from the CheerLights Project, changing the colour of the home-screen wallpaper to match the current CheerLights colour (with a latency of around 15 seconds or so).

User warning: CheerLights does seem to like ‘white’ in the early hours of the morning… sadists!

Until next time!




Assembled RS485 Boards

Finally got them all soldered up… only to find I’m exactly one screw terminal block short.

 

Dangit.




Upcoming Talk – Serial Communications

I’m currently slated to present a talk at the CSLU (Lancaster University’s Computing Society) on serial communications with micro-controllers.

In addition to the talk, there will be a lab session where we will be working on a simple, practical communication scheme using Arduino micro-controllers and these beauties:

11 RS-485 Shields for the Arduino

Arduino RS-485 Shields for the Arduino

All ready to solder up, when I have the stacking headers that is – shipping from Hong Kong takes way to long!

I’ll update when I have more information about the talk, and after the fact will update the ‘Talks’ page on here with the slides, should anyone want to follow along.