Electronic – Communication via I2C sensor via CAN bus

cani2cmicrocontrollersensor

I am wondering if it is possible to implement the following idea:
I want to build a network of sensors, all of them communicate via I2C protocol and all those sensors will send their parameters via CAN bus to the main microcontroller that will handle all those data to execute some determined command.
I know it is necessary to have one microcontroller for each sensor to implement the communıcation between the sensor and the CAN Bus.

My question is, is it possible for the microcontroller (with CAN peripheral) receive those data from I2C protocol "transform" them into CAN protocol and send them to the master microcontroller located in another point from CAN BUS?

Thank you

Best Answer

A microcontroller which looks after a sensor would be a master on the I2C bus. It would package the data from the sensors and send it on the CAN bus. You would have one long range CAN bus and many local I2C buses. That's a fairly common architecture for a CAN bus.

So, yes, it's possible.