1 enero 2013

RPI and Rocrail… bad news with the 2013

Category: Electrónica,Raspberry pi,Rocrail — Manolo @ 21:49

This afternoon I extended the tests. Some extra information:

The serial port in the rpi ttyAMA0 does not seem to be able to generate the dcc signals. The tests I made where with a Motorola loco.

ttyAMA0

TAMS (motorola) OK

Loksound (dcc) Not OK

DIY acc decoder Not OK

The work around so far is to make use of a USB-Serial adaptor:

ttyUSB0

TAMS (motorola) OK

Loksound (dcc) OK

DIY acc decoder OK

I will post if I found out more…at this point it is clear considering the fifures above that the ttyAMA0 is no generating the entire signal. It seems the ttyAMA0 is not capable of changing the baudrate.

30 diciembre 2012

Raspberry Pi and Rocrail test, RS232 adapter

Category: Electrónica,Raspberry pi,Rocrail — Manolo @ 1:49

Finally I have been able to prepare an adapter for the uart port at the rpi and check that rocrail works perfectly (so far). Hereafter a small video demonstrating the achievement.

Rocrail is using the ddx library to send the commands through the serial port of the rpi. The booster board (ord-3) is powering the test track. Peter Gilling, designer of the board, advised on reducing the value of the resistor R1 – I am currently using 390 ohms- , this is also convinent for usb-rs232 converters. He was also concerned about the rpi being able to generate the signal… This is something that needs further tests… so far, with just one loco and without launching rocview, it seems to work OK.
The raspberry has been adapted with a connector to generate the right voltage levels. It is based on this design I found on internet.

I am attaching hereafter the schematics and the board.

serial

serial_pcb serial

I have left some jumpers to select the signal being generated in the UART pins or other GPIO pins. In this way, if I want to play to generate the signal directly, and not though ddx, I could have a test board… this could also help to experiment and activate certain functionalities not available with usb converters -i.e. shortcut detection or programming track. In the same way, power can be selected (5v or 3v).

Note that the connections of this board would require a null-modem cable. The ORD-3 is expecting the signal in pin 3 (where the RS232 port of a PC would provide it), and the adaptor is generating the signal in pin 2. In fact, the adaptor is prepared to connect the rpi to a PC.

Obviously, it is possible to create a board with the right pin layout to directly interface the ord-3:

serial_cross_pcb

serie_cross serial_cross_pcb

Last but not least the guideline to use rocrail in a raspberry pi has been updated:

Setting up rocpi_v1.3

7 octubre 2012

Rocrail and the raspberry-pi

Category: Electrónica,Raspberry pi,Rocrail — Manolo @ 18:42

Por fin he podido probar la raspberry pi que recibí en verano con rocrail. Como también voy a publicarlo en el foro de rocrail, lo he documentado en inglés… pero si cualquiera necesita ayuda en castellano, no hay más que pedirla.

Finally, I have been able to test the raspberry pi with rocrail, at least I have been able to compile and execute the program. I still need to check if the library use to generate the control signal over the serial port (ddx) works properly, and if the configuration for Loconet explained in the last posts is also working in raspberry. Anyway, the result is pretty cool and I do think ther rpi could become a nice DIY central station with my favourite control software.

Having rocrail in the rpi, makes it possible to have different contrlo clients: android, iphone, ipad, etc…

I have created a document trying to explain step by step how to make rocrail running in raspberry. It also contains some instruccions  to customise the rpi:

Setting up rocpi_v1.4

Please note that most of the information in the manual is coming from the forum and web-site in rocrail. The document, was built for my own use as repository of the ideas and steps I was following. Hope it is useful. I have also created a debian distribution for the raspberry… but I have not tested (feedback is welcome):

rocrail-setup-rev4011-rocpi-armhf