-Code in a PIC to control model railways linked to a rapsberry pi (RPIC)
-Daemon to interface rocrail in a raspberry pi used as a central station to control model railways (RPICD).
-HW to interface raspberry pi GPIO
The raspberry and PIC (RPIC) is a very basic electronic circuit to have a multiprotocol central station running in the raspberry pi.
RPIC is basically code running on a Microchip microcontroller (currently a pic16f1825)
The main motivation to produce this firmware has been the failure in making DDX (from rocrail) running on the rpi . In the best scenario, the rpi was capable of use ddx through an usb adaptor, consuming a considerable amount of resources in the raspberry. You can see some of the posts to check the problems found whilest trying to get the rpi running with DDX
Thus, and inspired by the MDRRC Digital RailRoad Control by Robert Evers, I decided to develop my own ucontroller central station.
Yes, it is yet another solution for managing model trains. The main difference with other solutions is that rpic is born to be used jointly with rocrail and the raspberry pi. Of course, with the right HW adaptor, it could be used with other platforms, and with the right protocol, it could be also used by other pieces of SW… but for that purposes there are already many available solutions. The objective was to complement the raspberry pi with the minimum pieces of HW to get a full control center.
Currently RPIC works together the rocpi library created for rocrail. There are basically two modes of use: as an auxiliary command station, or as the main command station.
RPIC as auxiliary command stations
The rocpi library can be used as a secondary station to make use of the GPIO port of the raspberry pi. In this case, the ucontroller and max3232 of the schematic, can be removed.
In the current version, what the user will obtain is:
-A led informing the daemon is up and running or not
-A button to reset the daemon (short pulse) or turn off your raspberry pi (pressing the button for more than 4 seconds).
RPIC as main command stations
The current features included in the firmware are:
-Support for MM1 and MM2 protocol
-Support for NMRA (long and short addresses) – 14,28 and 128 steps
-Support for NMRA accessories (no extended accessories so far)
-Support for writing CV.
There are some other eastern eggs - as the capability to generate MFX messages). The development is not completed and coming features include:
-Full support to reading and writing cvs, only on the main
-Segregated programing track (PT), with the possibility to run both the trains and send commands to the PT.
-MM accessories, MM1Fx and the special protocols MM3, MM4 and MM5 available in ddx (under demand)
-Capturing of power consumption from ORD-2 and ORD-3 boosters.
-At least complete the research on MFX.
View full history Series and milestones
trunk series is the current focus of development.