CoCo-ri-Co!

A smart tile for adding a user interface to a system.

Overview

The Elektor COol COntroller COncept CoCo-ri-Co is a little digital potentiometer module that allows you to add a rotary control to any project. It takes care of the hassle of rotary encoder interfacing and outputs the encoder’s position as a clean, clear numeric value. A two-color LED ring around the encoder provides visible feedback and a buzzer can be mounted for audible feedback. The module communicates over a serial bus (UART, I²C, SPI) and is fully configurable. It can be controlled from a microcontroller or it can be the main microcontroller of an application. A tiny trimmer lets you choose the serial port protocol that CoCo-ri-Co will use without reprogramming anything. Being completely open source and reprogrammable over a normal serial port, you can modify it as you wish.

CoCo-ri-Co! pinnames

This diagram shows the commonly used interfaces and their locations. Note that all the numbered pins (P0_XX) can also be used as DigitalIn and DigitalOut interfaces.

Carrier Board

A special carrier board provides an mbed interface and power supply for the hexagonal CoCo-ri-Co board. It also breaks out the MCU pins on two handy extension connectors.

Specifications

Where to Get it

The CoCo-ri-Co board is available from Elektor

Video

Webinar

Here is a webinar explaining the philosophy behind the CoCo-ri-Co board.



Features



Firmware

CoCo-ri-Co Carrier Board firmware 1.0

1. Put the board in firmware-upgrade mode

/media/uploads/Clemo/elektor-cocorico-bl.png

While holding down the bootload button BL (S1) on the CoCo-ri-Co carrier board, connect the board to a free USB port on your PC. It will appear as a disk called CRP DISABLD.

2. Load the new firmware on the board

Open the new disk and delete the (only) file firmware.bin that is on it. Download and copy the latest firmware onto the new disk.

3. Almost done

Disconnect the CoCo-ri-Co carrier board from the PC, and plug it back in again. The USB disk will now appear as a normal mbed disk called DAPLINK.

That was not too hard, wasn't it?



Getting Started with mbed

1. Connect your microcontroller to a PC

Use the USB lead to connect your mbed to a PC. The status light will come on, indicating it has power. After a few seconds of activity, the PC will recognise the mbed Microcontroller as a standard USB drive.

/media/uploads/dan/winxp-disk.png/media/uploads/dan/mac-disk.png
Windows XP exampleMac OS X example

Go to the new USB Drive, and click MBED.HTM to open it in a web browser.

If you do not have an mbed account, choose "Signup", and create your mbed Account. Otherwise, log in with your normal username and password.

This will give you access to the website, tools, libraries and documentation.



PC Configuration

Your mbed Microcontroller can appear on your computer as a serial port. On Mac and Linux, this will happen by default. For Windows, you need to install a driver:

Windows

See Windows-serial-configuration for full details about setting up Windows for serial communication with your mbed Microcontroller

From a host PC to communicate with mbed you will need a terminal application. This allows the mbed Microcontroller to print to your PC screen, and for you to send characters back to your mbed.

Some terminal programs (e.g. TeraTerm) list the available serial ports by name. However, if you do need to know the identity of the serial port so that you can attach a terminal or an application to it:

WindowsMacLinux
Find the identity of the COM port by opening ''Device Manager''. To do this navigate ''Start -> Control Panel -> System -> Hardware -> Device Manager''.To find the device name under Mac OS X, use the command ''ls /dev/tty.usbmodem*''To find the device name under Linux, use the command ''ls /dev/ttyACM*''
windowsmaclinux



Downloading a program

1. Save a program binary (.bin) to the Platform

Download the "Blinky" binary file (the source code for this program will be seen in the next section).

Save the program binary file to your mbed microcontroller disk, just like you would with a normal USB disk. The Status LED will flash as the PC writes the file to the microcontroller disk. The file is now consumed.

2. Press the Reset Button

When the Reset Button in pressed, the microcontroller will be reset and the last programmed application will begin to run.

3. It is alive!

/media/uploads/Clemo/elektor-cocorico-blinky-led.png

The microcontroller is now running the program, flashing LED4 on the carrier board forever! If you reset the microcontroller, or disconnect and reconnect the power, the program will simply restart.



Blinky

Import programmbed_blinky

The example program for mbed pin-compatible platforms



LED ring demo

Here is a little demo that shows how to control the LED ring on the CoCo-ri-Co board. The circle will alternatingly fill red and green, going clockwise. The LED in the middle of the board will flash and alternate between red and green at a rate of 1 Hz.

Import programcocorico_ring_demo

Simple demo showing how to control the CoCo-ri-Co LED ring.



Where Next

Follow the guide to creating your own programs using the online compiler



Technical Reference

Power

Schematics

Data Sheets

Please log in to start a discussion or ask a question.