Power in Flux
Likes Likes:  0
Page 1 of 5 123 ... LastLast
Results 1 to 10 of 50

Thread: Sevcon CAN Calibrator PC Emulator

              
   
   
  1. #1
    Not to be taken seriously DaveAK's Avatar
    Join Date
    Aug 2010
    Posts
    2,240
    Post Thanks / Like

    Sevcon CAN Calibrator PC Emulator

    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.

    screen1.jpgscreen2.jpgscreen3.jpgscreen4.jpgscreen5.jpg

    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!
    Last edited by DaveAK; 17 June 2011 at 2243.

  2. #2
    Not to be taken seriously DaveAK's Avatar
    Join Date
    Aug 2010
    Posts
    2,240
    Post Thanks / Like
    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.

  3. #3
    Not to be taken seriously DaveAK's Avatar
    Join Date
    Aug 2010
    Posts
    2,240
    Post Thanks / Like
    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.

  4. #4
    Not to be taken seriously DaveAK's Avatar
    Join Date
    Aug 2010
    Posts
    2,240
    Post Thanks / Like
    Expanded program to allow me to view data in realtime:

    emulator.jpg

    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.
    Last edited by DaveAK; 20 June 2011 at 1928.

  5. #5
    Not to be taken seriously DaveAK's Avatar
    Join Date
    Aug 2010
    Posts
    2,240
    Post Thanks / Like
    Slowly picking away at the data stream. I've now isolated controller temperature. Still lots more to do.

  6. #6
    Not to be taken seriously DaveAK's Avatar
    Join Date
    Aug 2010
    Posts
    2,240
    Post Thanks / Like
    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.

  7. #7
    Empulse R #24 frodus's Avatar
    Join Date
    Aug 2010
    Location
    Portland, OR
    Posts
    2,689
    Post Thanks / Like

    My Social Networking

    Follow frodus On Twitter
    cheaper than the curtis programmer....
    Travis

  8. #8
    Not to be taken seriously DaveAK's Avatar
    Join Date
    Aug 2010
    Posts
    2,240
    Post Thanks / Like
    Quote Originally Posted by frodus View Post
    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.

  9. #9
    Empulse R #24 frodus's Avatar
    Join Date
    Aug 2010
    Location
    Portland, OR
    Posts
    2,689
    Post Thanks / Like

    My Social Networking

    Follow frodus On Twitter
    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.
    Travis

  10. #10
    Not to be taken seriously DaveAK's Avatar
    Join Date
    Aug 2010
    Posts
    2,240
    Post Thanks / Like
    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.

Page 1 of 5 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •