A smart tile for adding a user interface to a system.
Table of Contents
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.
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.
- NXP LPC812 32-bit ARM Cortex-M0+
- All 18 MCU I/O pins accessible through extension connectors
- Up to 17 bicolor LEDs
- Rotary encoder and/or pushbutton
- Buzzer (optional)
- Supports I²C, SPI/synchronous and asynchronous serial communication
- ISP port compatible with 3.3-V FTDI USB-serial cable (except 5-V supply)
- Open source, Eagle design files are available here
Where to Get it¶
The CoCo-ri-Co board is available from Elektor
Here is a webinar explaining the philosophy behind the CoCo-ri-Co board.
- High performance ARM® Cortex™-M0+ Core
- 12 MHz, 4 KB RAM, 16 KB FLASH
- SPI (2, 1 exposed)
- I2C (1)
- UART (3, 1 exposed)
- PWM (4)
- GPIO (18)
- User Interface Peripherals
- 16 bi-color LEDs in a matrix
- 1 bi-color LED directly controlled
- Rotary encoder (with or without push button)
- Push button
- Carrier Board
- 57 x 55 mm
- Powered over USB
- On-board Debug and Programming Interface Circuit
- [USB MSC] Drag-n-drop programming
- [USB CDC] USB Serial Port
- [USB HID] CMSIS-DAP
1. Put the board in firmware-upgrade mode¶
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.
|Windows XP example||Mac OS X example|
2. Click the MBED.HTM link to get logged in¶
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.
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:
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.
- Terminals - Using Terminal applications to communicate between the Host PC and the mbed Micrcontroller
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:
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!¶
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.
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.
Follow the guide to creating your own programs using the online compiler
- USB powered
- Current (active): < 15 mA
- Current (sleep): < 1 mA
- 3.3 V regulated output on VOUT to power peripherals
- Digital IO pins are 3.3 V (5V tolerant except for P0_6), 4 mA each, 100 mA max total
- High-current Digital IO pins (P0_2, P0_3, P0_7, P0_12 & P0_13) can source 20 mA each