Categories

RoseOnRails – WIP

Hi.

Yesterday, Yann and I finished the test on the UART communication between the nrf51822 and the STM32F103. We can now light on/off an LED with the required color by writing the corresponding value in a BLE characterstic. We checked with gatttool and it works fine!

This morning we had our presentation where we presented our product, the main people potentially interested by buying it, as well as the price we would sell it at.

This afternoon, we took the final decision of not using optical captors for detecting the train’s position, but simply the Hall sensors, since we already have all the required GPIOs on the PCB and that furthermore, we can simply detect the position of the train as well as knwo on which LED it has passed only thanks to the Hall sensors.

Later on, Noémie, Yann and I worked on the ADC on the nrf51822. More precisely, we studied the datasheet to better understand how it works (which pin to choose for the input, what type of reference : external or internal, etc.) and then we completed Noémie’s code to test the funcionlity. For this, we used an external reference of 1.2V and read the value (with gdb breakpints) returned by the function reading the GPIO pin state. We obtained the expected result.

Finally, tonight, Yann and I did the test for the Hall effect sonsors. For this, we connected our Hall effect sonsor to the nrf 51822, and we implemented a continuous notification of its detected value through BLE. For testing, we enabled the reception of notification with Gatttool and effectively managed to see the activation (0->1) when the Hall sensor detected our little magnet.

That’s it for today. Se  you!

Hall sensor

Hi everyone,

To finish our schematics, we must define the model of the hall sensor we are going to use. So I have made some tests with them, and determined the best model would be the A1121. It works up to 6mm away from our neodymium magnet, making it possible to be placed under the rails. The A1122 model decreased that distance to 2mm, obviously not adequate for our project. I added a 500Ohms (the largest I had) resistor connected to the VCC, to define a voltage for the high impedance state. It works flawlessly even at speed.

The photo below illustrates the circuit I used. If you look at the oscilloscope, you can actually see two detections, one for the first magnet, and another for the second. It is achieved using its persistence function. I also tried to evaluate the effect of having the rails powered with +21V, and the results remained the same.

IMG_20140325_211932

Gleison.