how to program a sevcon gen4

General Discussion about large electric scooters and motorcycles and other things with no pedals.
samv76   1 mW

1 mW
Posts: 13
Joined: Jun 03 2020 2:20am

Re: how to program a sevcon gen4

Post by samv76 » Aug 02 2020 9:02am

darseygodwin wrote:
Sep 22 2019 11:49am
You'll have a much easier time with an oscilloscope, but it sounds like your encoder is something like 180 degrees out of alignment.

Read this: https://www.e-kart.fr/images/stories/te ... e-pmac.pdf
If the link doesn't work, google for "sevcon app note". It explains what you're experiencing.

You probably already know, but keeping phase 1 the same, and flipping leads 2/3 will reverse the motor's direction from forward to reverse.
Next, your cos signal should lead the sin signal by 90 degrees in forward direction, so that's your order of whether or not you need to flip the sin/cos leads to the encoder. If you don't have an oscilloscope you can be very slow with a voltmeter and figure it out.

HOWEVER, if your encoder is fully 180 degrees out of alignment it can turn in the wrong direction, and sometimes it's actually rideable. BE CAREFUL though, because if you're at that point, it can be pretty unstable and race like a banshee with regenerative braking enabled and no load on the motor. This is why the scope is important to use, so you can visually see the encoder's alignment with your phases.

Finally, if everything works, and you've used a scope to guarantee it's well aligned but very rough and sounds bad, it could also be noise. (I'm still measuring PWM noise from the gen4 on my encoder as soon as the contactor closes, that throws off the position whenever I'm pulling more than 300A AC current. That's even with everything heavily shielded and shields grounded.) But it sounds like you're not at that point yet, that it's more likely just encoder alignment.
I am interested in learning more about the sevcon controllers and encoders. I have a govecs 3.4 that uses a 3.9kw parker motor. I would like to attach it to a scope to get the allignment exactly right. but looking in the app note, i see that i need a 4 channel scope for that? or will a 2 channel scope suffice?

User avatar
darseygodwin   1 mW

1 mW
Posts: 16
Joined: Jul 31 2016 5:51pm

Re: how to program a sevcon gen4

Post by darseygodwin » Aug 02 2020 10:52am

Yes a 2 channel works fine, that's all I had. Just takes some thought and good note taking to keep organized. The 4 channels let you see everything on one screen, but every measurement in that app note can be done just two channels at a time.

Sent from my Pixel using Tapatalk


samv76   1 mW

1 mW
Posts: 13
Joined: Jun 03 2020 2:20am

Re: how to program a sevcon gen4

Post by samv76 » Aug 02 2020 12:11pm

darseygodwin wrote:
Aug 02 2020 10:52am
Yes a 2 channel works fine, that's all I had. Just takes some thought and good note taking to keep organized. The 4 channels let you see everything on one screen, but every measurement in that app note can be done just two channels at a time.

Sent from my Pixel using Tapatalk
cheers! ill be going on the hunt for a used scope then so i can have a look.
still lots to learn about my sevcon.

i found out today that my sevcon does not allow for regen braking on neutral throttle. I have been told that this is because the manufacturer of the scooter has disabled this on a deeper level than i have access to. pretty frustrating. surely there must be a way to get different firmware on my sevcon or adapt the existing one to allow for regen?

User avatar
darseygodwin   1 mW

1 mW
Posts: 16
Joined: Jul 31 2016 5:51pm

Re: how to program a sevcon gen4

Post by darseygodwin » Aug 02 2020 3:48pm

@samv76 ... The true short answer is yes, the firmware can be reflashes to give you access to everything. The honest truth however is that if you have things to learn about the Sevcon and also weren't at a point to truly know if you can use a two channel scope, then my advice is that you honestly don't want to reflash new firmware.

There's multiple layers of P-I control system values you need to tune to get the unit to run even decently safely well, and if it's already running but you just want Regen, then prob not worth it. Lots of people prefer to roll without regen just for the coasting feeling. There are people around here who do have firmware flashes available but I can't help you with it myself. Just be prepared to toss the whole setup of you do.

Sent from my Pixel using Tapatalk


samv76   1 mW

1 mW
Posts: 13
Joined: Jun 03 2020 2:20am

Re: how to program a sevcon gen4

Post by samv76 » Aug 03 2020 6:35am

darseygodwin wrote:
Aug 02 2020 3:48pm
@samv76 ... The true short answer is yes, the firmware can be reflashes to give you access to everything. The honest truth however is that if you have things to learn about the Sevcon and also weren't at a point to truly know if you can use a two channel scope, then my advice is that you honestly don't want to reflash new firmware.

There's multiple layers of P-I control system values you need to tune to get the unit to run even decently safely well, and if it's already running but you just want Regen, then prob not worth it. Lots of people prefer to roll without regen just for the coasting feeling. There are people around here who do have firmware flashes available but I can't help you with it myself. Just be prepared to toss the whole setup of you do.

Sent from my Pixel using Tapatalk
thx for the advice. For now, i will stick to the current firmware and do without regen untill i get to the point where i have enough knowlegde ( if that point ever comes :lol: )

Robinev   100 W

100 W
Posts: 103
Joined: Feb 22 2020 3:37am

Re: how to program a sevcon gen4

Post by Robinev » Aug 06 2020 5:42pm

i feel you man knowledge is hard to come by

buddhafragt   100 µW

100 µW
Posts: 9
Joined: Oct 15 2014 3:33am

sevcon gen4 "speed pulse generation"

Post by buddhafragt » Sep 08 2020 12:51pm

Hi all,
I have this problem now: For the Battery I use a EMUS BMS; for the Motor the GEN4 bcs. I change to a Twizy Motor.
Before I had speed pulses from the old motor to feed the BMS for distance calculation.
Now not anymore.... Is there a way, to generate speed pulses in the GEN4 to feed the BMS?

best regards, Michael

Ingo   100 mW

100 mW
Posts: 43
Joined: Nov 03 2016 6:22am
Location: Germany

Re: how to program a sevcon gen4

Post by Ingo » Oct 10 2020 1:52pm

2xhp wrote:
Mar 05 2020 4:58pm
Ingo wrote:
Sep 23 2019 2:23pm
thanks. i got it :)

