SD45 wiring errors & insightsOverview:Unfortunately, the SD45, like many Aristo locos has wiring errors. Often the motors are wired to the wrong polarity, but there were several wiring errors that could destroy anything plugged into the socket. Also the socket pins that should control the headlights were not even connected.I found this by the process of reversing the motor leads for the motor. I use a lot of QSI decoders, and the early versions had a limitation in consisting if you reversed the motor direction in CV29. You never need to do this CV change unless the motor is wired backwards initially.Why do these errors keep happening?Even though Aristo was the leader in G scale in defining and implementing a socket for decoders, Aristo only checks the locos under DC power. This has a number of negative effects.In terms of making the loco running in the right direction under decoder control, you must reverse the motor wires BEFORE the socket. If you reverse the wires AFTER the socket the loco will run in the opposite direction under DC but not DCC. Unfortunately, time has shown the factory "correction" to reverse wires has happened in many different places over the years. The upshot of this is you may have to reverse wires in TWO locations if it runs right on DC but wrong on DCC (reversing motor wires before the socket will affect DC and DCC, reversing track pickup wires between the wheels and the socket will only reverse on DC.(Maybe this is why Aristo NEVER has forwards or backwards on their remotes, ya think? Just 2 arrows).Another issue, and a much more common and difficult problem to correct is the mis-wiring of the track pickup leads vs. the motor leads. How does the loco seem to run ok on DC but the instant you add a decoder all hell breaks loose?So for DC operation, one of the track pickups is jumpered to one motor lead, and the other track pickup wired to the other motor lead.The Aristo loco and socket is delivered with a "shorting plug" which does this jumpering. So what may not be obvious at first, swapping a motor and track lead ANYWHERE between the truck and the motherboard will still work on DC.Unfortunately, the electronics that drive the motor in a DCC decoder can NEVER be connected to either track pickup lead. So your "runs perfect on DC" loco can blow up your brand new decoder you just installed by having a couple wires swapped.On to my loco and fixing it:So, my SD45 is the last loco to be manufactured by Aristo, a high hood Norfolk Southern SD45. It even had the brand new "D cut" axles and wheels, where there is no longer a non-adjustable taper fit between the axle and the wheel.Like an idiot, I did not follow my own advice and just plugged in a decoder. It powered up and seemed ok... NOT! As soon as I cracked the throttle the loco stuttered, leaped, and also ran differently. This is usually indicative of a track and motor wire swap.I did my usual testing (belatedly) for the motors and track pickup wires being independent and right away found a problem. There was a mis-wire, and I could not trace it down. It was in the wiring between the main board and the motor blocks. It is basically impossible to wire the motor blocks themselves wrong. Could not figure it out until I removed the 2 small boards that are in the A frames that hold the motor blocks.Something was definitely wrong inside.Open them up, you can see the 4 wires... the outermost 4 traces engage the track pickups, and the inner ones are the motor., you can see in the picture above the outer 2 wires should be track pickup, and the inner 2 motor.Well, see something wrong here? So the black wires should be the outermost, track pickups, board on right is correct. Board on left has blue and black wires swapped motor<>track pickup.Again, in DC operation, the shorting plug in the socket connects the track pickups to the motors, so the loco would run on DC, but this mis-wire normally blows up DCC decoders in the socket.I corrected this wiring on the left board, and reassembled, but the problem still existed. What the heck?More problems - bad motor:At this time, it ran better but still ran weird. It ran better in one direction than the other, and after running for a while, it really started to run poorly, and slower. I picked up the loco and felt the bottom of the motor blocks. One was HOT! Disgusted, I put it aside for about a year.Return to the task:I kept seeing this loco in my office and thinking how nice it looked and that I also had the NS Dash 9 that Scott Polk had given me that was the first loco with the "D cut" wheels and axles.So I had gotten a used motor and intended to pull the motor block apart and replace the bad motor, but it seemed a daunting task, and I had little confidence that the other motor would not develop the same problem. Furthermore, the new "D cut" wheels are no longer plated steel, but sintered steel, which rusts at the drop of a hat, so leaving locos out overnight is a pain.I remembered that I had purchased a number of replacement motor blocks from Aristo, they came with stainless steel wheels, which I removed and put on my E8's, so I had several new motor blocks with no wheels. Years ago Ted Doskaris and I worked up some specs for better wheel contours, and Ted had a number of SS wheels made, and I put 6 on one of my motor blocks and that seemed to track well.So, resuming the testing, the loco was as was it was when I put it away. It turned out that the OTHER board had a short between one track pickup and one motor lead, tested with motor blocks out and cable disconnected between chassis and shell. Found a solder bridge between 2 of the solder pads on the other side of the OTHER board.Now finally, it ran well.Further testing, and looking to lighting:While inside, I checked the wires in the socket on the chassis. I had previously reversed the motor wires in the 6 pin plug to correct the direction of the loco:OK, so I was pretty happy with the simple fix.Lighting:While I was fixing the basic and dangerous motor and track pickup wiring errors, I noticed two 3 pin connectors on the two small boards in the chassis.Now I wondered what that 3 wire plug did. Looking at the two boards in the chassis, all they did is move the 3 lines from the left to the right. I measured the voltages on these 3 lines, and got ground, 5 volts constant, and 0 or 3 volts, 3 volts in forwards, which also lit the red classification leds at the front.The long hood end has classification leds, but they never light.Was looking pretty goofy. Looking more closely, there are 4 types of lights at each end of the loco.1. number board lights - incandescent and run at 5 volts2. porch lights, at the very bottom end of the shell, shining on the porch, also running at 5 volts, incandescent3. "classification" lights, LEDs that seem to go red at the rear of the loco, depending on direction4. headlights, dual LEDs.By the way, the 5 volt 3 terminal series pass regulator is bolted to the chassis, you can see the black, white and blue wires.Now looking further, it looks like a crazy man was in the design department for this loco.Look at the left, long hood end. There are 4 wires:1. ground2. 5 volts for the number boards and porch lights3. 3 volts for the classification LEDs4. 3 volts for the headlights.Makes sense, 3 circuits, plus 1 common equals 4 wires, all coming from the motherboard.Now I looked at the right hand / short hood / front... same number of and type of lights.BUT!!! There are only 3 wires going there, thus no way to have 3 circuits. Appears that there is:1. ground2. number boards3. headlightsRight off, there are 2 seemly idiotic differences, why not run 4 wires from the main board, and why is the porch light not in the same circuit as the number board lights just like the long hood end.So, maybe they knocked some sense into the engineer who did this, but how it works is:1. 3 wires come down from the main board on the left, brown, red, orange.2. these 3 wires go into the 3 pin socket at the left 3. these 3 circuits run through 3 wires to the 3 pin socket on the right4. another cable takes the 2 circuits up to the board in the short hood.So, what is on these 2 circuits? 5 volts for the poor lonely porch light, and 3 volts for the classification lights, which due to the wrong wiring of the loco, light up red in forwards, and off in reverse.Insanity! Why the heck did the short end not just have 4 wires like the long hood? Why not combine the porch light with the 5v for the number boards like on the long hood? Why in the heck add 2 more sets of wires between the chassis and shell?Anyway, a simple fix is to just connect the 2 connectors together and bypass the chassis connections. Now you only have the regulator wire and main power cable between the chassis and shell. Rewiring lighting for DCCNext will be taking over the wiring of the lights for control by the decoder, right now the headlights are not functioning. So much for the Aristo socket, years of not testing it properly left us with this legacy, the last loco manufactured is a mess, mechanically, electrically, and even parts quality (motors). Socket wiring issuesThe picture below reflects my friend's SD45, finding out that the headlight pins on the socket were not connected to anything! Oops! now the lights were reversed.. Aristo apparently connected the headlights to the motor outputs, not to the dedicated pins in THEIR SOCKET.So, you have to solder wires to the pins on the underside of the board for the front and rear headlights: