PDA

View Full Version : Sevcon CAN Calibrator PC Emulator



DaveAK
17 June 2011, 2240
I've split this out from my CAN Controller thread as it's really a project in its own right. What I've achieved to date is a program that will replace the calibrator for the PowerPak in my bike. It's in a pretty basic beta form right now, but it's fully working and it allows me to do everything that the calibrator does, including making changes to the various controller settings.

The calibrator consists of a 2 line 16 character LCD display and 6 buttons, and these are mimiced in my program as shown in the following screen shots.

13381339134013411342

The exact same functionality of the calibrator is achieved by clicking the appropriate buttons in the program. My next task is to expand the display so that the various menus are displayed in tab format with all their corresponding settings and values displayed in one page. This will allow easier navigation and extra information such as instructions from the manual to be displayed.

One problem that I've run in to is that the calibrator I have only works with the PP784 controller in my bike, it only displays information for the PP745s I have and won't allow for any program changes. I'm on the lookout for a newer calibrator so I can see what the differences are and incorporate it in to my program. Anyone with a Sevcon Calibrator part number 662/14063 let me know!

DaveAK
18 June 2011, 2136
I've been tweaking and tweaking the program and making improvements but it's still not 100% reliable in what it displays. I'm fairly confident that the PC side of things is getting every packet passed to it, and the Arduino is passing every message it gets from the CAN controller, so the CAN controller is most likely where the problem lies. I'm wondering if the Arduino isn't quick enough to retrieve messages from the MCP2515 before the next one arrives and if it gets dropped. I know that if the first RX buffer is full the controller rolls over to the second one. This doesn't happen very often but I know that it does happen. What I don't know is what happens if and when a message comes in and both RX buffers are still full. It should be a rare occurence but I assume it could happen. I think there's some unnecessary code that I can trim out to speed things up a little.

DaveAK
19 June 2011, 2243
The display is about 99% reliable now so I've moved on to analyzing the real time data stream. I've isolated the battery voltage reading, now I just need to decode it. At first I thought it was value/2+11 = voltage, but that doesn't seem to hold true. I've also found that the calibrator doesn't do a good job of displaying the accurate voltage so I've got to decide if the data value is representative of what's displayed or what I can measure. And above about 29V it goes haywire just to add to the fun. I'll run a full test tomorrow by recording and plotting the various data points.

DaveAK
20 June 2011, 1924
Expanded program to allow me to view data in realtime:

1354

From this I've found the following information:

Input pins 2, 3, 4, 5 and 6 all have individual single byte registers, 0 for open, 1 for closed. I was expecting these all to be stuffed in to one byte. Pin 7 is probbaly the same, but it's not configured yet.

When testing the pins I managed to get an LED error message flashing and noticed a 2 byte register that corresponds to this error. Needs further research.

I found the register that holds the total key on time. Consists of four bytes. The first is empty, second is hours, third minutes and fourth seconds in 15 second increments.

That's it for now. I need to get a load attached so I can check the amp readings. Oh, and the best I can get for battery voltage for the moment is

V = 0.59 * data + 8

This might need some refining.

DaveAK
21 June 2011, 1824
Slowly picking away at the data stream. I've now isolated controller temperature. Still lots more to do.

DaveAK
15 August 2011, 0922
Hooked up a 5K pot and isolated a couple more registers. I really need to get hold of the correct programmer so I'm ordering one from Thunderstuck-EV. 14-16 week lead time. :( $358 :( :( This thing had better be hand carved from a solid gold ingot. By pixies.

frodus
15 August 2011, 1006
cheaper than the curtis programmer....

DaveAK
15 August 2011, 1018
cheaper than the curtis programmer....
Yeah, I know it's in the ballpark but the current Sevcon programmer I have, (which I overpaid for and then broke :(), doesn't actually have any logic in it, all it is in effect is 6 buttons and an LCD screen. All the logic is in the controller. So they could have done a real simple CAN interface to a PC, and then it would have just been a case of a software update. I'm really intrigued to see what it is about this new controller that makes it required for the particular model Powerpak I have. I bet it's nothing more than a secret handshake. And that's what has got me bummed about the price, and the long lead time. When I've got it cracked I'll be offloading it on eBay to hopefully recover most of my money.

Still, nobody said this stuff was easy. :)

frodus
15 August 2011, 1101
the curtis PC programmer is just a little isolated RS232 port, nothing that hard.... I made a non isolated one.

Overpriced for both companies it sounds like.

DaveAK
29 August 2011, 1911
I found the correct register for the battery voltage now and also the throttle position (voltage). Need to get it hooked up to my bike so I can get to the current information.

Frank
30 August 2011, 0304
Dave - thanks for doing this. What are your plans once you get this thing further decoded?

DaveAK
30 August 2011, 0948
Dave - thanks for doing this. What are your plans once you get this thing further decoded?
When I've got it to some kind of useful stage I'll probably release it to whoever wants it. Right now the calibrator side of it works perfectly, so it's got some use in replacing the Sevcon calibrator. At least certain models of calibrator/controller - not all of them. I need to improve the interface a little and then I could conceivably release just that part of it. The caveat is that you'll need a bidirectional CAN device that will hook in to the CAN bus. I built my own for that so my program would need to be modified to interpret whatever protocol the CAN device used. Should be straightforward enough though and I could just build a library of the various interfaces out there.

