Jump to content
 

Raspberry Pi 400 for DCC


Recommended Posts

I hope this is within the forum rules and not seen as advertising. It applies to any DCC hardware that has a USB interface, and I wanted to share this

 

PiSPROG400.jpg.4c0b1cfd1175169aa0e655ce822b66c9.jpg

 

A SPROG II connected by USB and/or a Pi-SPROG 3 connected directly to the GPIO.

 

Just add a screen (or two!), mouse and JMRI. A little more setup and it can work as an access point for WiThrottle or EngineDriver apps.

 

I not sure there are any Pi 400 left in stock, however :(

 

Andrew

 

  • Like 3
  • Thanks 1
Link to post
Share on other sites

There is stock at some places, though I expect supply will be limited for a month or two, as with most PI new releases. 

 

As a device, it looks very useful; a small price for the reduction of boxes, leads, etc.. over doing it with individual parts.    

 

 

Andrew's "Pi Sprog" reminds me of the memory box on the back of a Sinclair ZX81 !  (Yes, I know the memory was on the other side.)

 

 

Link to post
Share on other sites

14 minutes ago, Nigelcliffe said:

Andrew's "Pi Sprog" reminds me of the memory box on the back of a Sinclair ZX81 !  (Yes, I know the memory was on the other side.)

 

Hopefully the connector is a bit more reliable :)

  • Like 1
  • Agree 1
Link to post
Share on other sites

9 minutes ago, Crosland said:

 

Hopefully the connector is a bit more reliable :)

 

And not need cooling of the processor and voltage regulator to stop it crashes :-)   
I used an ice-pack from a freezer to make mine usable, but it meant a bit of water condensate dribbling around it all, so a cloth was needed to mop up on a regular basis !

 

-  Nigel

 

  • Funny 1
Link to post
Share on other sites

  • RMweb Premium

Could I ask please as to what is seen as the advantages of using the Pi 400 with a Sprog over, say, a small netbook, which can be found for around £199 presently? Although slightly dearer they are all-in-one, screen etc. I'm just trying to understand the alternative options these may produce.

 

Thanks

 

Izzy

Link to post
Share on other sites

20 minutes ago, Izzy said:

Could I ask please as to what is seen as the advantages of using the Pi 400 with a Sprog over, say, a small netbook, which can be found for around £199 presently? Although slightly dearer they are all-in-one, screen etc. I'm just trying to understand the alternative options these may produce.

 

 

Depends on the "netbook".   
If its a "Chromebook", then you're into moderate level computer skills to put an operating system on it that can run JMRI or iTrain.  

If its a "Windows" device, then, if Windows 10S (many small devices are), will need to unlock it to full Windows 10 to allow installations of software not on the MS Store (ie. any train control software,  the unlocking is fairly simple, but its a no going back change. ).  Then will have a Windows device, with fairly low hardware specification, with its pros and cons.  

 


The Pi400 is simple to setup as its own stand-alone access point for WiFi access from a phone/iPad.  

The Pi400 is aimed at the usual PI market; education, those who want to add their own hardware, etc..    So, the 40-pin GPIO socket shouldn't be overlooked.  That could be trivially plugged into a control panel of switches and LEDs which link back into JMRI.  

 

 

 

regards

 

Nigel

 

 

  • Agree 1
  • Thanks 1
Link to post
Share on other sites

  • RMweb Premium

Ah, thanks Nigel. Do I assume that once set up the Pi 400 could automatically boot the Sprog into command station mode with JMRI and access would be via phone/pad without the need for a monitor/screen? So just like switching on another make of DCC system. A stand alone system as it were from discrete parts. But small, cheaper, and highly configurable for those that can do such things. That is a good option. 
 

Izzy

Link to post
Share on other sites

13 minutes ago, Izzy said:

Ah, thanks Nigel. Do I assume that once set up the Pi 400 could automatically boot the Sprog into command station mode with JMRI and access would be via phone/pad without the need for a monitor/screen? So just like switching on another make of DCC system. A stand alone system as it were from discrete parts. But small, cheaper, and highly configurable for those that can do such things. That is a good option. 
 

Izzy

 

Yes.  It is very simple to setup. 
Its almost automatic if using the JMRI download from Steve Todd's site.   Most settings will automatically configure; making PI an WiFi access point, turning on WiThrottle Server,  setting configuration to Sprog,  etc..   though I think what you ask requires one config change to be in "command station" rather than "sprog programming" mode.  

 

It would be wise to use a mechanism on the smartphone to shut down the PI correctly, rather than just "pulling the power" which isn't ideal.  Or could use a physical button on two GPIO pins on the rear of the PI for shutdown. 

 

 

- Nigel

  • Thanks 1
Link to post
Share on other sites

1 hour ago, Nigelcliffe said:

It would be wise to use a mechanism on the smartphone to shut down the PI correctly, rather than just "pulling the power" which isn't ideal.  Or could use a physical button on two GPIO pins on the rear of the PI for shutdown. 

 

