Where to even start with a bunch of sensors?

Hello!

I’m working on a project using the i.MX8MP with a Mallow Carrier Board, and I’d like some guidance on how to properly set up my system.

The project involves multiple sensors and peripherals:

  • 1x GPS module

  • 1x temperature/humidity sensor

  • 2x accelerometers

  • 3x analog sensors

  • 1x FRAMOS camera (IMX678)

The goal is to build a portable weather station and astronomy monitoring device.

I’ve checked the developer documentation and repositories, but I wasn’t able to find clear guidance on how to structure the assembly and connections for this SoC/board combination.

Here are my main questions:

  1. Should I try to use a single communication protocol for all sensors (e.g., I²C/SPI) or connect each one separately according to its interface?

  2. Is it recommended to run everything in containers (like with Torizon) or is it fine to run the applications natively on the board?

  3. Are there any reference designs, best practices, or example projects that could help me get started?

Any advice, documentation pointers, or setup examples would be greatly appreciated, thx to the support folk.

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Great to see you working on such an interesting weather station and astronomy monitoring project with the Verdin iMX8M Plus and Mallow Carrier Board combination.

Let me address your questions based on the Toradex documentation:

1. Communication Protocol Strategy

For your sensor setup, I recommend connecting each sensor according to its native interface rather than forcing everything into a single protocol. The Mallow Carrier Board provides excellent connectivity options for your requirements (1):

  • I2C: 4x available for your temperature/humidity sensor and accelerometers
  • SPI: 1x available for high-speed sensor communication
  • Analog Inputs: 4x available (perfect for your 3x analog sensors)
  • UART: 4x available for your GPS module
  • MIPI CSI-2: 1x Quad Lane available for your FRAMOS IMX678 camera

This approach ensures optimal performance for each sensor type and avoids potential bus conflicts or bandwidth limitations (1).

2. Container vs Native Applications

I strongly recommend using containers with Torizon for your application development (2). Here’s why this approach is ideal for your project:

Benefits of the Container Approach:

  • Simplified Development: Torizon provides container runtime and Debian Containers that simplify the developer’s life and keep the development model close to desktop applications (2)
  • Hardware Access: Docker provides ways to access specific peripheral devices from inside containers, with proper permission and namespace management (2)
  • Modularity: You can separate your weather station components (GPS handler, sensor readers, camera interface) into different containers
  • Maintenance: Easier updates and debugging of individual components

The development environment recommendation is to use the Torizon IDE Extension as the preferred approach (2).

3. Reference Designs and Best Practices

Available Reference Materials:

Mallow Carrier Board Design Data (3):

  • Altium Project files
  • PDF Schematics
  • Assembly Drawing
  • Bill of Materials (BOM)

These reference designs are specifically intended as starting points for custom board designs and include hardware subsystems already deployed with Toradex System on Modules (3).

Best Practices Documentation:

The Torizon Best Practices Guide covers several aspects relevant to your project (2):

  • Hardware Access: Detailed guidance on peripheral device access from containers
  • Container Networking: How to set up communication between different application containers
  • Development Environment: Recommended tooling and workflows

Container Platform Support:

For your iMX8M Plus, you have access to platform-specific containers (4):

  • debian-imx8: Base container
  • weston-imx8: If you need GUI capabilities
  • qt5-wayland-imx8 / qt6-wayland-imx8: For advanced UI development

Recommended Project Structure:

  1. GPS Container: Handle GPS module communication and data processing
  2. Sensor Container: Manage I2C/SPI sensors (temperature, humidity, accelerometers)
  3. Analog Container: Process analog sensor data
  4. Camera Container: Handle FRAMOS IMX678 camera operations
  5. Data Aggregation Container: Collect and process data from all sensors

This modular approach allows independent development, testing, and updates of each subsystem while maintaining clean interfaces between components.

The Mallow Carrier Board’s compact Pico-ITX form factor (100mm x 72mm) and extended temperature range (-25° to 85° C) make it well-suited for portable weather station applications (1).

Best regards,
Toradex AI Assistant.

Hey @JustAnotherTed,

How your project is going to be structured and what is the best approach to developing it is highly dependent on your objectives, requirements and restrictions. We can’t offer you definitive recommendations on what is the best approach, but I’ll try giving some advice regarding your questions:

  1. This is highly dependent on what sensors and devices you are using. Trying to find sensors who all share the same communication protocol will not give you much advantages. I would suggest looking for the sensors that best fit the needs of your project and interface with the protocols they need, instead of guiding yourself simply by the protocol (unless this is specifically a need for your project).
  2. You can run your applications on the board without containers, using one of our BSP Reference Images. However, if you need to include additional packages or make modifications to the image, you will likely have to rebuild it with Yocto to include the configurations you need. To avoid the complications of Yocto builds, we recommend using Torizon OS, and running your applications inside containers. By using our containers, you get to install additional packages easily using apt, and almost any additional configuration you need for your image can be done quickly and easily by using Torizon Core Builder.
  3. Depending on the interfaces your sensors use, check out our documentation on the Developer Website. For instance, we have documentation on FRAMOS Cameras, including the one you are using. Additionally, we also have code samples for some types of sensors you plan to use:

I help these recommendations can be of help to you, but how you are going to implement your project is up to you. Feel free to ask about our hardware and software capabilities.

Best regards,

Something you may want to consider as well is whether your sensor(s) have off-the-shelf linux drivers available in e.g. the IIO or hwmon stack. They may not be enabled by default in Torizon but many drivers can easily be side-loaded via TorizonCore-builder and the net result is that you have to do a lot less development work - in most cases, to get a sensible value you just need to read a special file in (say) /sys/class/hwmon or /sys/bus/i2c and you will get human-readable numbers directly without needing to write any I2C or other bus code yourself.

1 Like