Products

Project 2: MinIMU-9 v2 with EagleSoC Dev. Board

This project demonstrates MinIMU-9 v2 interface with the EagleSoC board via Inter-Integrated Circuit (I2C) protocol. The MinIMU-9 v2 sensor is used to calculate Euler Angles displacement based on the Accelerometer, Magnetometer, and Gyroscope readings. The acquired information is corrected in real-time via built-in Direction Cosine Matrix (DCM) algorithm. MinIMU-9 v2 sensor is shown in Figure 1.


Figure 1: MinIMU-9 v2 Sensor

PSoC Creator allows drag and drop of hardware modules in the "Top Design" area. The interfacing components for each hardware block with required interconnections are shown in Figure 2.


Figure 2: Top Design

Open up your PSoC Creator 3.0 and start a new project. Choose the project name and the directory you want to store it.


Figure 3: Starting New Project

For EagleSoC board choose a PSoC 5LP template for your project.


Figure 4: Setting PSoC 5LP Template

In order to use the EZ-PSoC Library, you will have to manually add it to your project. Open up project build settings as shown in Figure 5.


Figure 5: Project Build Settings

Select the Compiler Configuration


Figure 6: Compiler Configuration

On the right hand side, click on Additional Include Directories.


Figure 7: Additional Include Directories

Click "New" and browse for the EZ-PSoC5_LIB folder on your computer.


Figure 8: Browse EZ-PSoC Library

Once you found the EZ-PSoC5_LIB folder, click OK.


Figure 9: Set EZ-PSoC Library

Select the Linker settings on the same configuration window.


Figure 10: Linker Configuration

Click on Additional Libraries on the right hand side.


Figure 11: Additional Libraries

Click "New" button.


Figure 12: New Additional Libraries

In the two top fields enter "EZPSoC5" and "m" respectively. This will set EZ-PSoC library and math library to your project.


Figure 13: EZ-PSoC and Math Libraries

At the same configuration window, select "Additional Library Directories".


Figure 14: Additional Library Directories

Click on "New" button.


Figure 15: New Additional Library Directories

Browse for EZ-PSoC_LIB folder one more time and click "OK".


Figure 16: Browse Additional Library Directories

Click "OK" again to set EZ-PSoC library directories.


Figure 17: Set Additional Library Directories

Before exiting configuration you must disable two more Linker options! Warning, failure to do so will cause problems with floating point objects, which is crucial for this project. By default, Cypress has enabled Default and Newlib-Nano libraries. You must set them to "false" as shown on Figure 18. Then press OK to complete project configuration.


Figure 18: Default Libraries and Newlib-Nano

You may expand your Top Design project view to a comfortable resolution. Figure 19 shows the control panel for zooming in and out of the Top Design project which you can alter at any time to your preference.


Figure 19: Top Design - Comfortable View

Now we are ready to add components. On the right hand side of your PSoC Creator you may find Component Catalog. In its search field type in "Timer"


Figure 20: Component Catalog - Timer

Drag and drop the timer object anywhere on the Top Design area.


Figure 21: Drag and Drop Timer

Double-click on the timer's clock component and use Figure 22 to set a New clock with frequency of 100kHz and tolerance of -/+ 5%. Click "OK".


Project 2 - Second Page