DaveAK
05 September 2011, 1124
Got it hooked up to one of the motors so now I can hopefully get much more information. I've already identifed armature and field amps. The respective voltages are hiding somewhere still.

DaveAK
27 November 2011, 2221
I've just spent a couple of days getting this project in a state where it's worth releasing. Unfortunately the projects I wanted to get done have fallen behind, but at least I've got this one up to date.

If you're interested all the details can be found here - http://www.davescomputerstuff.com/sevcon/sevcon.html, including screen shots and explanations of what I've been able to discover to date. The long and the short of it is that together with a suitable CAN to Serial adapter it's a fully functioning calibrator able to diagnose and program any (I think) Powerpak or Micropak controller.

http://img525.imageshack.us/img525/7765/mainscreenf.png

seanece
27 November 2011, 2353
Well done sir. Very, very impressive work.

Frank
28 November 2011, 0621
Woo Hoo! Another winter project! Very good work - I'm sure I'll have questions once I understand things better. Thanks!

harlan
28 November 2011, 1047
Nice!

Allen_okc
28 November 2011, 1106
thats pretty intense work Dave - good job...

DaveAK
28 November 2011, 1143
If any of you want to try it out you'll need a CAN to Serial interface. You'd need one for any kind of CAN work anyway. I'm going to go ahead an get a GridConnect GC-CAN-USB-LIGHT to test with my program in an attempt to make it more universal than using an Arduino and CAN Shield. The code is already in there for the GridConnect, I just haven't been able to test it.

The added advantage of going the Arduino route is that you can program your Arduino to act on the messages it receives. However, if all you want is to hook up your CAN device to a PC all you'll need is an off the shelf interface such as the GridConnect one.

I should add another page to the web stuff that explains in a little more detail how it works.

Frank
28 November 2011, 1901
Where does one find the GridConnect?

DaveAK
28 November 2011, 2004
Where does one find the GridConnect?
http://www.gridconnect.com/canusblight.html

I just ordered mine today, and it's already shipped. Should have it Wednesday and I can confirm that it works with my program. I'm about to put up some more details on my web site about operation as I can see that I didn't really address that very well.

DaveAK
01 December 2011, 0000
Tested with the GridConnect CAN to USB adapter. Had to make a couple of tweaks but can confirm it works. So now you can use it with a commercially available adapter, (once you've made a cable).

Uploaded a new version of the program to the web site. The code to set the com port in my program is really flaky though. I'm going to have to address that this weekend. Once you've got it set successfully then it will work fine from there on out. Getting it set is the problem though!

DaveAK
22 January 2012, 2029
I received my brand new 622/14063 calibrator last week and I am modifying my program to emulate all the calibrator types that it has available. It doesn't appear that it does anything beyond what my program is already capable of. It has some Toyota and Nissan OEM configurations, but I haven't bothered to check them out as I think the SEV ENG Show All option is the most comprehensive.

If any one wants to buy a barely used calibrator that came straight from the factory let me know. :)

Frank
23 January 2012, 0558
Thanks for the update.

Frank
11 June 2012, 1855
I'm getting ready to jump into this project and have a couple of questions. Re the cable, where do you get the parts? Is there a standard plug available by any chance? Also I'm thinking about Arduino (although I have absolutely no experience with it.) How expensive is the Arduino route? I only want to access my 784 at this point but am thinking it might be a useful tool to understand. I'd appreciate any comments.

thanks

DaveAK
12 June 2012, 1045
To connect to the Powerpak you'll need a six pin Molex Mini Fit Jr. that you can get from most online electronics stores. I use Mouser myself. You'll need to connect the Can Hi, Can Lo and Can GND pins to a standard DB9 if you're using an Ardunio and CAN shield. Check Sparkfun for the latest Arduino and Can shield prices.

Frank
13 June 2012, 0818
I still need help. I couldn't find the part in Mouser (too many choices) so I went to the Molex site to learn more. I'm looking at http://www.molex.com/molex/products/listview.jsp?query=5559&path=cHome%23%23-1%23%23-1~~ncCRIMPHOUSINGS%23%230%23%231v&offset=0&autoNav=1&sType=s&filter=&fs=&channel=Products and know I'm getting close - but - the terminology is confusing me. For example, second part on page 1 is identified as the plug housing. To me that means it holds the male pins. I need a plug to hold the female pins. Am I totally messed up in this? I'm assuming I'll need to buy the corresponding female plug and pins to assemble the part.

Thank you!

DaveAK
13 June 2012, 0844
Try this link http://www.davescomputerstuff.com/sevcon/details.html Tells you everything I know, and also lists the Mouser part number for the Molex connector.

Frank
13 June 2012, 0906
Thanks! Somehow I missed that.

