SEVCON GEN 4 flashes 10 times. Can I somehow fix the problem without programming/debugging tools?

exMagic

1 mW
Joined
Nov 14, 2022
Messages
13
Location
Norway Drammen Berger
Hello
A year ago I bought an electric scooter for around $60 with dead batteries. (PDT SPRINT 5000W) from 2011.

AL9nZEUNMDYgCsO07rxfVEAzfQwDaMYw3Y3w_94aCPwt7VJ68-SjbTayJQ8Jmy8U1Adt5lkGQrWSWQxM3rhYs7wxu4NheTXPqEezctvH4K1UD2pef70stCdXV7tIj6gcfgCeaOpmOM3L7m86Mn0iOrp-P0MSww=w2678-h2010-no


Lately I've got a lot of Lithium-ion battery packs from old kick scooters, so I decided to give it a try and see if I can make it running again. 
Each pack is 10s4p = 36v so I have connected 10 of them in 2s5p so I have a 72v battery pack to run some tests and validate if the rest of the bike is worthy of attention.

AL9nZEVVgJ_DkGkme-PzzMZCd3YN4xK8wPsUINwgBkxauZU3DYr6YkEWDFULFBtwjSgkg4bB7LOIrJaUwZr9DxxrN68IRFAip7jYfgXUjEY6MfTl2xx2xCOz9COxV2sBoLAAcFjCsUL_B9OQfldoNgnXfFNsVg=w2678-h2010-no


I connected it and the bike was running :) I noticed during a few short test rides that the power was cut off if I twist the throttle too much, but after releasing it, I was able to accelerate again.
Suddenly the motor does not want to spin any more. :cry:

It turns out that the bike had replaced the original controller with a SEVCON Gen4. (Wow! I see that this controller is capable of 350A.much more than a 5KW motor:)
There are a lot of custom "home made" connections in the bike wiring, so it looks like a lot of people have modified it over the years.
Here is my attempt to document current state of wiring:

AL9nZEW5Q14bNANvbtEtjjja6BcVkBvqbn-SnyEdhv5mcm5IxDr5BdIdvBVM33QgCkOI5g9SSE_Q0FZGow4zk2asr6kVnmtXasiSdmDYohVMP9kRabxr4sCV5JbwA3Saox6VUwTYJPfqACDMFzaBLzlKpoh-vg=w965-h900-no


I've been studying this and other forums for a few days now and I am Aware that this controller is not easy to work with but,
 since it is on the bike already and probably is programmed correctly to this 5KW hub motor, maybe there is a way to make it running again.

Here is what I have tried:

1.
connect key switch to pin 1
connect  main contactor coil to pin 7 and 8
result:contactor starts with green led on the controller and turns off when led goes off (still 10 flashes of green led on the controller)

2.
connect key switch to pin 1
connect  main contactor coil to pin 7 and 8
disconnect pin 13, 24, 15, 26
result:the same as in point 1.

3.connect key switch to pin 1
connect  main contactor coil to pin 3 and 8
result:contactor do not turn on, still 10 flashes on led. 

Obviously I have checked and lubricated all connectors.

AL9nZEXQ36ouSUuPD0kJjP6oLr0sjvxlY2ruR164NTbWc7ZXDsiSvsZkL0yarQLhWeOF8sCjCR6ho9jfIiqaeJ-30YYrzMhkAS1Rj1oSpV4a2lz_xW6HgjbSUVYy6_7oC4srprcQ36rzi3PGuzH-jEAPP0OSZg=w2678-h2010-no


AL9nZEUmDlXY_uPZfS6FzLpGhRACO0YnceSGlM41hOCz8OaRLCaBqODaC2Db0DfPO4KgKYype8kAk5bHs6xx6QiDHZC7QCDmBqmwDjh8pJfwiFrxwn58GuFpqHEiVPqokVuHXQXek4nwjG6nIT1jjqDgrD5jHQ=w1506-h2008-no


