V1 Board Enova Encoder error

EVElvis
Posts: 31
Joined: Thu May 07, 2020 9:17 pm
Location: Leicestershire

Re: V1 Board Enova Encoder error

Post by EVElvis »

Thanks arber333 & Tom. I will try manual mode again and measure the encoder signal at the transistor again, as it does make some sense a limited signal could be causing the problem without looking into the SW code. Last time I tried manual mode I got to 20Hz at the motor easily, but this doesn't need encoder signal if I recall right. Intresting what you say about deadtime. I did have it 193 for sometime as that's what I measured with my scope. It seems to make little difference, so yes I agree stick with the longer time to avoid any shoot through.
I have the 50 ppr HEDM encoder fitted, and I read it needed a quality power supply - < 100mV ripple I think it was, also it has limited signal current output - 5mA, so im thinking I check the resistance to the base of the transistor, maybe it is too low? I do have different resistor values on my early board as I notice these changed at some point. Perhaps remove R1? Hope to get some time today to take a look, I let you know how I get on.
EVElvis
Posts: 31
Joined: Thu May 07, 2020 9:17 pm
Location: Leicestershire

Re: V1 Board Enova Encoder error

Post by EVElvis »

Just had another go and found that the encoder channel connected to the inverter was not working, it does appear to be broken. So I took channel B which I showed on my last encoder signal video (used for my speedometer) which still worked with 5V signal output and connected it to the inverter instead of channel A. As I have seen before there was little voltage on the signal even before switching the inverter on, so I disconnected R1, took a 1k Ohm resistor and connected inline to the inverter encoder input which appeared to limit current and show slightly higher voltage signal, but still lower than what Toms picture shows on his inverter.
I can see the signal is poor and I suspect switches the transistor on all the time or at least creates an odd signal when the inverter expects 50 ppr in my case. I guess the use of the encflt parameter in the past meant I could previously run the car? I don't know where the noise is from, since it is nice and clean until it is connected to the BC547 transistor base. As arber333 suggested, could be a different transistor could help, but that's something for now I wish to avoid. Just need to get the car running for now. I will try the Omron encoder I have ordered before I look at that. I will take a look at the Enova board to see how they treat the encoder signal, see what I can learn.
Manual mode runs sweet, so im sure its the encoder signal causing the low rpm issue.

Heres the encoder signal, noise much like in Toms picture.

tom3141
Posts: 157
Joined: Sat Dec 22, 2018 2:29 pm
Location: North Yorkshire

Re: V1 Board Enova Encoder error

Post by tom3141 »

I believe the Enova combI board has a very similar encoder circuit to the V1 board. This is the original schematic of the Enova board:
6F58A746-40E8-4A64-9A7E-7A97022827DE.jpeg
I have now removed all of this and all I have is a low pass filter (10k resistor, 1nf capacitor) between the encoder input and the Olimex. This made no difference at all for me.

It does seem very strange that we are both encountering similar problems with different encoders and different inverter boards. The only thing the same is the motor but I don’t understand how the motor could be causing this.
tom3141
Posts: 157
Joined: Sat Dec 22, 2018 2:29 pm
Location: North Yorkshire

Re: V1 Board Enova Encoder error

Post by tom3141 »

Another thought, do you know exactly what motor frequency/rpm you are limited to?

Just wondering on the off chance that it’s happening at the same encoder signal frequency as mine. My motor gets to roughly 35Hz so approx 1000rpm (4 pole motor) and I have a 36 ppr encoder so the encoder signal is around 600Hz.
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 232 times
Contact:

Re: V1 Board Enova Encoder error

Post by arber333 »

Hm... with 3V3 you could be using 470R for R3 for sharper curve. Maybe that will make signal clearer.
I am still not convinced; you might have other issues with your control mechanics. Try running faster than 60Hz in sensorless. You might have to raise the voltage for the motor run faster.