Now I'm smarter: you have to swap sin and cos. Swap M2 and M3. then it turn in correct way.

but i still can not record a trace... says me not enough data points.

logs.rar
Hey there Ingo!

It looks like you resolved this somehow. I'm getting the same error:

DVT_error.PNG

I record Uq and Ud for about 10 seconds. Do I need to do it longer? Do I need to go longer? I'm using this great post as a guide:

viewtopic.php?t=88647


the motor must freewheeling to record a trace . I didn't know that at the beginning

https://www.youtube.com/watch?v=QxA3493 ... A&index=21

Thanks in advance.

Ingo   100 mW

100 mW
Posts: 43
Joined: Nov 03 2016 6:22am
Location: Germany

Re: how to program a sevcon gen4

Post by Ingo » Oct 10 2020 3:54pm

hi all,

I have another problem with my sevcon gen4 size6 and ME1302 motor.

when i give a little throttle (current is low) the motor runs fine (with the wheel off the ground)
but when i give more throttle (current is higher) the motor / controller beginns to make a squeak / whistling noise very loud.

the encorder is aligned

when i take a trace with little throttle the trace looks good but when i take a trace with more throttle the points more to the right and to the left a the whistling noise appears.
log_101020_202507.csv
(384.93 KiB) Downloaded 6 times
log_101020_202714.csv
(51.98 KiB) Downloaded 5 times
log_101020_203003.csv
(358.37 KiB) Downloaded 4 times
log_101020_203137.csv
(573.2 KiB) Downloaded 4 times
log_101020_203323.csv
(169.71 KiB) Downloaded 5 times
log_101020_203420.csv
(184.76 KiB) Downloaded 5 times

Ingo   100 mW

100 mW
Posts: 43
Joined: Nov 03 2016 6:22am
Location: Germany

Re: how to program a sevcon gen4

Post by Ingo » Oct 10 2020 4:00pm

it look like the offset is changing when current is given to motor
hard Throttle (2).JPG
hard Throttle (2).JPG (274.73 KiB) Viewed 277 times
hard throttle.JPG
hard throttle.JPG (489.33 KiB) Viewed 277 times
offset changed...JPG
offset changed...JPG (499.82 KiB) Viewed 277 times
SINCOS Setup.JPG
SINCOS Setup.JPG (450.23 KiB) Viewed 277 times
slow throttle.JPG
slow throttle.JPG (403.64 KiB) Viewed 277 times

User avatar
darseygodwin   1 mW

1 mW
Posts: 16
Joined: Jul 31 2016 5:51pm

Re: how to program a sevcon gen4

Post by darseygodwin » Oct 15 2020 9:54am

Noise?

Check that not only are encoder, main battery leads and phase leads shielded, but absolutely all B- wires are shielded as well. (I assume your pack and controller are floating in comparison to frame)