AL9nZEUUF9CmbJJov8g5W0EuaRRbHCVtqhpmiv54RD5vO3x-rWVZNdoCcO1f5xydyxUBTN_hSZ2KH-q-WJyiGMqs6AJ0wxkJ8_zRjAMk7SuRm29bJj8O4ui_xysUvk5WlbFtczNtcQUaeD7POD_qMGJ06ZqQaA=w2678-h2010-no


AL9nZEXlw4OK8DRW1_kT04uDknRj45C_9Hh3iCD47f1V79Eqvhq0_9l6lsyxXN9m0i9ZHwIxAFjKHal2oRnKUwz7xxOVD0tNOsXiMuiiHWBHSo_u9-sxoQBqAB4hhvVWo_xshTJXYAz5RZiUZ-cDsS2KbHBOWw=w2368-h1776-no


From what I understand, the black box(dsPIC30F4012) between throttle and controller communicates with the controller via CAN and one of the error description suggest that the
"Controller has not received all configured RPDOs within 5s ofpower up."

so here is a question:
Do you guys think that this black box is faulty?
If so, is there a chance to get rid of it, without programming the controller to accept a normal potentiometer as a throttle?

Do you see what else I can check to figure out what is the source of 10 led blinks?

Thank you in advance for all the help
ps. This is my first post and I hope I didn't break any rules. However, Hi everybody! My name is Maciek and I hope this is only a beginning for me on this forum :) :bolt:
 
exMagic said:
Lately I've got a lot of Lithium-ion battery packs from old kick scooters, so I decided to give it a try and see if I can make it running again. 
Each pack is 10s40p = 36v so I have connected 10 of them in 2s5p so I have a 72v battery pack to run some tests and validate if the rest of the bike is worthy of attention.

Do you really mean 10s40p, or is that 10s4p? (they don't look big enough to be 40p, and if they are 10 of them would likely be too large to fit on the scooter?). It's only important in determing if the batteries might or might not be able to handle the load this controller could place on them.



I connected it and the bike was running :) I noticed during a few short test rides that the power was cut off if I twist the throttle too much, but after releasing it, I was able to accelerate again.

The main likely fault if power from the batteries actually shutdown each time is that they can't handle the load of the scooter's system and their BMS(es) shutdown to protect the cells from damage.

Note also that if the seriesed packs do have individual pack BMS, and the FETs on them are not capable of significantly more than the max full charged voltage of the pack as a whole, then anything that causes any BMS to shut off the FETs for any reason will then damage those FETs (too much votlage across them, so they fail shorted...but as high-resistance compared to normal operation, so not only do they create excess heat in this failure mode but they also cannot shut off anymore to protect the cells in the pack regardless of what the BMS detects and tries to do).

If the power didn't shutdown but the controller stopped trying to move the motor, there might simply be so much voltage sag that the controller detected this as a problem and stopped to protect the battery from damage.

Suddenly the motor does not want to spin any more. :cry:
What was the battery that had been on the scooter before, presuming it was working with that battery at some point in it's life (before you got it)? If the battery you have now is too high a voltage it might have damaged some component in the system, or if it is too low a voltage the controller might have shutdown to protect the battery. Normally that kind of shutdown should be corrected by recharging the battery, but if it has a way to program it to require a special form of reset command (I don't know), such as for an anti-theft or fire-prevention safety, it might not be able to restart without this.


From what I understand, the black box(dsPIC30F4012) between throttle and controller communicates with the controller via CAN and one of the error description suggest that the
"Controller has not received all configured RPDOs within 5s ofpower up."

so here is a question:
Do you guys think that this black box is faulty?
If so, is there a chance to get rid of it, without programming the controller to accept a normal potentiometer as a throttle?
If the controller is setup to require specific CANBUS / etc data on startup, you will have to eiher reprogram it to not need that, or provide something that does do this for it. If it is setup to use CANBUS for the throttle data rather than a direct throttle connection, you'd have to reprogram it to change that and be able to do that.

