[SpiROSE] Fixed Base and LCD screen

This week, I have worked on the fixed base, which is basically the ST STM32F746G-Discovery DevKit. Its role is to be the interface between users and SpiROSE since it will eventually be able to start/stop the device, to let the user choose what demonstration he wants to be displayed on the 3D screen, to drive the ESC and to handle safety issues. The DevKit comes with an integrated LCD 480×272 touch capacitive screen, which, we hope, will enhance user-friendliness.

To drive it properly, we decided to use a GUI library called µGFX. We thus had to integrate it along with the ST HAL drivers, the GNU Arm Embedded Toolchain as well as OpenOCD to debug the board. Once that was completed with no error whatsoever, we were able to dive in the API to get going. As regards Continuous Integration, to go beyond linting, I will have to find a way to test the program relatively to what is it supposed to display or what is it supposed to do when a given input occurs on the touchscreen.

I also worked on the IMU part. We already had a NXP FRDM-KW41Z board with an integrated SPI/I2C compatible accelerometer/magnetometer NXP FXOS8700CQ that could be bound to the DevKit with its Arduino connectors, so we didn’t bother finding another option. Since only the accelerometer is of any use for the project, I just had to flash on the NXP board a simple program that would set the right pad multiplexing so as to have SDA and SCL (I2C Data and Clock) driven properly from one board to another. I didn’t bother building an entire project based on the GNU Toolchain, but used instead NXP online tools. The accelerometer is capable of outputing data at 800 Hz, but there is no use for such speeds. One measurement every tenth of a second should be enough to detect a random displacement of the structure and to shut the motor down, in case of emergency. There again, I will have to determine the tests to be applied for the I2C communication between the two boards. For now I am able to display on the screen the IMU data along three othogonal axes. The data remain to be processed to know whether at a given moment, the accelerations measured are within acceptable range, this can only be implemented after tests on the actual structure, since we have to filter the accelerations due to vibrations.

As regards the interface, it is not looking fancy yet, but for now, three menus are implemented, one control menu for the user to start/stop SpiROSE, another to choose the demonstrations to be displayed and finally one console-style menu meant to display ERR/OK messages after virtually every component initialization or change (typically the configuration of the accelerometer with specific writes over the I2C bus). It will also ease debugging during the remaining development phase.

What’s next for the fixed base ? Once the potentiometer is received, it will be integrated. It is not important for now, but a lifting of the interface will be needed later.


First version of the interface, displaying the IMU values and a slider simulating a potentiometer

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>




This site uses Akismet to reduce spam. Learn how your comment data is processed.