Darsey

Robinev   100 W

100 W
Posts: 103
Joined: Feb 22 2020 3:37am

Re: how to program a sevcon gen4

Post by Robinev » Oct 16 2020 10:43pm

I ran motor me1507 with a lathe three Jaw chuck to acquire my trace and when i thought it wasn’t aligned correctly I reprogrammed the controller and started over and ran a trace till the dots looked like they grouped gen4 size4 with the files I had. Till the motor sounded like it was working properly


Sent from my iPhone using Tapatalk

Robinev   100 W

100 W
Posts: 103
Joined: Feb 22 2020 3:37am

Re: how to program a sevcon gen4

Post by Robinev » Oct 16 2020 11:02pm

Also have to clear and any error codes before running that trace


Sent from my iPhone using Tapatalk

aymenkhalaf   1 µW

1 µW
Posts: 3
Joined: Nov 19 2020 6:03pm

Re: how to program a sevcon gen4

Post by aymenkhalaf » Nov 19 2020 6:07pm

Hello Guys,

I am getting this problem
Fault.PNG
Fault.PNG (21.46 KiB) Viewed 76 times
. It won't let me get to do anything (adjust parameters or anything). Running a Gen 4 Size 8 with an ME1303 for now for testing but will be using Yasa 400 later. I want to see if anyone here encountered this and how they fixed it if they did.

Thank you!!

Robinev   100 W

100 W
Posts: 103
Joined: Feb 22 2020 3:37am

Re: how to program a sevcon gen4

Post by Robinev » Nov 20 2020 12:49pm

Check your can bus wires first tx to rx and rx to tx.


Sent from my iPhone using Tapatalk

Robinev   100 W

100 W
Posts: 103
Joined: Feb 22 2020 3:37am

Re: how to program a sevcon gen4

Post by Robinev » Nov 20 2020 12:51pm

aymenkhalaf wrote:Hello Guys,

I am getting this problem
Fault.PNG
. It won't let me get to do anything (adjust parameters or anything). Running a Gen 4 Size 8 with an ME1303 for now for testing but will be using Yasa 400 later. I want to see if anyone here encountered this and how they fixed it if they did.

Thank you!!
Seems Can bus is not wired correctly. Swap them around


Sent from my iPhone using Tapatalk

aymenkhalaf   1 µW

1 µW
Posts: 3
Joined: Nov 19 2020 6:03pm

Re: how to program a sevcon gen4

Post by aymenkhalaf » Nov 20 2020 1:37pm

Robinev wrote:
Nov 20 2020 12:51pm
aymenkhalaf wrote:Hello Guys,

I am getting this problem Fault.PNG. It won't let me get to do anything (adjust parameters or anything). Running a Gen 4 Size 8 with an ME1303 for now for testing but will be using Yasa 400 later. I want to see if anyone here encountered this and how they fixed it if they did.

Thank you!!
Seems Can bus is not wired correctly. Swap them around


Sent from my iPhone using Tapatalk
I see communication already. The cAN window shows TX RX in purple

riwi77   1 mW

1 mW
Posts: 11
Joined: Feb 25 2017 9:54am

Re: how to program a sevcon gen4

Post by riwi77 » Nov 21 2020 2:44pm

darseygodwin wrote:
Mar 05 2020 10:01pm
Sorry I edited this post a couple times as I was remembering how thing went down for me in the end.

@2xhp, try spinning the motor in the other direction, or swapping the M2 and M3 leads at the controller and trying again. Ingo's comment about flipping sin/cos suggests the motor's turning direction was opposite the sin/cos encoder's direction when it wasn't working. It's been just slightly too long since I did this that it's hazy and I can't remember if DVT needed to be in "forward" or just having the wheel spinning in the same direction as the applied torque direction. When my stuff was backwards I switched DVT to "forward" which spun the motor in backwards in order to take a trace. I then switched DVT back to "Reverse" again to hit the road. Careful that you don't have everything aligned 180 degrees out, because it can first seem ok but then quickly go unstable and race to Mach 10 when freewheeling. As in, be ready to hit the brakes when testing.

Second possibility is that it wasn't turning fast enough to register Ud/Uq values. You can see that right in the vehicle monitor screen though so you might've already ruled that out. Good luck.
Hey!

I think I got a taste of that mach 10 freewheeling today. I touched the throttle and the motor reved up, hitting some limit which caused the controller, gen4 size4, to issue a DSP overvoltage or Current control fault. I will check that my sine and cosine are not mixed up.
Do you know if a DCF from a size 6 will cause problems when running on a size 4? I have altered the values for current to match the size 4 limits.

