Mike's 6-Axis Articulated Robot

I'm going through each gearbox and cleaning out the old grease, washing the critical components, and filling with fresh grease. I got some nice low viscosity lithium grease that I'd like to use. Would have preferred the original grease, but I could not easily find it and the cost if I could would have been unreasonable. I am not a tribology expert by any means, but I figure one lithium grease with molybdenum additives is pretty close to another lithium grease with molybdenum additives. Good enough for hobby use.

The old grease is cracked in places where it pooled up, indicating the base oil has run out and mostly the thickener remains. Dark brown staining on sliding and rolling members indicates lubrication starvation and wear.

image041.jpg

image071.jpg
 
Alright, I'm somewhat on hold while I'm waiting for parts to come in the mail and waiting on information from Denso.

I thought with the latest pinouts from the robot service manual, it might be interesting to check out one of the serial encoders. Fortunately I still have the original J6 motor with the broken magnets, so I can use that encoder to mess around with and not risk damaging the motors I need.

If I choose to build my own control with a Rockwell PLC, I'll need to hack a system to get these non-compatible encoders to talk to my servo drives.

Since the last robot, I finally bought an oscilloscope for myself. It is a Siglent 4 channel 200MHz scope. In this setup, I have an arduino which I'm only using for the 5V power right now, but I might try hooking it up to read the serial data. The red/blue wires are power going to the encoder, and the green wires are 2 channels of differential serial. This is a single ended serial where the encoder only transmits and there is no receiving provision for the controller to talk to the encoder. Data seems to be streamed continuously after the encoder is powered on.

image099.jpg

image100.jpg

image101.jpg

Here is a zoomed in view of the 2 channels showing one full pair of transmissions (specification below). These signals are encoded in manchester code where the data is the direction of the edge (rising/falling) rather than the voltage (high/low). The blue channel is a mirror copy of the yellow channel for noise immunity.

image098.jpg

And the specification. I need to decode the data I see on the screen. I don't think my scope can decode or trigger on manchester encoding, so I'll be doing this by hand most likely.

1645036661947.png

Just a quick update - will follow up with more info later once I get into decoding this.
 
This was actually super easy to decode. The stop bit on the second frame got a bit wonky, but that might be my error. I think all the data lined up correctly.

Anyways, here is the above image decoded. The single turn data is 992 counts out of 2048 or 174.375 degrees from where I powered on. Additionally the multiturn count is 4 which is reasonable since I spun it a few times.

It is also reporting a battery error, overspeed error (perhaps related to battery error, or this is how the motor blew up), battery alarm, and preload status.

1645038903135.png


1645039268945.png

I'd like to understand the CRC field. It is 3 bits, but the manual does not describe how to calculate it.
 
Quick check shows some Arduino libraries for manchester encodings…

Having a scope is really worthwhile for something like this.
 
Been a while, but you'll need to figure out what polynomial they used for CRC. Looks like about 40 bits of data. There are a few places places that publish common polynomials for the size of bit field, as only a limited number of polynomials give good error checking.
 
Alright, made some progress last night.

Ran a more thorough test last night of the encoder. Powered it on with the shaft in a known position and saved the serial data. The I rotated the shaft 2 rotations CCW when viewing the shaft face and tried my best to get it lined up.

Here is the serial packets immediately after power on.
SDS00003.jpg

1645139175431.png

After decoding them, I can see I am at 1184 counts (of 2048) for the single turn data, and 5 revolutions on the multiturn data. OK, well does that make sense? The single turn data is absolute and does not require the battery to back it up. The zero count location should be aligned with the zero electrical degree position for commutation (or a known offset like 90*). So yes, a non-zero single turn value is expected at power on. What about that multiturn data? That should be battery backed and get reset after a power loss.