That's covered on the Pi 400 :) Press and hold Fn and F10 to power down safely.

 

You do, however, have to unplug the power supply from the Pi 400 and plug it back in to restart. Switching off at the mains doesn't work so well as the PSU holds a bit of charge and the Pi 400 is taking very little current in powered down state.

 

  • Like 1
  • Informative/Useful 1
Link to post
Share on other sites

  • RMweb Premium

This is all very interesting to me, and no doubt many others, so my thanks for all the info posted. 
 

I see from the link above that a USB on/off switch is also available for little extra cost

although all the ‘extras’ do tend to mount up the total outlay. Is the ‘all-in ‘ package the best answer. I presume it all depends....

 

There are a couple more questions if I may, which will probably show just how dense I am, so forgive please.

 

It says the Pi 400 o/s is loaded and run on a micro SD. So I wonder, how is the Steve Todd JMRI install loaded /used as this is also via a micro SD if I understand it all correctly, which I may not. As well as - on the same card - or instead of? I am again presuming that there is no internal drive/storage capacity. Or have I got this wrong.

 

Then there is my Sprog2 v2.7. Is this too old to be used, the driver issue of serial/usb? Would it require a new generic USB driver version Sprog2? I just like the idea of getting away from reliance on ever changing mainstream O/s. I guess many do.

 

Izzy

Link to post
Share on other sites

3 minutes ago, Izzy said:

It says the Pi 400 o/s is loaded and run on a micro SD. So I wonder, how is the Steve Todd JMRI install loaded /used as this is also via a micro SD if I understand it all correctly, which I may not. As well as - on the same card - or instead of? I am again presuming that there is no internal drive/storage capacity. Or have I got this wrong.

 

Then there is my Sprog2 v2.7. Is this too old to be used, the driver issue of serial/usb? Would it require a new generic USB driver version Sprog2? I just like the idea of getting away from reliance on ever changing mainstream O/s. I guess many do.

 

 

First question - Steve Todd's image file includes the PI operating system as well as JMRI.  So its a file put onto a micro-SD card.  You can either over-write the micro-SD card provided, or use a new card.   

If tempted to overwrite the Pi400 supplied card, it might be wise to wait until someone can confirm that the image works without issue on the Pi400 hardware.  

 

Second question - Andrew Crosland could give a definitive answer on your hardware.   I'd expect any USB Sprog to work on a PI without any issues.  No driver issues.   

 

 

 

- Nigel

  • Thanks 1
Link to post
Share on other sites

1 hour ago, Nigelcliffe said:

Second question - Andrew Crosland could give a definitive answer on your hardware.   I'd expect any USB Sprog to work on a PI without any issues.  No driver issues.   

 

I would expect it to work. If it doesn't I'll do my best to make it work :)

 

Generally SPROGs are never too old to be used. Microsoft have played a few tricks that make it easier for some and harder for others but with Linux they usually work.

  • Like 1
  • Thanks 1
Link to post
Share on other sites

Also available here:

https://cpc.farnell.com/raspberry-pi/rpi400-kit-uk/raspberry-pi-400-kit-uk/dp/SC15825

 

258 In stock

£90.91 Inc. VAT

 

I especially like that the Pi400 has a 1.8GHz Quad core ARM Cortex-A72 CPU.

"Normal" Pi4 are 1.5GHz

 

I've also seen mention of a beta firmware update that allows for booting from a USB3 disc drive. Even better!

Link to post
Share on other sites

I've ordered a Pi 400 from Pi Hut - I've been thinking about buying a Pi 4 for some time, but I was fretting about the required cooling arrangements. The Pi 400 solves this aspect and the integrated keyboard concept is very neat.

 

I plan to use mine not only to run model railway software, but also as a server for our house, running 24/7 with a large capacity SSD attached. I also fancy the idea of attaching a large touch screen (> 22 inch) and using that rather than the mouse for interaction. I'll report back on my progress.

 

Mike.

  • Like 1
Link to post
Share on other sites

Mine has arrived - very neat piece of kit. Some pictures of my Pi 400 package as delivered from The Pi Hut.Delivered_Package.jpg.6a0e3b3ac49b50543b924ea7e54a9f50.jpg

 

Package_Contents.jpg.c36496b4bf2e8a20696b9dd1fd8228d9.jpg

 

The two boxes contain the mouse and the power supply.

All the connections are at the back of the keyboard, excepting the WiFI, of course:

 

Pi_400_Rear_Connections_with_Legend.jpg.fc590a2ac9e8869f687a2cd8215b3be3.jpg

 

I show the legend for the connectors, as printed on the box.

 

The MicroSD card comes already installed in the slot - this contains the operating system.  I need to add an HDMI connected Monitor and a USB attached SSD drive for data etc.

 

Yours,  Mike.

Link to post
Share on other sites

On 09/11/2020 at 13:57, WIMorrison said:

People run iTrain on a Raspberry Pi .........

 

 

With iTrain how do people provide feedback for train detection on a Raspberry Pi?

 

