0028 Signal & points interlocking with a Pico - part 1

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 มิ.ย. 2024
  • Recently I became very interested in how I could implement custom signal and points interlocking using an Arduino or Raspberry Pi Pico - I settled on the Pico because it cost just £3.90, and spent some time experimenting and making prototype interlocking code run on it.
    In this video I explain what I want to achieve with the interlocking, and how I set up and programmed the Pico for the prototype so far.
    I bought my Pico from The Pi Hut: thepihut.com/products/raspber...
    I also bought some digital servo motors from there:
    thepihut.com/products/towerpr...
    The guide I followed to set up the Pico and control it via Visual Studio Code:
    www.instructables.com/How-to-...
    I got the 250 LEDs and 10 momentary switches from Amazon (£3.99 and £10.19 at the time, respectively):
    www.amazon.co.uk/Youmile-250-...
    www.amazon.co.uk/MinticeTM-Mo...

ความคิดเห็น • 10

  • @thegrowler-blackwoodngauge
    @thegrowler-blackwoodngauge 7 หลายเดือนก่อน +1

    Hi Jonathan - my only foray into automaton is with the Heathcote Electronics for 3 colour light signals. Take my hat off to you going down this road 😊 cheers Euan

    • @endoorrailway
      @endoorrailway  7 หลายเดือนก่อน

      Hi Euan,
      Thanks - after seeing some Arduino videos I realised it should be achievable - I've got literally decades of experience with programming so it was only the electronics bit that I'd previously found daunting! It was actually quite refreshing to use some know-how I actually already have, for once :)

  • @iansngauge
    @iansngauge 7 หลายเดือนก่อน +1

    Hi Jonathan! You're making me feel really jealous with you starting to look at automation tasks! I like the idea of having base classes in Python code that can be built upon to create new types of object states! I've dabbled a little with the Arduino (or rather a cheaper Elegoo knock-off), but don't really like the way the sketches work, and would much rather use Python! You talked about debounce, and I know I looked at functions in the Arduino libraries that handle that sort of thing! However, those little Pico boards look like just the job and I may have to have a look at them in the hopefully not too distant future! Keep up the good work! All the best, Ian.

    • @endoorrailway
      @endoorrailway  7 หลายเดือนก่อน +1

      Hi Ian,
      Thanks :)
      Yes gotta love object-orientated programming! I was wondering what other things might actually be lockable - all I could come up with was level crossing gates (not that I intend to have any), but even with just signals and points it made sense to be able to treat them interchangeably.
      Lol, it's my scattered approach where I pretty much just follow what I happen to fancy! Whilst I vaguely plan signal automation for the Dawlish T Wall layout, in terms of Endoor and the intelocking it's not actually automating anything per-se - it's an electronic + virtual version of physical interlocking.
      I think you can actually use MicroPython with Arduinos - one thing that attracted me to the Pico was Python, but I'm sure I saw somewhere along the line that either software type works on either type of device :)

  • @tonyshield5368
    @tonyshield5368 7 หลายเดือนก่อน +1

    Like the way you are going and your experimentation. I did control engineering some time ago and met similar problems. For de-bounce the period to achieve stability depends on the switch type and the switch trigger (measuring liquid levels which slop around required debounce latches); these pure mechanical switches will probably work very well with 0.5 second (500ms) pauses between reads. If that is not good enough then a set-reset latch will be required which will in turn require more complicated code - avoid if you can. If you are reading every 500ms the switch can change state between 499ms -1ms before the read - this can cause problems - but as you are using state tables it will not be an issue if you say only allow the outputs to function every 1.1 second. This will allow the input to stabilise before actioning a state-change - i.e. an output. This will give you 2 reads for a state change, some enigineers like 3 or 4 reads before a state change output.
    Keep up the good work and these videos.

    • @endoorrailway
      @endoorrailway  7 หลายเดือนก่อน

      Hi Tony, thank you for the encouragement and the useful insights - I hadn't realised just how nuanced the de-bouncing could potentially be! Thanks!

  • @aleopardstail
    @aleopardstail 7 หลายเดือนก่อน +1

    next up is to integrate some sort of block detection and interlock that.
    its actually quite a good challenge to do it with this sort of microcontroller

    • @endoorrailway
      @endoorrailway  7 หลายเดือนก่อน

      Hi Dale,
      I've been thinking about block detection for the Dawlish T Wall, but not got very far yet! I don't intend to implement it on Endoor though, mainly because I don't want to be modifying the track now that it's laid, but also I'm not sure that in GWR days they'd have had block detection (my book says that most of the companies were very slow to adopt track circuit technology). But presumably there was _something_ that made sure s signaller set a signal to danger after a train entered the block - I'll have to read the book again! I vaguely remember there being some kind of manually operated track occupation indicator, possibly linked between signal boxes.

  • @ngaugefouroaksstreetstatio6932
    @ngaugefouroaksstreetstatio6932 7 หลายเดือนก่อน

    I can comfortably achieve step 1 after that i need help. Very good Johnathan.

    • @endoorrailway
      @endoorrailway  7 หลายเดือนก่อน

      Thanks :) I think step 1 is by far the most important one!