Interactive web site of Télécom ParisTech's ELECINF344/ELECINF381 Robotics and Embedded Systems classes (a.k.a. ROSE, 2012 session).


SaMoRa, bus CAN runs after some problems.


Today, we had a hard day.and many problems to communicate on the CAN bus.

  • First problem, the configuration of CAN bus. There are many timing configurations. Particularly for the synchronisation of each node on a frame. So we decided to use the nmra standard at 125 Kbits/s. It’s relatively slow but we had many difficulties to go faster.
  • Then, we tested the bootloader to send many frames and we were able to flash the first boards but the others were too far on the bus and they didn’t receive any frame. During the afternoon, we realized that last boards were not enough electrically supplied. Indeed, at the end of the bus we had only 2.4V. Therefore, we increased the voltage supply and we were able to flash all the boards with the bootloader.
  • After that, we fixed some bugs in the lights, sensors and bootloader’s firmware. Now, we can flash the firmware of each board with the bootloader by the CAN bus and we can control the lights and listen to sensors through the bus.
  • To finish, we rewired the CAN bus and we put the railroad on the table.


just some pictures of ligths for fun ;)

Tomorrow, we will work on the station and we will probably test the controller.


SaMoRa’s team

SaMoRa progress, it’s time to assemble modules


Today, Brice worked about Server. He is able to send commands to train and base station translate this in DCC to lead trains and switches.

Bootloader runs. we put it on all cards and we will not need to flash all cards individualy. So we are able to flash all cards of a specified type in one time.

This bootloader has two parts:

  • One part is on the station and another part is on all daugther boards. This part receives the new firmware (compiled in 0×08004000) by serial port  and it sends this firmware on CAN bus. The first frame is a BEGIN_UPDATE frame. Since the boards have the correct ID receive this frame and they switch in update mode and they erase their old firmware. After base station sends frame with data (new firmware) and all cards in update mode write this new firmware in flash. Finally, base station send reset frame and all cards reset on the new firmware.


Tomorrow, we will try to merge all modules like traffic ligth  board and sensors.

See you soon,

SaMoRa team.

SaMoRa: Bootloader, traffic sensors and CAN HAL for STM32F2xx



Today, we worked respectively on bootloader, traffic sensors and CAN HAL.

  • Bootloader is very difficult to implement. We have to complete crt0.c of ChibiOs. We have to copy vector table and got section in RAM to add offset of these relatives address. Now, we are able to branch the main but after there are a bug.
  • CAN HAL is in progress. We will test it soon.
  • Traffic sensors work but code will be improved tomorow. And we need to inface this node with the base station. Moreover we dumped packets between booster and remote, to analyze the protocol.

Pictures of our experiments

SaMoRa’s Team

SaMoRa is on the rails


Yesterday, our PCBs are finished. So, we work about software. Clement worked on remote control and xpressnet protocol, Brice continued to work on NMRA server and compilation chain and I worked on firmware for traffic lights card. Yesterday, we had a problem to flash traffic ligths card and remote control card because they don’t have JTAG. So we should take a python script and we should configure ports to flash card. Yesterday evening we flashed card with success. Now we can test and debug our code on small cards.

see you soon,

SaMoRa team

SaMoRa : Progress on bootloader


Today, we worked on the bootloader 0. We updated him in order to be able to switch in recovery mode after a cold boot.

Just to remind this bootloader is for cards of trafic light, switch and remote control. The last version switch in recovery mode only if firmware 1 and 2 crash. So if the update function have a bug, it’s impossible to update the card.

Moreover, the recovery mode is a very simple firmware which is  able to listen CAN Bus and update or remove firmware and reset the card.

EDIT : A light optimization we reset after cold boot and without recovery instruction.

See you soon,

SaMaRa team.

SaMora’s PCB


This week, I worked on the basis station’s PCB design. It’s difficult because I had many compatibility problems. We will not make the captors’s PCBs. So, our basis station should be compatible. For exemple, I should choose the transceiver CAN in term of theses on the captor’s stations. I had chosen wifi module : the GS1011MIE. (http://fr.farnell.com/gainspan/gs1011mie-smp/module-wifi-w-int-pa-ant-con/dp/2077376) and the ethernet module. I finished the pinout of STM32F207VET6. It’s very difficult to choose goods components but it’s very interesting because I can see little differences between two components and I try to see why one is more adapted than each others.

The next week I will try to route the PCB.

Best regards,

Guillaume for SaMoRa team

SaMoRA : chips and first tests


After the communication chalenge of friday, we work about SaMoRa. Brice begin to work about soft. We would like to use a STM32F207VE (http://www.st.com/internet/mcu/product/245081.jsp) on the base station, because we know his architecture and it matchs our specifications and it is less expansive than STM32F207VC (http://www.st.com/internet/mcu/product/250188.jsp). This CPU should control CAN bus for sensors, two DCC bus for train (one to manage trains and one to recompute trains), wifi conexion and ethernet conexion and make sure railroad. We would like to make a chip to allow people to take control of trains with a remote. We need to chose the CPU but we would like use a very small CPU, this chip should convert remote protocol to CAN protocol. this chip sould be conected to Bus CAN and if an user plug remotes and send commands to the base station. This chip should be supply by CAN bus. And we would like to make a chip to send analogic video from the train to laptop over ethernet. This chip should have a RF receiver and an ethernet output.

After, we decide to use ChibiOS (http://www.chibios.org/dokuwiki/doku.php), it ‘s a real time OS and we begin to use it to control DCC and CAN. Actualy, we are in test step.

Actualy we are testing and managing trains with remote control just for fun :)

Best regards,

SaMoRa team.

last few days work


The last few days, we tryed to chose components for SaMoRa. We find a ADC for video and we did some research about god eyes video camera (especialy to understand the ouput format). So we try to chose a RF antenna to send/receive video from trains to central card. But it’s very difficult to chose it because many antennas use modulation and we should be sure that we will be able to demodulate the signal. After we chosed the RJ45 wire for central card. And we performed the architecture. we look for to put an fpga to do a part of the video treatment and we finished to undertand bus-CAN protocol.

To conclude, choice of components it’s very important, it’s the base of all our work.


Guillaume for SaMoRa’s team.




SaMoRa, look for camera.

Yesterday, we worked about cameras, we chose to embeded an analogic cameras in trains and a digital camera to make a god eye.
Analogic camera will be linked by RF transceivers and Digital camera could be plug with wire.
After we look for real time OS in order to we will try to use it.
Good evening,
Guillaume for SaMoRa

SaMoRa : presentation and research

Yesterday, we searched ideas to improve our project. We would like to put a video camera on each train to allow people to take control. We would like to put some lights on our train to create a night mode and we would like to develop a system to detect an obstacle on rails.

Today, we work about our presentation. First, we are trying to imagine a kind of architecture. This architecture will allow to reduce number and length of wires.

Then we tried  to imagine different steps of our project and we did a schedule. This schedule is very important to have deadlines for each step.

To conclude, we allocated tasks to each member of our group and we chose a name : SaMoRA (Safety Model Railroad).


Brice Gelineau, Clement Péron, Guillaume Bolbenes