0

Quick project, fast turnaround

Posted by Chris on Monday, September 28, 2009
Here's an idea that came up at a recent RobotBrighton meeting - something along the lines of siftables-meets-dice reader (but perhaps a little simpler). We hope the proof-of-concept can be achieved quite quickly, so as not to interrupt our plans for launching the ScoreSure range of devices, but it seemed like a bit of fun, so here we go:

The idea is to build a UI (user interface) that uses physical blocks, placed into a tray/holder. A bit like putting dices into a dice reader (but because that analogy caused all kinds of confusion, we'll never mention dice again). When a block is in place, we need to know:

a) which face is up (or down, as necessary)
b) the orientation of the cube
c) (maybe future development) which cube from a choice of many has been placed

Other "limitations" included how to power each cube, accessing a battery in indeed batteries were to be used (even the little button type batteries).
Because of the way the UI works, each cube would offer 24 (6 faces x 4 degrees of rotation) possibilities: a reasonable number of options from which to make a workable user interface.

Here's what we came up with:


Each cube has three contact pads on each face. When placed in the holder, these pads make contact with one set of four sets of contact pads in the tray.
Each set of contact pads consists of power, ground and a serial data line (TX from the cube, RX in the holder). The holder/tray puts +5v to the first power contact in the tray. The cube contains a PIC which is programmed do nothing except transmit an identity number over serial comms. If the cube is in contact with the pads in "position" one, the tray/holder will start to receive a message from the cube. If no message is received, we know that the cube is not turned around in position one. The holder then puts +5v on the second power contact and waits for a response. If it receives one, it now knows the orientation of the cube is "position two". The holder repeats this process on each of the four sets of pads, over and over again.


The cube has a number of common ground and TX pads. The power connections are joined through a series of diodes and each power connector is sent to an input pin on the PIC. This way, the dice knows which set of power/ground pads caused it to "wake up", and returns this information back to the base along the serial data line.

Because the cube only ever transmits data, and the tray/holder only ever receives data, we need only one serial data line.

When the cube is transmitting, it can broadcast a unique (serial number) identifier plus one byte of data (or even just a few bits superimposed over one of the bytes being sent) to tell the tray holder which set of contacts were used to activate the cube.

On the face of it, this meets all the criteria:
  • The cube knows which set of contacts caused it to wake up - i.e. which face is face down in the holder/tray - and broadcasts this information whenever it is activated.
  • The cube has a unique id number (perhaps in eeprom) which is broadcast along with its "facing" so that we can distinguish the messages of one cube from another.
  • The cube has no need for external (battery) power - it takes power from the tray/holder and when not in place, the PIC inside it does not need to be running.
  • The tray/holder knows which of the four sets of contact pads the cube responded to, and in which case knows which way around in the tray the cube must be.


In future, the tray/holder could be expanded to allow multiple cubes to be used together. An exciting hardware based UI with lots of possibilities. Already we're talking about "disco dice" - each cube face can represent an instrument, and each instrument can have up to four different "riffs" which can be played through a software app. Rock on!

0 Comments

Post a Comment

whos.amung.us

Copyright © 2009 .Nerd Club All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive Supported by Blogger Templates.