I currently run Traincontroller but want to move away from this platform for various reasons discussed elsewhere but the cost replacing my NCE setup and all the feedback interfaces make it an expensive exercise.

 

I have a SprogII and a 5Amp booster so if its just a case of plugging in an interface into the GPIO for the feedback it might be a way to go.

Any advice appreciated.

Link to post
Share on other sites

The train detection uses whichever bus  you have connected from your feedback units to your command station and the Pi would connect to the command station via USB or you can WiFi but a wired connection is preferred. 
 

You can then use Xpressnet, Loconet, BiDIB, Z21, or a host of other connections over your USB or WiFi. It is  the command station that really drives the connection protocol and method and not iTrain - excepting that some command stations have difficult or undocumented interfaces.

 

 

Link to post
Share on other sites

  • 1 month later...

Further steps...

  • configure networking
  • install large USB drive
  • attach touch screen monitor

Configure Networking

 

The Pi400 has an Ethernet port and also WiFi.

Ethernet supports up to 1Gb LAN speeds.

WiFi supports both 2.4GHz and 5GHz bands.

 

Enabling Ethernet is trivially easy - simply plug in a Cat 5e or Cat 6 cable with an RJ45 connector which connects to your router. To check the speed of the connection, use

 

ethtool eth0

 

This shows a 1Gb LAN speed for my connection.

 

Enabling the WiFI is straightforward - you need to know the SSID and security credentials of the Router, separately for the 2.4Ghz and 5Ghz bands. To check the speed of teh connction use

 

wavemon

 

I encountered a problem at this point - I connected the Pi400 over both 2.4GHz and 5GHz bands, but the connection speeds were very disappointing, especially for the 5GHz band. After some discussion on the Raspberry Pi forums, it turned out that there was an issue with the WiFi drivers and I had to download and install a new driver file:

 

brcmfmac43456-sdio.clm_blob

 

Once this driver was installed, WiFi speeds were acceptable although not as fast as some of my other devices using the same networks.

 

Mike.

Link to post
Share on other sites

Install large USB drive

 

This step slowed me up considerably in the end - since I ordered a 256Gb Flash drive from MyMemory which got caught up in the frenzy of deliveries ahead of Christmas and I only received it on Jan 2nd.

 

The reason for needing a large USB drive is simple - the supplied Raspbian SD card is relatively small (16Gb) and is impractical for a system where you intend to install and run a lot of complex software. Initially I considered adding a 2.5inch SSD, but one of my sons showed me his USB flash drive which was physically tiny but with huge storage. I had to admit that this was a much neater solution.

 

So I opted for this 256Gb Flash drive from MyMemory:

 

MyMemory_256Gb_Flash_Drive.jpg.845f8d804a7c78e3634d872fe367c4af.jpg

 

This slots into one of the USB 3.0 slots in the Pi400 and is barely visible.

 

I then decided to make the Flash drive the boot drive and to remove the Raspbian SD card that was supplied with the Pi400. First, the Flash drive is considerably faster than the SD card. Secondly, it is just much simpler having one drive than two. So I cloned the Raspbian installation from the SD card to the Flash drive, removed the SD card to a drawer for safe keeping and have used the Flash drive ever since.

 

Once the operating system was installed on the Flash drive, I found that I had 207Gb of space free - that should be plenty unless I start downloading many hours of video onto the Pi400.

 

Yours,  Mike.

  • Like 1
Link to post
Share on other sites

Another change I made was to replace the wired Raspberry Pi mouse that arrived in the bundle with the Pi400 with a wireless Bluetooth mouse.

 

In the railway room, the fewer the wires the better. I hope to use the mouse as little as possible, by using a touch screen monitor. However, I can see cases where a mouse is likely to be easier to use. In that case, being able to use the mouse anywhere, without worrying about a cable, is a better approach. Fortunately I already had a Bluetooth mouse lying idle, so it got "repurposed" :rolleyes:

Link to post
Share on other sites

Adding the Touchscreen

 

My aim is to display a control panel on a screen attached to the Pi400 and to control aspects of the layout from that screen using touch - clicking directly on representations of points, etc. So I need a suitable touchscreen monitor attached to the Pi400.

 

After some research I decided to opt for the Iiyama Prolite T2252MSC monitor. This is a 22 inch LCD monitor with HD resolution (1920 x 1080). It has 10 point capacitative touch capabilities and, most importantly, can mimic a mouse on the Linux operating system as used on the Pi400. The video output to the monitor is via a standard HDMI cable from the Pi400 - and can include sound since the montor has built-in speakers, should the need arise. The touch input from the monitor is supplied via a USB cable - which I attached via the USB 2.0 port vacated by the Pi mouse.

 

So, I attached the monitor and now have a complete system ready to run model railway control software...

Pi400_with_Touchscreen.jpg.d20ab8def22bdaa39eb4e0b40186dde5.jpg

 

Note that the USB Flash drive is so compact that you can't see it attached at the rear of the Pi400 keyboard in this picture...

 

Yours,  Mike. 

  • Like 2
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...