Thanks

Rikard

riwi77   1 mW

1 mW
Posts: 11
Joined: Feb 25 2017 9:54am

Re: how to program a sevcon gen4

Post by riwi77 » Nov 21 2020 2:53pm

Ingo wrote:
Oct 10 2020 4:00pm
it look like the offset is changing when current is given to motorhard Throttle (2).JPGhard throttle.JPGoffset changed...JPGSINCOS Setup.JPGslow throttle.JPG
Hi Ingo!

I use the me1304 in my boat and I dont have the "latency select" value set. Have you tried to remove it?

BR

Rikard

User avatar
darseygodwin   1 mW

1 mW
Posts: 16
Joined: Jul 31 2016 5:51pm

Re: how to program a sevcon gen4

Post by darseygodwin » Nov 21 2020 3:02pm

@riwi77 haha yea that's a creepy feeling when she takes off.

Honestly not sure what the differences are behind the scenes between the two DCF files, if there is one. I've only ever worked with my size 6, but there is a dcf compare tool in the software, which outputs a CSV file listing the differences between two files. You could save a size 4 dcf and compare with your size 6 file you want to use and see for yourself. Even if they're not 100% compatible it should let you see the difference in any critical settings you're specifically looking for (like P-I gains settings), then you can manually build one yourself.

I did that with someone else's size 6 dcf that I found online just to get an idea where other people have their settings in their "stable" configurations.

Good luck.

Sent from my SM-N770F using Tapatalk


riwi77   1 mW

1 mW
Posts: 11
Joined: Feb 25 2017 9:54am

Re: how to program a sevcon gen4

Post by riwi77 » Nov 21 2020 5:01pm

Thank you,

I will try it and report.

Br

Rikard

riwi77   1 mW

1 mW
Posts: 11
Joined: Feb 25 2017 9:54am

Re: how to program a sevcon gen4

Post by riwi77 » Nov 21 2020 5:15pm

darseygodwin wrote:
Nov 21 2020 3:02pm
@riwi77 haha yea that's a creepy feeling when she takes off.

Honestly not sure what the differences are behind the scenes between the two DCF files, if there is one. I've only ever worked with my size 6, but there is a dcf compare tool in the software, which outputs a CSV file listing the differences between two files. You could save a size 4 dcf and compare with your size 6 file you want to use and see for yourself. Even if they're not 100% compatible it should let you see the difference in any critical settings you're specifically looking for (like P-I gains settings), then you can manually build one yourself.

I did that with someone else's size 6 dcf that I found online just to get an idea where other people have their settings in their "stable" configurations.

Good luck.

Sent from my SM-N770F using Tapatalk
Just to clarify, some of the settings under motor configuration are “hw-specific” meaning that the apply to the hw resources available in the specific model on gen4? That do make sense and I should find a working gen4 size 4 80V dcf and start from there.

User avatar
darseygodwin   1 mW

1 mW
Posts: 16
Joined: Jul 31 2016 5:51pm

Re: how to program a sevcon gen4

Post by darseygodwin » Nov 21 2020 6:18pm

There is a controller hardware specific requirement to make the gen 4 controller compatible with sin-cos encoders. So that's one place where there's a hardware specific requirement. I assume that's probably a similar requirement for both size 4 and 6 models.

Sent from my SM-N770F using Tapatalk


Ingo   100 mW

100 mW
Posts: 43
Joined: Nov 03 2016 6:22am
Location: Germany

Re: how to program a sevcon gen4

Post by Ingo » Nov 22 2020 4:49am

riwi77 wrote:
Nov 21 2020 2:53pm
Ingo wrote:
Oct 10 2020 4:00pm
it look like the offset is changing when current is given to motorhard Throttle (2).JPGhard throttle.JPGoffset changed...JPGSINCOS Setup.JPGslow throttle.JPG
Hi Ingo!

I use the me1304 in my boat and I dont have the "latency select" value set. Have you tried to remove it?

BR

Rikard

hi,

ok i will test it. thanks!

Ingo   100 mW

100 mW
Posts: 43
Joined: Nov 03 2016 6:22am
Location: Germany

Re: how to program a sevcon gen4

Post by Ingo » Nov 22 2020 6:11am

hi,

i can only change to 90us.

it makes no difference
DSCF2530.JPG
DSCF2530.JPG (412.7 KiB) Viewed 9 times

Post Reply