View Single Post
Old 11-02-2015, 10:42 PM   #2276 (permalink)
thingstodo
Master EcoModder
 
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488

Ford Prefect - '18 Ford F150 XLT XTR

Tess - '22 Tesla Y LR
Thanks: 746
Thanked 565 Times in 447 Posts
Quote:
Originally Posted by thingstodo View Post
Update for Sep 24

Summary: My encoder no longer works with the AC controller
...
Sep 24 - Oct 28 is quite a while between updates!
Here is the update for Nov 1 - actual testing is done!

Using a breadboard I patched pull-up resistors (10K) plus parallel ribbon cable between the encoder and controller

After power up:
run-encoder-test shows 00000x
turn shaft
run-encoder-test shows 00001x
turn shaft
run-encoder-test shows 00001x
hmm ...

Check pin voltages
1 = gnd
3 = 0V
4 = 4.92V
5 = 4.90V

4.92V for the 5V pin is a bit low. 4.90V for a pulled-up pin is too high! That's not enough voltage drop across a 10K resistor.
Check pins - find a short between the resistor leads (resistor twisted on the breadboard)

run-encoder-test shows 00001x
turn shaft
run-encoder-test shows 00061x
turn shaft
run-encoder-test shows 00075x

OK - we have a signal.

Attached picture shows the mess that the cable is.

motor -> rj45 adapter (has the pins) -> cat5 cable -> rj45 adapter (pins to breadboard) -> resistor network -> ribbon cable -> control board

First update: add the EVTV screw-in adapter on the motor side. This holds the female pins and makes the insertion and removal more secure
power off
remove pins from motor
insert pins into adapter
insert adapter into motor
power up and test

1 - white
2 - brown
4 - orange
5 - blue

run-encoder-test shows 00000x
turn shaft
run-encoder-test shows 00000x
turn shaft

OK - pull apart the new part - the screw-in adapter - and check
power off
pins look right
pins are pushed in far enough
put adapter back on motor
screw in more forcefully. The threads on the connector need to disappear for the connector to be on all of the way. The connector is moisture-tight so you need to twist pretty hard.
push the pins in as far as they will go
power up

run-encoder-test shows 00000x
turn shaft
run-encoder-test shows 00000x

I made a full turn. It should show about 64

turn shaft
run-encoder-test shows 00000x

still no change. Go back to the female pins on the encoder male pins - no adapter

power off
the pins were bent (!!) I guess my needle-nosed plier work was a bit too agressive and I bent the pins so that they would not fit on the adapter.
Straighten them out a bit and use the female pins directly
1 - white
2 - brown
4 - orange
5 - blue

run-encoder-test shows 65534x
turn shaft
run-encoder-test shows 00034x

Success!

Turn off the power and try the adapter again
still can't get it to work. Move back to the female pins directly and get on with some testing!

run-encoder-test shows 00000x
turn shaft
run-encoder-test shows 00028x

Success! Sort of, I guess.

How to make the cable with the pull-up resistors?
the connector sets I am using are old - rj45 <-> RS232. The pins for rs232 kinda fit the siemens
motor encoder.

I have a bunch of these. I'll use two cables
motor encoder -> rj45 adapter -> cat5 cable -> rj45 adapter
rs232 pins cut off incoming side and soldered to perfboard with pull-ups
rs232 pins cut off outgoing side and soldered to perfboard
rj45 adapter - cat5 cable -> rj45 adapter -> soldered to 5 pin header for controller

power up

run-encoder-test shows 00000x
turn shaft
run-encoder-test shows 00047x
make a full turn
run-encoder-test shows 00298x
64 counts per rev, 4 transitions per count = 256. 256 + 47 = 303 so I was out by 5 counts

Pretty good!

Try the motor encoder to adapter again. This time, after power down, put the adapter into
the motor fully first. Then insert the female pins into 1,2,4,5 as white, brown, orange, blue

mark how far the pins and wires go in.
power up and try it.