Frank
27 June 2012, 1812
Has anyone else got this working or attempting to make it work? I bought an Arduino and CAN shield and am slowly learning but haven't had success yet.

thanks,
Frank

Frank
01 July 2012, 0605
Update: I was having trouble getting the Sketch to compile with all kinds of red-herring error messages. It turns out that one of the system-level include files was renamed by Arduino for their latest release. Once I stumbled upon this I changed the name in Dave's code and got the program to compile.

I can't get it to run yet though: some kind of comm error which I think is between the Windows emulator and the Arduino. I'm getting a "System.ArgumentNullException: Value cannot be null. Parameter name: PortName" error that I don't understand. I'm playing with comm parameters but what's in Device Manager matches what's in the emulator. Dave, if you see this, do you have any insight?

thanks,
Frank

DaveAK
02 July 2012, 1120
Setting up the Comm Port in the program is very sketchy. I haven't narrowed down what's going wrong, and I haven't put enough error trapping code in the program. Let me take a look at it tonight and see if I can improve it.

When you have the comm port and baud rate set correctly it should show up in the status bar. You should be able to sut down the program and have it recall the settings. Does it do either of these things correctly?

Frank
02 July 2012, 1401
Yes, it shows the settings and I can shut it down and restart.

Sorry, the screenshot isn't clear and I can't see how to delete it, but it's supposed to show COM3, 115,200, 8,none, 1, none.

DaveAK
02 July 2012, 1407
That's Windows 7, right? I've only run it on XP. I'll need to try it on 7 and see what happens. If you have an XP box you can run it on it might be worth a try.

Frank
02 July 2012, 1443
Right you are, I meant to mention that. I don't have any working XP machines unfortunately and everyone else around here uses Macs.

DaveAK
02 July 2012, 1456
OK, well I have a Windows 7 netbook that I can load it on and see what happens. When is it that you get this error?

Frank
02 July 2012, 1556
It happened when I would go into the setup tab to check the comm parameters. Hit "OK" and it throws an error (just checked again and it did it.)

Looking at your Arduino code and was wondering if a work-around would be to simply send an "U" or "D" etc. keypress from a terminal emulator? Maybe this is simplistic, I'm still trying to understand the details.

thanks for your help,

Frank

DaveAK
02 July 2012, 1722
You should be able to operate it from a terminal program. I can't remember off the top of my head but I think you're right in that I send a simple character and this is translated in the Arduino code to send the appropriate CAN message to the controller. The controller will then respond with up to 4 lines of text in separate CAN messages, which then gets displayed on the programmers display.

The menus are heirachial. From the top level press down to get to the individual menus level. Press left or right to navigate these menus. Then press down to move in to a menu. Left and right navigate through the options, and + or - will change the value of an option.

Frank
02 July 2012, 1757
I'll give it a try tomorrow. I think you have to force the value for the type of controller (662/14030 or All Types) inside Arduino (normally comes from the PC) but nothing else jumps out at me.

Frank
03 July 2012, 1653
I gave it a quick try but something's not right. I have to learn more about data types to make sense of the program. It's been a long time since I've programmed in C and I've got CRS!

Arlo
29 May 2014, 2254
Hi all Im looking to get the gridconnect to work with a sevcon gen4 so if anyone has any advice that would be much appreciated.

frodus
30 May 2014, 1334
You have to use the usb ixxat cable for any calibration of the Gen 4 controllers as the dvt software uses the VCI libraries.

If you want to monitor, it's all canopen and I can get you the canopen object dictionary for the sevcon.

Arlo
31 May 2014, 0006
You have to use the usb ixxat cable for any calibration of the Gen 4 controllers as the dvt software uses the VCI libraries.

If you want to monitor, it's all canopen and I can get you the canopen object dictionary for the sevcon.

The ixxat adapter is discontinued and the new one requires a new DVT software which requires a licence to be purchased.

frodus
31 May 2014, 0013
This is true. Unless you find one on eBay.... I found one or two on there before.

Arlo
31 May 2014, 0643
What about using the ixxat driver?
Or is there a way to hack the DVT software or hack the gridconnect adapter to make it work?

frodus
31 May 2014, 2055
I have no clue. Both Curtis and sevcon have made it harder to mess with things.

Wonder how much dvt software costs now.

skl-service
20 September 2016, 0919
Hi Dave,
From where I can download PC emulator for SEVCON controllers?
Best regards,
Stefan Lyamov

frodus
20 September 2016, 1013
What software are you looking for? DVT?

Also, what version of IXXAT cable do you have?

skl-service
20 September 2016, 1134
Hello Travis,

I must to test controller SEVCON SEM PP745 separate from lift machine JLG3369. I saw that DVT is software that have more options than I need, but do you have it? As CAN converter I think to use KVASER Memorator Profesional HS/HS.

Thank you in advance!

Best regards,
Stefan Lyamov

frodus
20 September 2016, 1448
Kvaser won't work with DVT. It has to be IXXAT.

Also, I'm not sure if DVT will even work with the SEM. I've only used it on their Gen4 controllers.

Have you reached out to your local Sevcon distributor for the programming kit?