Let's start with a solution based on stm32f100 board.
This board can be used instead of stm-discovery. The board have a CAN interface. This interface is main for modules communicate in system.
Examlpe of use board as develop sensor module:
Current boxes produced by the company GAINTA.
GAINTA (http://www.gainta.com/din_rail_housing/din_rail_case/) produces her pcb. However, for my decision, I developed my own development PCB.
STM32f100 board can mount in differents positions:
Example use of STM32f100 board as UART-CAN gate:
This construction in D1MG box:
For example uses STM32F100 board as set of sensors - temperature, humidity, pressure, illumination, CO2:
In box without covers:
In box with covers:
Other examples of using STM32F100 PCB.
8/9 channels GPIO module. Work with DS18B20, iButton, 5V GPIO with a pull up or pull down. Up to 560V galvanic isolator:
External board of PLC Modem on developer board:
These units can be installed not only in the cabinet, but also on the wall.
1. The DIN-rail is cuting up into the unit size.
2. The unit is mount on a double-sided scotch tape.
For programming this modules use C language.
IEC 61131-3 can be used. Project: http://www.beremiz.org
In the attached file CAN_GATE.7Z, the firmware for the CAN-Gate.
This firmware can be used as a template for your own programs.
Size of program is 12KB, and you can use KEIL as free-evalution mode (up to 16K).
KEIL project in archve, KEIL: Embedded Development Tools
Using two boards of stm32 you can explore CAN-bus.
Terminal-program, current speed is 921600 bps
Consider a simple network of two controllers STM32F100 ( STM32F100 board ). In addition, you will need two USB-UART adapters. Download firmware CAN-Gate to MicroController.
Open two terraterm of the program.
In our example, COM14 and COM30 and research work of CAN-bus.
Piece of workplace: