Sunday, June 7, 2020

Moving into the 21st Century


So what happened this week?  Apart from spending quite a bit of time online, starting with our Tuesday Nighter get together with a few people, followed by a couple of hours on Saturday afternoon with the NMRA Div 1 on zoom, followed by a short online session with Darren and Brad..  This was followed up by a 90 minute Operations Session streamed live to Facebook from the Onondaga Cuttoff.  The Facebook streaming was viewed by over 200 people at its peak.

Now apart from that type of online work, I did some eBay buying.  Well I ordered an Arduino Uno online early in the week.  It turned up in the mail on Friday.  

While waiting for the Arduino to arrive, on other evenings during the week, I found some Arduino programming tutorials online.  They are very good.  So I followed along with some programming 101 sessions.  Well I do have a Bachelor Degree in Computing, so it was pretty easy.

After work on Friday I then went down to Jaycar in the afternoon and found a simple set of breadboard, jumper leads and a power supply, to help supplement my Arduino to help with my learning.  Unfortunately I had nothing to power the power supply with.  So that meant that I needed to head back to Jaycar on Saturday morning and pick up a USB A to USB A cable.  So that plugs straight in to the wall, or laptop and the other end into my power supply and voila 5V or 3.3V to my breadboard.  

So the first thing I did was wire in a LED with a 1K resistor.  Yes I got the LED to light using my power supply, so magic occurred.  I thought, I can do better than that.  I can power the LED from my Arduino.  I did that - more magic.  I then wrote some code on my Arduino, and actually had it loading into the Arduino and then I had the Arduino flashing the LED.  That worked as well.  More magic.  The next test was to simulate a detection and then flash the LED.  I even got that to work.  Extreme magic.

My next task is now to get a couple more things in my kitbag.  I need a switch for the breadboard, so I do not have to cross two jumper outputs to simulate a switch activating.  Next is to then work on some form of optocoupler.  I want this optocoupler to interface with my track detection circuit on my layout which I know works, and will then trigger my Arduino.  I just have to work out where to get one, and what model to use and then connect that up next weekend.

Once I get this all working, I will potentially deploy ‘Shelton the Photographer’ or heaven forbid, lots of them, to the layout.

1 comment:

  1. Is the Tuesday nighters back on ? If so whose place is it held at next time?

    ReplyDelete