Did you consider that using a push pull signal may invert transistor signal and what inverter sees is decreasing input which comes to an equilibrium at some PWM value?
Maybe you would rather bridge transistor contacts directly and use a voltage divider to lower signal to 3V3 level. So remove R11 and R3 and put a voltage divider into T1 pads. You may also remove R4 or use its pads to make divider.
I would also replace C1 with 1nf.
Johannes used T1 so encoder voltage wouldnt be an issue. Now i just use 470 pullups (5V) on encoder connector with open collector encoders. I use 10K line resistors directly into Olimex pins and i guess they are 5V tolerant at low enough current.
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

Re: V1 Board Enova Encoder error

Post by Jack Bauer »

I now have the range rover driving with the new encoder but it looks like the enova motor suffers the same "defect" as the ansaldo I struggled with some years back.
I'm going to need a hacksaw
tom3141
Posts: 157
Joined: Sat Dec 22, 2018 2:29 pm
Location: North Yorkshire

Re: V1 Board Enova Encoder error

Post by tom3141 »

Jack Bauer wrote: Mon Jun 15, 2020 7:08 am I now have the range rover driving with the new encoder but it looks like the enova motor suffers the same "defect" as the ansaldo I struggled with some years back.
Are you talking about the over current problem that you had with the ansaldo? Or was there another issue with the ansaldo that I’ve missed?
EVElvis
Posts: 31
Joined: Thu May 07, 2020 9:17 pm
Location: Leicestershire

Re: V1 Board Enova Encoder error

Post by EVElvis »

Thanks for all the replies, I will have to study these since im a beginner when it comes to electronics :) Tom3141 - I will try and get exact motor max rpm tomorrow with the 50 ppr encoder, perhaps you can send me your parameters and I can set exactly the same? I guess that my V1 board configuration may make some differences to the max rpm I see, which I rekon is 500 rpm of the motor, and you get 1000 rpm.
Since I have a spare motor and inverter, I took a look inside. No different to what I recall seeing inside 3 phase induction motors, but it was a long time ago and I am no motor expert. Looks like quality kit to me. Not got the rotor or phase connection end out yet tho and i wonder whether the motor is connected in star or delta? Anything else I should look at inside? - edit: looks like a Delta connection as the only terminals are the 3 that connect to the inverter directly. Makes sense to me, I guess that's the same for all 3 phase EV motors?
So far im now sure it is a 4 pole, 2 pole pair motor.
Pole pairs = 60.freq/Ns = 60.121 / 3600 or 60.305/9000. Both = 2 pole pairs.
Motor has 36 slots. The number of slots per pole & phase = 36 slots / 2 x 2 pole pairs x 3 phases = 3 (which you can see from the top)
I plan to look at encoder input onto original Enova inverter control board. I know they used both A&B channels, but how exactly i dont know.
Attachments
20200615_222650.jpg
20200615_222554.jpg
tom3141
Posts: 157
Joined: Sat Dec 22, 2018 2:29 pm
Location: North Yorkshire

Re: V1 Board Enova Encoder error

Post by tom3141 »

I've attached the parameters I've been using. When I was testing at 30V I used basically the same parameters.

I've ordered an Omron encoder to try on mine as I've run out of other options to try. The arduino style optical encoder that I'm currently using seem to fix all the problems apart from the limit at 1000rpm that only appeared after I switched to this encoder. I'm thinking the arudino encoder might either be faulty or just not up to the job, it was only £2.50 on ebay!
Attachments
snapshot May-30-2020 10-51am.json
(2.09 KiB) Downloaded 81 times
tom3141
Posts: 157
Joined: Sat Dec 22, 2018 2:29 pm
Location: North Yorkshire

Re: V1 Board Enova Encoder error

Post by tom3141 »

Had some success today. :D

