Reintegration of the System with O/C Protection and WiFi

TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Reintegration of the System with O/C Protection and WiFi

Post by TerryJC »

At last some real progress. I had to completely disassemble the hardware to add the pull-down resistors and then I had some issues when it all went together. To fix those I had to completely re-install the software because the some of the test code wouldn't work properly when running in a Read-only file system. At present the system is now at the same stage of construction as it was before I took it all apart (except it now works).

However, along the way, I've partitioned the SD Card into an OS partition and a Software partition. The OS partition contains the Raspberry Pi OS and the Python Libraries needed to run the code. This will be marked Read-only before the system is returned to WMT. The Software partition contains the Underground Railway program and a number of test programs. This is a Writable partition, so I will be able to tweak it via the VPN when it is installed and running in the Railway Room. I've also enabled WiFi and can already SSH into the system from my PC here, which makes debugging a lot easier.

Still to do:
  1. Wire in the Over-current Protection Board. This has been fully tested stand-alone, so hopefully shouldn't pose too many problems.
  2. A complete retest of the system including simulating an overcurrent.
  3. Complete the software configuration, eg, static IP address, Read-only, etc.
  4. Backup the SD Card.
I won't get much more done today, but with luck and a following wind I should be pretty close to completing the setup tomorrow morning.

Penri,

I'll talk to you tomorrow afternoon.
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Reintegration of the System with O/C Protection and WiFi

Post by TerryJC »

This was rather a disastrous day, although I think I've overcome the problems I've encountered.

First, after assembling the Over-current Protection Board onto the base circuit, the motor drive stopped. Eventually this was diagnosed to a dodgy DuPont Header contact on the En B input to the Motor Drive Board. Along the way my keyboard failed (dodgy USB Hub), I began to run out of the solder (new reel received this afternoon and the substitute Motor Drive Board that I got out of the cupboard turned out to be faulty. :x

All that was sorted and the drive output to the motor is now satisfactory. I then had to tweak the over-current adjustment pot (a bit fiddly) because the 3.3 V out of the Pi, was higher than the Bench Supply. :cry:

So the system seems to be working fine now (from an electronic point of view). Tomorrow morning I'll sort out the software aspects.
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Reintegration of the System with O/C Protection and WiFi

Post by TerryJC »

As always, things didn't quite go according to plan. I had already implemented the WiFi connections, using my home router to give access to the Internet and allow me to ssh into the Pi. However, when I tried to set up connectivity to the old router that I use here to pretend to be the on site antennas (WMT Guest), it wouldn't work.

After a somewhat wasted morning, I discovered that raspi-config places two entries into wpa_supplicant.conf and the Pi tries to connect to the first entry and ignores the second. Once I had spotted this, I was able to continue.

What's done:
  • Partitioning completed.
  • All train and test software updated, reorganised and installed.
  • A Utilities directory created, for the read-only, update and image-backup scripts.
Tomorrow, I'll install the update script, make the OS partitions read-only and run the backup script. It should then be ready for use.
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Reintegration of the System with O/C Protection and WiFi

Post by hamishmb »

I'm glad you figured it out :)

If the update script you're talking about is the one I made for OS updates, I should note that it won't work with a read-only OS partition so it doesn't need to be included. I imagine you're probably talking about something else, but I thought I should say.
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Reintegration of the System with O/C Protection and WiFi

Post by TerryJC »

hamishmb wrote: 15/03/2022, 17:22If the update script you're talking about is the one I made for OS updates, I should note that it won't work with a read-only OS partition so it doesn't need to be included.
Good Point. I hadn't thought of that,
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Reintegration of the System with O/C Protection and WiFi

Post by TerryJC »

The Underground system is now fully fettled, has a read-only OS, backed-up and ready for return to WMT.

I've learned a few lessons along the way, especially about how to set up a read-only filesystem and still be able to write to the SD Card to update the control program. I'm updating the documentation for the Underground and for the Common Procedures and will publish these shortly.
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Reintegration of the System with O/C Protection and WiFi

Post by hamishmb »

Excellent :)

I'd like to read about how the read-only filesystem works, will that be in the updated documents as well?
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Reintegration of the System with O/C Protection and WiFi

Post by TerryJC »

hamishmb wrote: 16/03/2022, 15:17I'd like to read about how the read-only filesystem works, will that be in the updated documents as well?
Yes.
Terry
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Reintegration of the System with O/C Protection and WiFi

Post by TerryJC »

I've just uploaded the updated Common Procedures Document.
Terry
Geoff
Posts: 17
Joined: 19/02/2019, 14:59

Re: Reintegration of the System with O/C Protection and WiFi

Post by Geoff »

On Monday 21st March when I reinstalled the boards on the underground allowing for the 2 input voltages the train just d in the centre part of the track for an unknown number of times. When I connected the traffic lights they seemed to work at random.
I went in this morning and trying to understand what was happening I realised the train was running in the opposite to the lights so I changed over the two wires to the track and then the train direction and the lights were correct but it was still oscillating in the centre, so I disconnected all of the sensors and then the train was running the full length of the track much as it should. I tried fitting one sensor at a time in various positions all of which caused problems.
So at the moment I have left it running without any sensors connected, and it runs acceptably.
Post Reply