ChibiCube hardware explained

ChibiCube hardware explained

1 In this article

By this article, we will show schematic of ChibiCube in order to understand how it works and hot it has been designed.

2 Toward ChibiCube schematic

As mentioned in the previous article, ChibiCube addresses all its LEDs through the combination of anode and cathode signals. Each floor of the cube is configured as common anode, while the various cathode signals are separately connected to the outputs of the Shift Register. Setting the anode voltage to a value equal or greater than the high logical threshold of our SR, for the same principle illustrated in the tutorial Meeting SPI, we can address single LEDs of the floor. To make it simple, consider a cube 4x4x4: the diagram of a single floor would appear as in Fig.1.

ChibiCube plane schematic
Fig.1 – A schematic of a plane from a 4×4 LED cube.

This schematic is different from the one shown in SPI tutorial in some points:

  • The SR is a 16 bit one and is a LED driver. Output current is fixed choosing R-EXT and we don’t need for a resistor on each LED;
  • To make schematic simple, LEDs are oriented as a 4×4 matrix;
  • The common anode is addressed by MCU thought a P-MOS, instead being connected directly to power supply;

continue reading…

STM32F3 discovery and MEMS

STM32F3 discovery and MEMS

1 About

1.1 Still STM32F3 discovery

STM32F303 Discovery
Fig.1 – A STM32F303 Discovery. Click on it to reach its official page.

Reading Giovanni Di Sirio’s tweet announcing the release of ChibiOS/RT 3.0.0 preview, the reaction was enthusiasm. So I dusted off my first love, the STM32F3 discovery, to give a try to this new version of the Lizard. A few hours later took shape the demo we are going to discuss in this article.

We will show how to alternately read the data from the two MEMS mounted on the discovery and made some LED games according to read data.

1.2 Documentation

Before starting, we link the “must-read” documentation for optimal use of the micro-controller:

STM32F303VC Reference Manual STM32F303VC Datasheet STM32F303xx Discovery User Manual

and datasheet of both MEMS, L3GD20 (the gyroscope) and LSM303DLHC (the accelerometer/magnetometer):

L3GD20 Datasheet LSM303DLHC Datasheet

2 The demo

There are four LED games during three of which data is captured by MEMS. To do this, we create two threads: one checking button and the other managing data and LED games.

2.1 Main thread

After HAL and Kernel initialization, the main() configures the USB, start a second thread and enters its loop: here, the main read button status. We should note that entering in the second if means the button is pressed and then released, furthermore the inner sleep is to prevent accidental inputs (for example if there is a mechanical rebound from button). When the button is pressed, a flag is raised, and a variable is incremented in a cyclical manner (from zero to the number of games minus one). continue reading…

Introducing ChibiCube

Introducing ChibiCube

1 About

ChibiCube is a 3D LED matrix 8x8x8 composed by monochromatic LEDs individually addressable: that means not only every single LED could be in a ON or OFF state but everyone could be set at different light intensity.

2 Inception

In December 2012, students Ciro Domenico Pagano from University of Salerno, Antonio Galano from Federico II University of Naples and Vincenzo Brillante from University of Sannio start their training at Naples site of ST Microelectronics.

In order to understand uses of ChibiOS and STM32 MCUs, their Tutor Giovanni Di Sirio suggested the design of a small 4x4x4 LED cube. This first version was made on a prototyping board and driven by a STM32F407 Discovery using parallel wiring.

Months later, the cube was engineered in a new version 8x8x8 upgradable to 16x16x16 connecting 4 PCBs together.

ChibiCube prototype
Fig.1 – A prototype of a 4x4x4 LED cube.

continue reading…