If the switches and throttle all feed into the DSPIC for it to create it's data, any of those that is in the wrong state vs expected at startup could cause the problem. Verifying (with a multimeter) each input at the DSPIC that's connected to an input device is getting the correct readings for each state of that input device makes sure the switches/throttle are working as expected.

Is the DSPIC powered correctly, and sending data out? You wont' likely be able to tell if it's the *right* data, but at least knowing it is trying is a start. A multimeter on a data line usually reads about half of the logic-level voltage (5v, 12v, etc) the device sending the data uses. If there is only one data line (rather than sparate TX/RX lines), you won't know if what you see is from the Sevcon or the DSPIC. If the line is stuck low or high and not somewhere in the middle, there's no data being sent. If you have an oscilloscope you can actually see the data pulses to verify they're being sent.

Do you see what else I can check to figure out what is the source of 10 led blinks?
Depends on what that specific error code means for this model of Sevcon with the version of firmware it has installed. (I didn't try looking up error codes)

If the error is not specific enough, or if it could mean several possible things, then it may be tough to give specific enough test advice.

If the only error linked to that code is the one you quote above, then I would guess that it is to do with the DSPIC box, but it could be any of the inputs to it causing it to not provide the expected data, or the DSPIC box itself, etc.
 
wow thank you for the quick and extensive answer

amberwolf said:
Do you really mean 10s40p, or is that 10s4p? ...
obviously I ment 10s4p. sorry my mistake.

amberwolf said:
The main likely fault if power from the batteries actually shutdown each time is that they can't handle the load ...
yes my "frankenstein" battery contains 10 bmses. 5 in parallel and 2 in series. This is just a temporary solution and it is far from a good solution. I don't know the specifications of those bmses but I guess each of them should handle 15A discharge so should be enough for a 5KW motor, at least for slow tests.

What was the battery that had been on the scooter before,

AL9nZEXus-utRoyBopKHxL1mIGh_OCezmKVLjE8Eva-ZMnX9hmnpe3XMorta2aRZ6xbVD-PD98ijxAGmPwhz3j6yLkgTxTyfNaLHD-C_8zFtfF5ho2KzZFJCfExobJTRfoQUzVknSdXytwlsaaRQi3xM18qo4A=w2678-h2010-no

LiFePO4 20s
now it is Li-ion 20s so voltage should be ok. I started with 82v.
When I measure the battery voltage now it is still around 82v so I don't think the lack of voltage is a reason for blinking on the controller.
Anyway I will try to recharge those batteries a little to eliminate this possibility.

If the controller is setup to require specific CANBUS / etc data on startup, you will have to eiher reprogram it to not need that,
that 's what I was afraid of ;(

Is the DSPIC powered correctly, and sending data out? You wont' likely be able to tell if it's the *right* data, but at least knowing it is trying is a start. A multimeter on a data line usually reads about half of the logic-level voltage (5v, 12v, etc) the device sending the data uses. If there is only one data line (rather than sparate TX/RX lines), you won't know if what you see is from the Sevcon or the DSPIC. If the line is stuck low or high and not somewhere in the middle, there's no data being sent. If you have an oscilloscope you can actually see the data pulses to verify they're being sent.

I don't have an oscilloscope but I will try to at least measure voltage on wires between the DSPIC and the controller tomorrow.
 
exMagic said:
yes my "frankenstein" battery contains 10 bmses. 5 in parallel and 2 in series. This is just a temporary solution and it is far from a good solution. I don't know the specifications of those bmses but I guess each of them should handle 15A discharge so should be enough for a 5KW motor, at least for slow tests.
The big problem can be the voltage of the seriesing of the packs being possibly higher than the FETs' ratings in the BMSs, if the FETs cant' handle the total voltage if the BMS turns them off; that's when problems usually start to happen. It's unlikely to be the cause of the situation you have now even if any of them did fail, but something to beware of. There are solutions to prevent this if necessary, such as diodes wired across each pack in a series stack, etc. (there's some posts about that by Fechter in some relatively recent threads).



LiFePO4 20s
now it is Li-ion 20s so voltage should be ok.
LiFePO4 20s is only about 64v nominal. (3.2v/cell * 20) Fully charged at 3.65v/cell would only be about
72-73v.

The Li-ion 20s is 3.6/3.7v / cell * 20 = 74v nominal, but full at 4.2v/cell is 84v.

That's quite a bit higher than the original pack, which presumably worked with the system ok before aging or stress caught up with it.

It's unlikely since it worked at first but perhaps that exceeded the voltage of some part of the system that is powered from the battery itself (rather than from 5v or 12v off the controller)? The controller should have overvoltage protection that would prevent it from even operating at a higher voltage than it is programmed / designed for, so it wouldn't have operated if it were the part in question.
 
ok have measured voltage on wires betwen DSPIC and the Sevcon
Here is what I found:

Black -GND
Orange -2.0v
Red -3.3v
Pink -2.9v
Gray -up and down like led on controller
Blue -81.9v

then I disconnected orange and pink and meausure them on the controller side and DSPIC side:

Controller side:
Orange -2.0v
Pink -3.0v

DSPIC side:
Orange -0.7v
Pink -0.7v

AL9nZEXAZaKbs844NtPO-7tySvLUVc8gNLuxT0Gb4pZtQ-NCJJMHv7PZX4Nx6925KcMpZtj0pVKdaSfRshATtWtTcnGTSyznfNqH4lihFwCnL2TYTglmg86jlkjPv_gJ9ccNq6c-LfGXwZOICyMEWLZHWLwJqQ=w1506-h2008-no


However I don't think this test is important to me anyway. The DSPIC and entire circuit is heavily modified by somebody plus since I am planning to use Li-ion instead of  LiFePO4 I think I need new firmware on Sevcon anyway so I can connect throttle etc directly to the controller.
I also see now that my higher voltage could burn some of the components, who knows :/

I think I have three options now:

1. buy ixxat USB-to-CAN and dive into the rabbit whole of learning how to program sevcon.
2. find somebody who has ixxat USB-to-CAN and can program my controller for me.
3. buy some new controller which is much easier and cheaper to program.

Option one is very attractive to me because in the future I could buy a bigger motor and easily upgrade entire bike, however since I have been a father for about three weeks now, I am not sure if this is the best time for this journey :) 
I think I will try option 2 first.
 
Here is a newbie question:
Is it possible to connect an cheap Arduino CAN bus module to my sevocn and get some useful information about current firmware?
I am just wondering if I can get some info about what exactly type of signal, Sevcon is expecting from DSPIC?
If DSPIC is sending information to the Sevcon that side stand is lifted, kill switch is on and what position throttle is, maybe I could write arduino code to talk to the Sevcono instead of my broken DSPIC in the same way and pretend that Arduino is a DSPIC?
:?:
Please don’t get me wrong, I know this is a complex topic. I am not asking how to do it. I am just asking if that is possible. I will do my own homework and learn how to do it, but first I would like to confirm that is doable.
I treat this topic as an opportunity to learn something new and useful, so sorry if my questions are sometimes dumb.
 
Some manuals for Sevcon controllers are available online.
10 flashes for your generation of controller could be different than a new generation controller.
There are hundreds of different options of Sevcon traction controllers available.
Search by model number or serial number.
Try this company :
https://shop.fsip.biz/en
They have been helpful with solving Curtis controllers issues for me.

Examples of DIY CAN Bus readers are also online :

https://www.instructables.com/Yes-We-CAN-BUS-With-Arduino-in-30-Seconds/
https://www.youtube.com/watch?v=V4Jp4QkcHSk
https://www.seeedstudio.com/CANBed-Arduino-CAN-BUS-Development-Kit-Atmega32U4-with-MCP2515-and-MCP2551-p-4365.html?gclid=CjwKCAiArY2fBhB9EiwAWqHK6mLxOSKA-VUT_AP_B612EOnqPBHZ4IsB95I_yKFY1KcZ1gbIQU47EBoCMV8QAvD_BwE
 
Thank You PaPaSteve for the links.
Yes, I saw that people are reading CAN bus messages from cars by arduino with some shields.
Let me rephrase my question...

Is it possible to build a replacement for my DSPIC using arduino + can bus shield WITHOUT reprogramming Sevcon?

I have some knowledge about arduino and programming, but not so much about CAN yet.
 I am trying to imagine that once I connect the arduino to Sevcon via CAN, -- //MAYBE// -- I will be able to figure out what kind of communications Sevcon is expecting from DSPIC, so then I will be able to reproduce DSPIC messages from arduino or ESP32?
Some kind of reverse engineering of communication protocol.
I am trying to get a confirmation here that this is posible or not.

I am just trying to find the way to make this bike alive again without reprogramming Sevcon. I am pretty sure The sevcon is OK. I was able to ride on this bike a few test rides and based on my basic measurements l think DSPIC stopped sending Can messages. it make sense according to the error codes from Sevcon Manual
https://www.thunderstruck-ev.com/images/Gen4%20Product%20Manual%20V3%204.pdf 
 
Pages 35 ~ 38 of the Sevcon manual explain the connections.
By following the connection descriptions the dsPIC looks to be monitoring the encoder and the side stand switch.
As a troubleshooting tactic ... have you tried changing out the encoder ?
 
Doable? Eventually, most likely. :/ There will be a lot of guesswork unless you have a starting point, though:

Is there any way for you to read the code out of the DSPIC chip itself? If it's still functional and still powers on, you can find out what DSPICs use for a programming interface and read out all of it's code, if it was not set to "locked" (if it has that ability). If so, you could then figure out what exactly it is doing, copy all it's data tables, and write new software to do the same thing on your choice of MCU platform, including the specific data you need sent to the Sevcon.

The Sevcon doesn't care what device it is talking to (DSPIC, Arduino, ESP32, Commodore64, etc., ;) ) as long as it gets the data it expects in the exact format it needs it in, with the values in the right range.

CANBUS is just a protocol and hardware interface. The actual data sent on it is not standardized between systems, so unless you have a way to read the data from the old system (DSPIC) in operation for each control signal you need to emulate, you would have to check the documentation for the Sevcon itself for what data it requires for each type of CANBUS control signal, and probably then have to experiment with the values of each signal until it responds as desired. (which could be a lot of experimenting time).
 
Guys, thanks a lot for your answers. I really appreciate it!

You have encouraged me to take a closer look at DSPIC. I have found a datasheet of dsPIC30F4012:

AMWts8CKX0nXazJdE5NAlZywPuSJlsku-S4HEQoTezV-Y_L_tE0eW4plKs2bluQmnTLACItuLf7y7js73IwU7YC6y8MBvs31-S4Odv-_WkI_XdlbL80OYFzVmPEb5oEdRjbQ_WXS-KCXmRi7tmOnCbSqgPHWyQ=w2678-h2010-no


pin 18 and 17 are CAN bus and there is no voltage on them, BUT what is more important between pin 20 and 19 there is no voltage either. (13 and 8 has no voltage to) SO... this board is not powered up!!!
This gives me hope. MAYBE I can fix it :)
Right now it is hard for me to figure out the wiring. I am confused about where the power source should be located because the rest of the bike is so messed up.
I will try to follow each wire one more time and make some drawings of it.