Well it turns out that the encoder has a supercapacitor that keeps the encoder powered for up to an hour after power loss to facilitate replacing the backup batteries. The capacitor is expected to age down to 15 minutes after 10 years (it's been 22.5 :D). So the multiturn counter didn't reset while I was preparing for this test.

1645139651557.png

1645139554295.png

Also, take a quick note that the PS flag (Pre-Load Status) is set to 1 right now.

OK. So with the encoder powered, I manually rotated the shaft 2 revolutions CCW. Then I captured the serial data again and decoded it.

SDS00004.jpg

1645139165564.png

As expected, the single turn data is 1141 counts of 2048. This is very close to the starting single turn position of 1184. The multiturn counter has decremented to 4. I expected 3 so not sure about that... Maybe I did move it only 1 rev? Not positive.

Notice now that the PS bit is 0. This bit is indicating the the accuracy of the data is limited until the shaft has been disturbed by 2 degrees mechanical. Since I moved the shaft 2 full revolutions, this cleared the PS bit.

I'm not sure what "renews 5 bit absolute data to 11 bit absolute data" means. Not sure if this is the single turn or multiturn data. I'm assuming singe turn. If this is the case, there is a 2^6 (2^(11-5)) count (64 count) uncertainty in the single turn position right at start-up until the shaft has been disturbed. This could account for the difference in single turn counts between the two readings (1184 vs 1141) or that could have just been my inaccuracy in lining up the shaft exactly on the same mark.

1645139591215.png

I also figured out the CRC based on @rabler previous post. This is a polynomial CRC. Specifically it is a 3 bit X^3 + x +1 (also known as a 1011 polynomial CRC). You can do the math by hand or use an online calculator to generate a CRC from the data. This online calculator even includes a provision to check the CRC after a simulated transmission. The CRC includes the ADDRESS, DATA, and FRAME fields, but not the START, STOP, or CRC fields (obviously, since this is what we are calculating).

This CRC is a highly efficient method of checking the data for random bit flips with an extremely low probability of one getting past. CRC codes are able to detect double bit flips. More robust methods like hamming codes provide more certainty in the error checking, and even on the fly error correction at the receiving end, but use more data for the error correction. This was obviously not desirable to the encoder designed as they wanted to broadcast the data as fast as possible and this meant small data packets. A CRC also provides more resiliency than a simpler checksum, which can only protect against a single bit flip.

If this were to be done with Hamming Codes, the 36 bits of data would have needed to be broken into groups of 26 bits (Hamming(31,26)) and would have needed 70 bits to transmit the same data that this CRC scheme transmits in 50 bits. We can see that this CRC scheme is nearly 30% more efficient than Hamming codes.

I had one additional thing to look into. A new set of single and multiturn positions come over serial every 84us. This encoder also outputs quadrature encoder signals at an increased resolution of 2^13 bits (8192 counts per revolution). So if we choose to use both the serial data AND the raw encoder data, we can increase our usable resolution of the encoder, while remaining aware of the absolute position, and even cross checking the position data from two sources. Assuming the motor max speed of 5000rpm, each quadrature count arrives every 1.47us. This is much faster than the serial rate, giving us better tracking of the motor position. While a serial only solution would likely work, I think the final implementation of the encoder interface board should use this additional data.

I also took a moment to hook up an AM25C32I RS422 Differential Line Receiver. I actually had exactly one left over from making the encoder interface boards from the last robot and also managed to find a small SOIC16 to DIP breakout board. Soldered it up real quick and it worked perfectly!

image107.jpg

image108.jpg

The yellow and pink traces are the differential RS422 inputs, and the blue trace is the 0-5V single ended signal coming out of the AM26C32I differential line receiver. This signal should be perfect for wiring into an arduino. Notice how much cleaner this signal looks too! I think I can use my UNO with software serial and a FTDI to read text to a serial monitor, or I can buy a Arduino Mega with 2 hardware serial ports. I don't think software serial supports manchester decoding, but the hardware serial seems to with a library.

image109.jpg
 
Last edited:
Connectors have been arriving. The big ones are the robot motor power cable connectors. The black one in the middle is the correct power plug (the blue one is the same but with a wrong backshell). And the small silver one was an incredibly hard to find connector used for the robot ESTOP.

image110.jpg

I found this by searching "Vintage 4 pin connector" on eBay. It is a perfect fit - crazy lucky find. Was advertised for use with old CB radio microphones. I still have no idea what this connector actually is.

image111.jpg

Cables have been arriving too!

image113.jpg

These 4 cables are new - old stock DENSO branded cables matched for this controller. Can't believe I found them. Weren't cheap, but probably worth it.

image114.jpg

image115.jpg

And this is the motor power cable. 25 - 18AWG conductors, plus ground, overall shield, high flex. Again, not cheap, but the only option I found for shielded high conductor count cable.

image117.jpg

image116.jpg

I need to buy a transformer to step my 240V down to 208V but I'm going to hold off on that until I know I can use this control box. It isn't too expensive, but I don't want to keep sink money into this controller if I don't know it will work.
 
Last edited:
Back
Top