The Omron encoder that I bought seems to have fixed the issue. It now spins up past 1000rpm and didn't have any overcurrent/encoder errors although I can't test it with the wheels on the floor yet as it isn't mounted properly. I'm going to try to get some parts made to mount it next week.

The encoder I bought is this one - https://www.ebay.co.uk/itm/OMRON-E6A2-C ... 2749.l2649

I'm using it with this coupling - https://www.motionco.co.uk/miniature-co ... p-377.html

The only issue I can see with this encoder is that it's only rated up to 5000rpm. This equates to around 63mph in my car but I'm going to stick with it for now if it works ok once I test it with the wheels on the ground.

I'm powering it directly from my 12V system (via a low pass filter). I've fitted a pull-up resistor to 3.3V on the output and I'm using a 10K 1nf low pass filter on the inverter board.
EVElvis
Posts: 31
Joined: Thu May 07, 2020 9:17 pm
Location: Leicestershire

Re: V1 Board Enova Encoder error

Post by EVElvis »

Good news Tom, hope the drive test works out too. Thanks for the link for coupler - didnt like the one in the box with my encoder and the info on your filtering.
The Omron encoder i ordered turned up too, so i did try it and didnt get a big improvement and no more rpm, but im not sure it is the right one and it was a quick lash up test? It was not a square pulse and appeared to be pulling down at each pulse according to my scope.
Its a E6B2 CWZ6C, and i notice yours is different so i may have got the wrong type, but i hadnt added any filtering of its output.
In anycase its not going to fit the end of the motor on my car without a lot more work and re-sealing the entry point for the 3 phases.
So I have been looking at the original Enova board trying to work out what it has. So far i can see a low pass filter, a pull up to Vcc and what appears to be a transistor, but i am somewhat unsure about it as to me it tests like a PNP type?
I couldnt easily find where the signal went from there, but i think i may try connecting to the Avago encoder to see what i get on this board. I would like to use the original type of encoder as i need the full 9000 rpm with the ratios i have on my car, and i note the 6000rpm limit of the Omron encoder i have.
Attachments
20200621_144445.jpg
tom3141
Posts: 157
Joined: Sat Dec 22, 2018 2:29 pm
Location: North Yorkshire

Re: V1 Board Enova Encoder error

Post by tom3141 »

Looking at the specs of the Omron encoder you have it should work in exactly the same way as mine. The only differences I can see are that the overall size and shaft diameter are larger and yours can take a 5V-24V supply (mine’s 12-24V).

The output is an open collector so should be either ground or floating. You’ll need a pull up resistor so that the square wave alternates between ground and 3.3V (or 5V depending on your inverter board circuitry).

I’ve attached a sketch of what my encoder circuit now looks like.
FCC1DE2B-2E55-437A-BBD0-6B80547C27E1.jpeg
EVElvis
Posts: 31
Joined: Thu May 07, 2020 9:17 pm
Location: Leicestershire

Re: V1 Board Enova Encoder error

Post by EVElvis »

Thanks Tom, might try going directly into the Olimex too.
Had another go separating the encoder lines away from all the 3 phase connections and from all the inverter main boards other connections. Used 1.5k resistors and cap on encoder signal before T1 base. This appears to have reduced interference. Signal from encoder seems good shown on the handheld scope, albeit very low rpm limits, however i think i may have damaged T1 or 3.3V power supply (from the Olimex i think?) and need to replace it as the noise and fluctuation comes from at the transistor T1 collector as shown on my old scope in this video:
Attachments
20200624_220540.jpg
20200624_220518.jpg
20200624_214642.jpg
EVElvis
Posts: 31
Joined: Thu May 07, 2020 9:17 pm
Location: Leicestershire

Re: V1 Board Enova Encoder error

Post by EVElvis »

