Satellite Chocolate Board
The Satellite Chocolate board is a general-purpose microcontroller and complex programmable logic device (CPLD) board that I am developing. It is USB-powered and controllable, and can charge and use a single-cell rechargeable Lithium-Polymer battery. The board uses an Atmel SAM4S microcontroller for control of the board. At least 45 general-purpose input/output lines (GPIOs) are available for use along with a wide range of on-chip peripherals. The board includes five bright colour (RGB) LEDs for general-purpose status indication, plus a red power-indicator LED. It includes an infrared transmitter and receiver. There are four on-board buttons. An on-board flash IC is included. There is an on-board temperature sensor, light sensor, and battery level sensor. A MAX V CPLD provides routing for microcontroller, board, and user signals.
The board is supported by the Satellite System, which consists of tools and a library that allow images to be created and flashed to the Chocolate board. The system includes an interface library for communicating with the board over USB.
Pictured here is the latest development prototype (Chocolate version 0.2):
What is it?
The Chocolate board is a microcontroller development board with a CPLD and a number of colour LEDs, peripherals, and sensors. It can use an optional rechargeable battery, and has USB connectivity.
A microcontroller (MCU) is essentially a small computer that contains a processor, RAM, flash (for programs) all on one chip. Unlike a computer, a microcontroller usually runs without an operating system and is often dedicated to a fixed task. You can write programs for a microcontroller, then flash them to the chip through a programming interface, which stores them on the board. These programs then run on the board. The Chocolate board contains a SAM4S microcontroller, which is a very capable ARM microcontroller with a lot of useful features.
A Complex Programmable Logic Device (CPLD) is a reprogrammable device that can do clever things with logic signals. The Chocolate board uses a MAX V CPLD, which is a very capable device for the price. It is connected to the SAM4S microcontroller by selected lines and can perform additional processing on signals going to or from the microcontroller, as well as producing its own signals and managing the other components on the board. The Chocolate board comes with a default CPLD image that manages the on-board components for you, but you can optionally program your own.
The Chocolate board has USB connectivity. It can communicate with a computer over USB. Combined with the microcontroller and CPLD, this lets you turn the Chocolate board into what is essentially a custom intelligent USB device of your own creation. A library is included for communicating with the board over USB from a computer.
When writing software for the board, you can use use all of the sensors, buttons, LEDs, and other peripherals on the board. You can also add other electronic components to the board using the board headers. A varied range of peripherals are included with the SAM4S microcontroller that will allow you to communicate with a wide range of electronic components. There are a large number of general-purpose input/output (GPIO) lines (at least 45) available on the microcontroller, accessible via the board headers. There is plenty of capacity to add multiple electronic components to the board.
The Satellite System greatly helps with the development of software for the board, allowing you to write programs that can use board components and communicate over USB with as little as one line of code.
You can optionally use a rechargeable Lithium-Polymer battery (a type of rechargeable battery that is typically small and flat) with the board. The battery will be charged whilst the board is plugged into a powered USB port. This might be via a computer, a USB hub, or a USB device charger. The board will continue to run on battery power when disconnected from USB until the battery runs low. This lets you create a USB-based device that can be left to run on its own, then docked periodically for charging and data transfer; or a device that you can remove periodically to later return back to its regular home.
What can I do with it?
Here are some things that you could create with the board:
- Create a USB-controlled colour LED expansion board for a computer. You could use the LEDs to report status information by sending it to the board over USB.
- Create a USB-controlled sensor board, possibly adding your own sensors to the board headers. Use the multiple ADC inputs to add multiple low-cost sensors to the board.
- Use the IR LED and create your own USB-dockable IR remote control. Add intelligent functionality, such as scheduled IR transmissions or sending commands to multiple receivers together.
- Connect up a number of electronic components to the GPIO headers, and use those to create your own USB device that a computer can communicate with over USB.
- Create a visual temperature sensor. Use the on-board temperature sensor, and write code for the microcontroller to make it turn one of the colour LEDs to a colour of your choice. The board could then be used as a temperature sensor even if it wasn't connected to a computer.
- Create any sort of device with LED-based status display. There are five very bright on-board colour LEDs available for this purpose.
- Create a data logger. Record light, temperature, and other sensors over a period of time, transferring the results to a computer over USB periodically. Use with a battery to create a data logger that you can detach, record for a while, and return to a host computer to gather results.
- Use it to experiment with microcontroller and CPLD software development, perhaps for the first time.
- Use the five bright colour LEDs, which are laid out in a circle, to create beautiful animated lighting effects. Add USB control to customise the effects.
- Hook up your own LEDs, LED strings, or party lines to the board, write software to manage them, and then control the board and lights over a USB connection.
- Use the board as an indicator for a headless computer, such as a Raspberry Pi with no monitor attached. The computer can communicate with the board, and indicate status using the five coloured LEDs.
- Create a device that can be controlled by an IR remote.
- Use the light sensor and LEDs to create a device that automatically provides dim lighting when it detects that the room has darkened. With battery backing, this could provide a rudimentary backup light for a room during power failures.
- Create a device that monitors a bunch of sensors, does a little processing on them, and provides the results to a computer periodically. The computer could then display the results.
- Use the temperature sensor to turn on/off an infrared-controlled airconditioner.
- Using components with strict timing requirements such as WS2811 LED strips that are extremely difficult to get working on an ordinary operating system? Write dedicated software for the board to manage these time-critical communication tasks, and effectively turn these components into ordinary USB-controllable LEDs.
- Create an automation system that can control many things that you can control with an IR remote.
- Turn the board into a device that accepts commands from an IR remote and makes them available to a computer over USB. You can then write software on the computer that responds to the IR signals.
- Experiment with new and interesting electronic components that cannot be connected directly to a computer, turning the combined setup into a USB device that you *can* communicate with from a computer.
- Write driver software for complex, demanding, or time-critical electronic complenents on the board microcontroller, guaranteeing it dedicated resources. Then provide an simplified interface to that component over USB, so that a computer can use this component easily.
- Add a LCD screen to the board via the board headers and create your own four-button USB-capable handheld device with display. Or leave out the screen and just use the LEDs as indicators.
- A combination of several of the above.
Features
The Chocolate board provides:
- A 100-pin SAM4S microcontroller, providing:
- A speed of up to 120MHz.
- Up to 2MB flash (depending on specific variant) for programs.
- Up to 160 KB SRAM (depending on specific variant).
- 2Kb cache (some variants only).
- SPI, 2xTWI/I2C, 2xUSARTS (with SPI mode), 2xUARTS. These can be used to communicate with a wide range of electronics and sensors.
- Fifteen 12-bit ADC lines (three hardwired to board sensors). Each ADC line can measure the voltage on a line, which is how many inexpensive sensors (eg. light sensors, temperature sensors) report their readings.
- Four hardware PWM (Pulse Width Modulation) channels. A PWM channel can be used to control the brightness of a LED, or the speed of a motor. Three channels can be used with a colour (RGB) LED to produce any colour of any level of brightness.
- Five timer counter channels that can (amongst other things) produce up to twelve more PWM channels, giving sixteen overall.
- A wide range of on-chip peripherals selectable across a range of pins.
- Too many additional features to list (eg. RTC, DMA, DAC, I2S, MMC support, analog comparator, Chip ID). See the SAM4S Datasheet for more.
- Almost all of the pins available in the 64-pin variant of the SAM4S microcontroller are broken out to headers and available for use.
- Additional pins from the 100-pin variant also broken out and available for use.
- A MAX V Complex Programmable Logic Device (CPLD), providing:
- 10 general-purpose CPLD lines. There lines are direct to headers and have no other connections.
- 37 lines direct to various microcontroller pins and headers. These can either be used as I/O to the microcontroller, used as microcontroller lines only (by disabling on the CPLD), or general-purpose CPLD lines (by disabling on the microcontroller).
- Many extras. See: The MAX V Handbook.
- Roughly 45 readily-available GPIO pins
- More are available with restrictions. For example: The four JTAG/SWD pins and headers could be used, but not whilst using the debugging interface.
- A USB Micro B connector, connected directly to the SAM4S microcontroller for control of the device.
- The Satellite System provides strong library support for creating programs that communicate over USB.
- Support for an optional Lithium-Polymer battery.
- The board includes a dedicated Lithium-Polymer battery charger IC.
- When the board is connected to an external power source via USB, the board will run from this power source, and charge the battery.
- When the board has no external power source, the board will continue to run, using battery power instead.
- 5V, 3.6V, 3.3V and 1.8V power outputs. 5V provided by USB only, other supplies via regulators that can be supplied by the Lithium-Polymer battery.
- Switchable power banks (eg. two independently-switchable 3.6V banks) that can be enabled/disabled from the microcontroller.
- An IR transmitter and receiver.
- A light sensor.
- A temperature sensor.
- A battery voltage sensor (for charge level).
- NOR flash (flash optimised for random read access).
- Four side-mounted buttons.
- Five top-mounted colour (RGB) LEDs.
- The LEDs are connected via CPLD to allow their exact means of control to be dynamically reconfigured. There is sufficient MCU/CPLD capability to allow 16-bit hardware PWM control of all fifteen channels independently. Alternatively, you can use a smaller number of channels and route them to the LEDs as required.
- 152 header pins providing access to various microcontroller and CPLD pins, various power pins, and other interesting parts of the board.
- A power LED with override.
- Unregulated power pins (supplied from USB 5V if connected, Li-Po if not) from roughly 3.5V-5.5V suitable to attach to an external regulator.
- A 12MHz and 32.768MHz crystal for accurate clocking and communication.
- SPI header pins to add additional devices to the on-board SPI bus.
- Multiple readily-available hardware SPI slave-select lines. Up to thirteen can be readily provided with hardware support (the board consumes two of the fifteen that the microcontroller supports), or an effectively unlimited number of slave selects if a software solution is used.
- You can use the CPLD to provide the exact number of SPI slave-select lines that you need for your application. Don't need any? You don't need to waste pins on them. Need seven? Use three lines from the MCU and let the CPLD produce seven slave-select signals for you.
- JTAG/SWD programming and debugging with a Raspberry Pi - no special programming hardware required.
- Planned support for USB programming (not currently implemented).
Interested?
Sound interesting? Please read on using the navigation link below and to the right ("One-Minute LED Blinker") or the navigation links at the top of this page ("Blinker", goes to the same page).