Monday, 17 December 2018

Dual transceiver PCB for encoders: the reckoning - bollocks!

Good received:

The stuff finally arrived at my home address during last week. 


First issue - HMRC have charged me £4.27 vat on the shipment, which is about right for VAT at 20% on $27 - then of course those wankers at Royal Mail have charged me £8 "handling fee". So, as ever, the net charge of £12.27 comes close to doubling the cost. OK, it's actually "only" an additional 57% but that's still extracting industrial quantities of urine. And you wonder why so many of the less reputable suppliers choose to understate the value of the shipment. What's particularly irritating is that the total cost of the PCBs themselves is only $2. Fuck 'em. 





 

Anyway, once I'd got over that, the package seemed to be fairly complete, along with a free ballpoint pen and some Post-It type notes. Whoopee.



It's all there - 10 PCBs, 10 of each connector and 10 of the SN65C1165 ICs.



A quick dry fit seemed to look good:



What could possibly go wrong? Well, that became apparent when I tried to assemble them.....

Library geometry cockup:

Bloody library / footprint that was called up in that EasyEDA program is wrong. The line driver transceiver I chose is the SN65C1168NSR from TI. It's available in a variety of packages, the largest of which is the standard "narrow" SOIC-16. As you can see from the photo, the footprint has ended up as an SOIC-6-W (wide). So there's a gap between the pins and the pads. Bollocks.


It's correctly called up as an SN65C1168NSR in the description and this was a part I pulled in from the sister LCSC compt supplier. The problem lies in the parts library - and the fact that I didn't know the part I had ordered through their system wasn't wide bodied. The real bummer is that this 1168 driver isn't available in the SOIC-16 wide, otherwise I could have ordered some more locally.


Sod it. Luckily, it's just possible to fit the ICs with a solder bridge at each pin. Here it is. Doesn't look too bad, although I won't claim to have done this myself.




Anyway, having got that out of the way, there are a couple of other issues to deal with:
  • I may require a termination resistor (100R). I need to determine whether or not there is one at the motor end.
  • The spare receiver inputs (pins 6 and 7) are currently floating, although the output (pin 5) is tracked to +5V. That was a result of letting The Stupid Fat Bloke connect up the schematic. Simple enough to fix, by desoldering and then clipping pin 5 off with miniature cutters.
  • The 2 "DE" pins (pins 4 & 12) need to be held high to allow the transmitters to actually function, otherwise they will remain in a high impedance state. I could simply bridge the pads between pins 4 & 5 (pin 5 is connected to +5V) but pin 12 basically requires a wire bridge.
  • I need a wiring table so I know how to connect up the motor to the screened cable (at the motor end) and the line driver / servo drive to the other end of it.
Wiring table - line driver PCB:

Here it is, although I don't have the motor-end wiring info for the encoder connections. I'll need to examine the motors first.


Each (of the 2) PCBs will mount in the cabinet next to its servo drive. The 6 way encoder connector on the servo drive has only 5 ways used and those wires will poke directly into the 5 way connector on the line driver PCB. Simple enough.

Drag cable allocations:

The green drag cable from the motor will contain both the power connections for the motor itself (3 phases) and the encoder signals to / from the line driver - as well as the +5V / GND supply for the encoder circuit. I have just about enough cores to manage that, while allowing the encoder signals to be shielded from the (noisy) motor PWM lines.

In the drag cable, I have:
  • 3 sets of 2-core screened @ 0.14mm
  • 2 unscreened @ 0.5mm
  • 4 unscreened @ 0.14mm
  • Outer braided screen


I'll parallel up all 4 of the unscreened 0.14mm wires for one motor phase and use the 2 unscreened 0.5mm wires for the other 2 phases.

For the encoder signals, I require 6 wires (ideally screened), plus the encode supply (+5V and GND).

There is also an outer screen but I won't use that to supply power - it will be grounded at one end - or possibly, both depending how it behaves. Despite the opinions of various self appointed ex spurts, there is no universal right or wrong approach. What works in some systems won't necessarily work in others. It's possible to get tuned resonances in either setup.

With this extra info, I should be able to connect the darned thing together finally. This is a bit more complete but still lacking drag cable colours, encoder connection colours etc:

There.

No comments:

Post a Comment

TIG welder up and running - after some fault diagnostics and repair

Finally got some time to connect up the flow meter and argon hose. Plugged in the torch and ground cables and the torch hose etc. Powered it...