Good news at last. I have smooth drive much higher rpm than before - not sure how high, but my battery test wires were getting a bit warm anyhow.
T1 seemed ok via multimeter, so no idea what was causing that issue, so i decided to connect as Tom sketched and remove it anyway, the only difference i have a 1,5k pull up and 5V at encoder. Looks like mainboard version 2 encoder connection for induction motor as well from what i can see. Thanks for all the help :D
I will report further tests. Time for some decent batteries.
EVElvis
Posts: 31
Joined: Thu May 07, 2020 9:17 pm
Location: Leicestershire

Re: V1 Board Enova Encoder error

Post by EVElvis »

Having had the wheels spin reasonably well with car on stands, albeit not with the smoothest starting, i cant seem to get the car going well with wheels on the ground? Played around with parameters fslipmin, fmin, slipstart etc.. quite a bit and still i get encoder error, despite signal being good?as far as i know shown here:

I tried old software V.2.97 and it was similar to using the latest, thinking the old encflt parameter was reason i could drive car in the past, not so it seems.
Wondering if there is need for a pull down resistor as 0V is not being registered by the olimex, despite encoder being push pull signal? I removed a pull up to 5V using 1.5K ohm resistor from the encoder signal line and that appeared to make no difference, so i now just have a 10kOhm resistor inline to olimex and a 1.3 nanofarad cap to gnd taking the 5V signal from 50 ppr Avago encoder.

Edit - 5k pulldown on signal gives a nice smooth start, 10k helps too, but not so good. But little speed at full pot signal, so fingers crossed a play with parameters and ill get going.
EVElvis
Posts: 31
Joined: Thu May 07, 2020 9:17 pm
Location: Leicestershire

Re: V1 Board Enova Encoder error

Post by EVElvis »

getting better. No encoder error now, and smooth starting. Now have a 6.8K Ohm pull down on encoder signal, with 10 kohm inline to olimex and 1.3 nanofarad cap to ground on the mainboard.
Hoping parameter settings are the reason for such slow max speed at full throttle.
arber333
Posts: 3261
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 80 times
Been thanked: 232 times
Contact:

Re: V1 Board Enova Encoder error

Post by arber333 »

EVElvis wrote: Sun Jul 26, 2020 8:44 pm getting better. No encoder error now, and smooth starting. Now have a 6.8K Ohm pull down on encoder signal, with 10 kohm inline to olimex and 1.3 nanofarad cap to ground on the mainboard.
Hoping parameter settings are the reason for such slow max speed at full throttle.
Yes filtering cap is very important here. When you have good drive allo the time you need to try the max speed too. If you filter the signal too much it may close the window for variations. You may be better off with using lower pulse count wheel. I use 60ppr just because it was easy to make on the mill. Dial 6° per cut, gives you 60 cuts per 360°.
EVElvis
Posts: 31
Joined: Thu May 07, 2020 9:17 pm
Location: Leicestershire

Re: V1 Board Enova Encoder error

Post by EVElvis »

Thanks for the help everyone, particularly arber & Tom, seems that the encoder circuit and Olimex sensing is very sensitive and needs setting up depending on what encoder signal you have in single encoder mode. I thought it was plug and play, lol. My understanding of this now is that the Olimex needs to clearly see 0V, no current for low state, then some voltage and current for high state. The push-pull signal from encoder has its limit in being able to sink current? so thats why i rekon adding the pull down 6.8 kOhm resisitor made things work ok? - 10 kOhm was too little and drive was less smooth. Better quality 5V power supply seemed to help lots with the interference i was seeing (previously used 5v off the sensor board). Better shielding and filtering probably also needed some improvement in my case too.
20200802_150623[1].jpg
So far so good at a higher vehicle speed now. No more encoder errors and smooth starting :-)
Not smooth stopping tho, but shows there must be regen working.
fweak 70, but probably could be lower with the voltage of 75V on the bus, fslipmax set to 10 made a big difference to max speed being achieved. slipstart, fmin, fslipmin played with too.
Still plenty to do though and only really just started playing with parameters. Need to get some decent batteries too.
Post Reply