I can't figure out how to mark how far the wires are inserted. But it failed.
run-encoder-test shows 00000x
turn shaft
run-encoder-test shows 00000x
Marking all of the wires at once with a wrap of tape gives about 30 mm from one edge of teh
adapter to the end of the pins. Measuring the adapter by itself 30 mm appears to reach
from the edge of the adapter to the seated face of the pins
The adapter tightens all of the way in, the last 2 turns against gasket #2 for a nice tight
fit.

I can't get it to work.

Alternate - push the female pins through a wooden plug 19 mm in diameter (plug from a 1 inch hole saw looks about right)
about 1/2 inch deep (use 3/4 inch plywood to leave a 1/4 inch lip)

1 inch hole saw plug is 21 mm in diameter. use 7/8 instead
1 inch works better, with a file to trim it down. It needs to be a tight fit to keep
the pins aligned.

Drill through the 4 pins needed. Add female rs232 pins from the non-cable end and solder
the part that sticks out of the cable end to the rj45 connector.

See if it works!
Nope.

power up

run-encoder-test shows 00000x
turn shaft
run-encoder-test shows 00000x

So the pins must not be aligned. The 1/8 holes in the disk are as tight as I
can make them.

Try the alignment again.
nope

power up

run-encoder-test shows 00000x
turn shaft
run-encoder-test shows 00000x


So I think I need to make thinner disks so I can see the pins
connector with pins showing -> disk1 -> female pins -> disk2

That way I can see the pins engage. Maybe I can use silicon to fill in the gaps?

After several prototypes - none of which works - I've given up.
female rs232 pins are inserted into the connector on the motor, over the male pins,
one at a time. Push some slack into the connector. tape it down well. It runs, for now!

Next up, burn the latest firmware I have and run-rotor-test.

SensorlessFOC 150918 fixed.hex dated Sep 21

power up on 12V only
capture Siemens encoder test 5.txt
turn by hand - looks good!

max-rpm 3000 and encoder-ticks 64
config looks right

Check pack voltage 123.5V
shut off the controller, turn on the pack, turn on the controller

run-rotor-test
... it appears to have failed? output is mostly 0's with a couple of 3's?
Try the control anyway.
Press 2 <ENTER> several times. The motor starts .. ramps slowly up ... more 2 <ENTER> and I get up to 3000 rpm and overspeed fault is triggered? I showed about 2900 rpm on my handheld tach. So the controller knows what speed the motor is turning.

capture Siemens encoder test 6.txt
run-rotor-test with no changes to settings and see what happens - max-rpm still 6000, encoder-ticks 1000 instead of 64.

Same output. All 0's except for a couple of 3's.

Control is OK with 2 <ENTER>

Verify that DC motor turns the same direction as the AC motor turns, when DC motor is connected to 12V battery. Good news - it does!

Check no load rpm on 12V battery.

I think I changed to capture Siemens encoder test 7.txt somewhere here

Check if regen works on the AC controller when the 12V battery is driving the DC motor. Yes.

The AC controller is getting hot. Time to call it a day. I need to figure out an easy and cheap way to make a chill plate.

There is video. The audio is HORRIBLE with the motors running. I'll see if I can salvage something. I want to try something new - leave the audio on the left channel as recorded and do a voice-over on the right channel. That way I can listen to the howl of the motors and make out what I'm saying, but you can turn that down on playback and just get the information that I was saying.

If it works, I'll edit this post when I get the video uploaded.

EDIT
- link to coupler video https://youtu.be/zZl_PciIN0U
- first spin with 64 ppr encoder https://youtu.be/ozhHnqr_Ar4
- second spin with 64 ppr encoder https://youtu.be/B0Dw7DVt02U
Attached Thumbnails
Click image for larger version

Name:	20151101_114612a.jpg
Views:	61
Size:	113.1 KB
ID:	19021  
Attached Files
File Type: zip Siemens encoder test 3-7.zip (7.8 KB, 32 views)

Last edited by thingstodo; 11-05-2015 at 02:54 PM.. Reason: Add video links
  Reply With Quote
The Following 2 Users Say Thank You to thingstodo For This Useful Post:
MPaulHolmes (11-03-2015), mpgmike (02-26-2022)