Sunday, June 14, 2020

Someone Should Blow Electronics Up


Well I had great plan for this weekend.  I had been planning on getting my ‘Shelton the Photographer’ to take a few photos on my layout.  I had some great help from a couple of blokes down in NSW and I thought I followed the diagrams correctly.  But….

The saga started when I was told to wire my bridge rectifier differently to what I wrote about the other week.  So I did that.  But for me, I was thinking that I wanted to take the implementation of this new circuit slowly, I thought instead of wiring my 4N25 directly into the circuit with a parallel resistor, I’d firstly put a LED into the circuit in place of the 4N25.  Now we all know what a 4N25 is don’t we?  Of course not.  It is an optocoupler that will basically transfer an electrical signal between two circuits by using light - all inside the 4N25.  If current is flowing through pins 1 and 2 in the 4N25, that is where my LED is in my test circuit, then the output of the 4N25 on pins 4 and 5 will allow current to flow on the other circuit.

Well when I installed my LED in place of the 4N25 when I ran a loco over the trigger section of track, I got the smallest amount of flash from the LED.  So it seemed to be working.  I then replaced the LED with the 4N25 and connected up the other side of the circuit into my Arduino.  I was tracking what it was getting on the input pin into the Arduino on pin 5 of the 4N25 which was connected to pin 4 in my Arduino.  It was getting a HIGH input signal on the circuit with no train on the trigger track.  The circuit was set up to produce a LOW signal when a train was on the trigger section.  So I ran a train onto the trigger track and I still got a HIGH signal. I could not get it to work.

I scratched my head, I was starting to pull out what left over hair I had.  People were starting to call me 'Geoff'!

I had given up for the weekend.  I sat down to write this blog.  I then realized that I did not have the two input jumpers from the trigger track in pins 1 and 2.  I had them in pins 2 and 3.  Absolute Dork!  Now you could call me 'PK'!

So back down to the shed to test again.  Moved the pins from pins 2 and 3 to pins 1 and 2 and fired up the layout and a throttle.  Train ran onto the trigger and Yes - It works!  Well eventually.  Who would want to muck around with electronics for a living designing circuits?  Well not this little black duck, I can tell you.

To prove that it did work, and I can now deploy 'Shelton the Photographer' around the layout, please see the attached video.


I really must thank Marcus Ammann and Andrew King for their patience in helping a Luddite like me succeed with this first version of this little gadget.  I did have to make some changes to the Arduino side of the circuit as the Arduinos can be set to have a pull up resistor defined in the pin definition.  This meant that I did not have to put one into the circuit as per the original diagram proposed by the two gurus.  I went out on a limb here on my own by not installing it.  Now there will be version two of this circuit in the near future.  I just need a few components.  It does not require an Arduino.  Marcus has made one for his layout and hopefully his blog will show the results very soon.  Who knows, there might now be an influx of 'Shelton the Photographers' around lots of layouts very soon.  He will be up in lights - so to speak.  Not sure if Shelton needs to isolate for 14 days, given that he was on the Short North in NSW yesterday and he is now in Queensland.

I am happy to revert back to very basic layout wiring for a while now.  As my T-shirts say - 'Mainframes Rule' and 'Never trust a computer you can lift'.

4 comments:

  1. Judging by the title of your Blog, you almost did. I still haven't worked out what you are talking about yet. My wife said it's to do with my age !!

    ReplyDelete
  2. Glad you got a smile out it mate!

    ReplyDelete
  3. Did you shampoo the hubcabs afterwards?

    ReplyDelete