AMWts8AvGuwys3gRxx8xquBXbGwZPiv0PhzvPdynJjlJgB55r8AMgNMvLs-XbfoAKrfbsa_uvtlmwAQNyo1acTZINGkHY8mcUthLYA9u8SBTtTUSOyA1KlfUTpiTWDVmlsNT-BzdDtpspd1PxIqf1HYy-ercaA=w1846-h2008-no
 
What number is marked on the Q2? At a glance, that area of the board appears to be a votlage regulator setup, with the big fuse next to Q2 most likely being the very first thing between the power input pin from outside the board to the input of the regulation circuit. It could even be that that fuse is blown--but if it is, you'd want to find out *why* before replacing it (and definitely wouldn't want to bypass it).

Best guess is Q2 and other parts are making a "pass regulator" similar to that used on the Cycle Analyst.

What does the other side of that board look like?

What voltages do you have on each pin of it's input connector?

BTW, I recommend creating a wiring diagram as you test things, noting down where each wire went to and from when you started, and any changes you make as you go along, and any voltages you read at each point in the connnections, so that you can more easily figure out (and remember) what it's all for and how it's hooked up, not just for now, but for later when there is some other problem.

It can be eaiser to use colored lines that match the actual wire colors, so you can more easily visually trace things out. I tend to draw things the way they are actuallly laid out physically, but sometimes this is too visually confusing and a "schematic" style is necessary for some parts.


