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 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'.
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 !!
ReplyDeleteThat's bloody rough Craig!
ReplyDeleteGlad you got a smile out it mate!
ReplyDeleteDid you shampoo the hubcabs afterwards?
ReplyDelete