If you know what voltage the DSPIC requires, you could do a bench test with just that board (not connected to anything else on the system), and see if it powers up with a bench supply of that voltage to whatever solder pads are easiest to connect wires to that go to the VSS and VDD of the DSPIC. I would recommend using a current-limited power supply (Lab PSU) that you can adjust the current down to a few mA before connecting it, because if something is wrong with any part of the circuit powered by this, it could blow up if there is enough current available. If current is extremely limited, to just what the DSPIC should require to operate, then if there's something wrong voltage will just drop (to virtually nothing, probably), without hurting the board or the lab supply.
 
amberwolf said:
What number is marked on the Q2?

N3PF06

Here is how it is wired to the bike:
AMWts8Dz1Af0dOrZpfibex-8YPZuWwfZJbnfGS5D_gA0_Oer_LrhXhFk8Dn5Mx_WE5klI886zm-l9xJ18pb98OXfMynIjsVwp-AokLTl_nIuSmoDQjLLu9-vcmDk4K8qj2TWuukHchtz2gZ-GY_xtsVPMxg63Q=w1307-h980-no


and here is the results of continuity test between B- and +12V when board is disconnected:
AMWts8COvBMvaFeytniofwAWpahcW3ph9F1IlCJcQCgCcMeYcHcsDRVqQVumK9_5rrmIjPW03cpe6Vd2hCyjSAVEfyS3TCdC92292BPivjt5esSQ_E7JOhFROGfr9VPMkLr_URqBTfm3KXxvBNJ0CfTpugiVIA=w1274-h981-no


whats worry me the most is that pins 13 and 20(VDD) has continuity with pins 8 and 19 (VSS) :(

AMWts8DgtFh6HBIxcETBZ9rLbyE5OnwMnch_Cu8nVZEG7_JHCsaKMdbDONKxTQ_CUA8uI5nYxLcBQ_O9JKYJhyRVi4lOAW4FsHvPyyIXrdAZFhNPab0ev7bj6Qsp67VHlVAoQCOHwoe0s4LWWdJZDTU_a-G1nA=w735-h980-no

AMWts8AeTf7lWrb1gx22c8Ru4rQTAchbjVcD-UjSqmfCvPJutDJgSHjx9qkPU61CqoNfUw60jy-MXrkpQvnysVyz-94wW28l_qBifVG5OEzeddeCh_MBdEDFMR2UgqDDSnL6rBsO1EdeMMRZJQb3cK8e2nKOBg=w1307-h980-no



amberwolf what do you think. is this board dead? or you se the chance to make it alive?
 
Back
Top