collin80 / GEVCU

Generalized Electric Vehicle Control Unit
114 stars 56 forks source link

Latch up with canbus #1

Closed collin80 closed 11 years ago

collin80 commented 11 years ago

If the canbus gets disconnected (or starts disconnected) and then later reconnects then the firmware will lock up.

jrickard commented 11 years ago

What does lockup mean? And what do you have to do to recycle it?

If it means it locks up at 100 mph, not good.

Jack Rickard

On Wed, Feb 6, 2013 at 2:40 PM, Collin Kidder notifications@github.comwrote:

If the canbus gets disconnected (or starts disconnected) and then later reconnects then the firmware will lock up.

— Reply to this email directly or view it on GitHubhttps://github.com/collin80/GEVCU/issues/1.

http://www.EVTV.me http://EVTV.me

Electric Vehicle Television - KickinGas - One Car at a Time.

collin80 commented 11 years ago

It means that if the firmware starts up to see no canbus or if canbus gets disconnected the firmware locks up and must be power cycled. Obviously this cannot be. That's why this issue report exists. I'm going to start documenting the problems and when/how they're solved.

Jack Rickard notifications@github.com wrote:

What does lockup mean? And what do you have to do to recycle it?

If it means it locks up at 100 mph, not good.

Jack Rickard

On Wed, Feb 6, 2013 at 2:40 PM, Collin Kidder notifications@github.comwrote:

If the canbus gets disconnected (or starts disconnected) and then later reconnects then the firmware will lock up.

— Reply to this email directly or view it on GitHubhttps://github.com/collin80/GEVCU/issues/1.

http://www.EVTV.me http://EVTV.me

Electric Vehicle Television - KickinGas - One Car at a Time.


Reply to this email directly or view it on GitHub: https://github.com/collin80/GEVCU/issues/1#issuecomment-13204967

Sent from my Android phone with K-9 Mail. Please excuse my brevity.

weisheimer commented 11 years ago

I'm going to keep a monitor on the CAN to see if this is happening. I am getting an occasional "critical_fault" on the DMOC while running and Ed Clausen told me that CAN comms can cause that. I believe that the DMOC showed good CAN comms at the time, but I am not 100% certain of that. Keeping the PIC CAN analyzer online will let capture the sequence and let me see which is happening first...rather the"chicken or the egg" issue...

collin80 commented 11 years ago

Issue has been resolved by a fix to the MCP2515 library. Please update your copy of the library. Also, reopen this issue if it is still happening to you.

jrickard commented 11 years ago

Very cool. I have been having a problem with my TCCH control program in that the Arduino gets a little lost and stops sending. I was starting to suspect the library which should be handling any MCP2515 faults.

Jack

On Thu, Feb 7, 2013 at 8:15 AM, Collin Kidder notifications@github.comwrote:

Issue has been resolved by a fix to the MCP2515 library. Please update your copy of the library.

— Reply to this email directly or view it on GitHubhttps://github.com/collin80/GEVCU/issues/1#issuecomment-13237380.

http://www.EVTV.me http://EVTV.me

Electric Vehicle Television - KickinGas - One Car at a Time.

jrickard commented 11 years ago

We achieved motor spin yesterday Ed. Thanks so much for your help on this.

Yes, it was the two pins.

We are a little bit different in that we actually have a bit of a load on the motor with a generator. I blew up a couple of very large 3-phase rectifiers and I'm not certain why. One was rated for 1800v and 160 amps and it was putting out about 48 amps when it quit.

Well heat sinked too.

In any event, it is not ideal yet, but we got it to spin. The ramp up ramp down was a little erratic/variable. Highest we measured was 2445 rpm.

We did a single 0-5v pot into AD0 and it would kind of turn on at 2.6v and off at 2.9v. But it didn't actually vary the speed of the motor at all.

locking the rpm appeared to work ok.

The DSE worked fine.

NO REVERSE and no idea why. But it would nto turn in reverse.

Jack Rickard

On Sun, Feb 10, 2013 at 7:33 PM, eclausen@comcast.net wrote:

Hi Jack,

Did you get it spinning? I helped Mark today get his going. I had to send him a compiled version of the code to upload because he was having problems with the Arduino IDE.

Ed


From: "Jack Rickard" mjrickard@gmail.com To: eclausen@comcast.net Sent: Sunday, February 10, 2013 11:49:33 AM

Subject: Re: Spinning Yet?

EXCELLENT/EXCELLENT. I'm going to run down to the shop and try it.

Thanks Ed.

I think you and Collin should coordinate a time when you both can come to Cape Girardeau and be on the show with this thing.

I should have cooling and generation and so forth up on the test bench within a week or maybe two.

Jack

On Sun, Feb 10, 2013 at 10:29 AM, eclausen@comcast.net wrote:

Yes. as I said I repro your problem. I disconnected the jumper between 13 an 14 and I get ONLINE for the CAN ComState and DISABLED for the DMOC. The GEVCU program connects and echos back Disable, Standby, Enable. dforward, and then hit space bar to Start Ramp Test.

The PIX.CANStateCommand shows those values changing, but the DMOC stays in DISABLED and no motor movement. Check the ISR2PowerStageState. It will say OFF with the jumper disconnected and READY with the jumper between 13 and 14 connected.


From: "Jack Rickard" mjrickard@gmail.com To: eclausen@comcast.net Sent: Sunday, February 10, 2013 11:13:50 AM

Subject: Re: Spinning Yet?

But would this explain no change on DMOCOperatingSTATE which is always DISABLED for me.

Jack Rickard

On Sun, Feb 10, 2013 at 7:58 AM, eclausen@comcast.net wrote:

Yes if you check the ISR2PowerStageInfo parameter it should indicate EXTERNAL_PS_DISABLE_IS_ACTIVE. When those pins are connected this parameter will say WAITING_FOR_POWER_REQUEST


From: eclausen@comcast.net To: "Jack Rickard" mjrickard@gmail.com Sent: Sunday, February 10, 2013 8:31:05 AM

Subject: Re: Spinning Yet?

Hi Jack,

I rerpo you problem and yes you need pins 13 and 14 tied together. There should be a parameter in ccShell that tells you that is open but I don't know what it is. But connecting those two together should get you going.

Ed


From: "Jack Rickard" mjrickard@gmail.com To: "Ed Clausen" eclausen@comcast.net Sent: Sunday, February 10, 2013 7:13:02 AM Subject: Re: Spinning Yet?

Ed:

It does say ONLINE and DISABLED. WHen I type the characters they are echoed back with full statements D results in "disabled" echod back, S in standby. All the commands echo, but the ccShell remains at ONLINE and DISABLED. I had the 120R in the circuit AND the resistors on the Maccina. Removed the discrete resistor. No change.

I had listed a couple of pins to be looped for an interlock. Do you all do that? I think I disconnected it somewhere along the line for reasons unrecalled. That might be it.

Jack Rickard

On Sat, Feb 9, 2013 at 11:50 PM, Ed Clausen eclausen@comcast.netwrote:

Sorry to hear you had a hard day. I hope you got some relaxation this evening. I am just checking email for going to bed.****


If the ISR2CANComState parameter says ONLINE that has to mean that the Macchina connected on the CAN and the code is running. When you type D does it echo back Disabled and Standby ,etc? If not then it's not connected. I assume you have 120ohm on at least one end of the cable? Collin thought you might need that at both ends. You can enable the termination on the Macchina by the two solder jumpers on the bottom of the circuit board. Its very well marked. I am only using this termination, but I also had it working with 120ohm at the DMOC end.****


Let me know tomorrow and I will see if I can help you more.****


Ed****


From: Jack Rickard [mailto:mjrickard@gmail.com] Sent: Saturday, February 09, 2013 7:56 PM To: eclausen@comcast.net Subject: Re: Spinning Yet?****


I have it all hooked up. I'm in ni ccShell. I've uploaded your .ccs and .par files. All the response challege are set precisely as you instructed.****

I went through this poweron precedure. It did precisely what you said. However it does not accept commands from the program and I can't ever get it to spin. In fact, the DMOC state stays in Disabled through D, S, E, d, everything. It is as if it is not getting the commands.

I've had a hard day. Any ideas.?****


On Sat, Feb 9, 2013 at 4:02 PM, eclausen@comcast.net wrote:****

Yes this is only happening because of the the serial.println commands in the code to get the menu and this is just a debug mode we are operating in. That will totally go away when we have a working program****



From: "Jack Rickard" mjrickard@gmail.com To: *eclausen@comcast.net***

Sent: *Saturday, February 9, 2013 4:59:28 PM***

Subject: Re: Spinning Yet?

Much clearer thank you.

And it is way too much procedure. We need to be able to switch power to the DMOC and the Macchina and have them come up talking with no further action. There is an enable and disable and so forth in the Macchina code. Probably something to do with that .

Jack Rickard****

On Sat, Feb 9, 2013 at 3:54 PM, eclausen@comcast.net wrote:****

Okay sorry about that. The steps I take to get the motor spinning:****


  1. Power on the Macchina - I use the USB connection. You need a terminal program to see the menu for the GEVCU program and that is only output on the USB. The terminal program needs to be connected to the Macchina and you should see the menu****


  2. Power on the DMOC. It will come up in CRITICAl_FAULT. The ISR2CANComState parameter in ccShell will show STANDBY.****


  3. Cycle the power on the Macchina and close and open the serial port in the terminal program. The DMOC ISR2CANComState should change to ONLINE. If it does then you are good to go****


  4. Cycle the power in the DMOC. It should come up in DISABLED and ready to accept commands from the GEVCU program.****


I asked Collin and Mark W to check this procedure. Let me know if you have any questions.****


Ed****


From: "Jack Rickard" mjrickard@gmail.com To: eclausen@comcast.net Sent: Saturday, February 9, 2013 4:39:59 PM Subject: *Re: Spinning Yet?***

Ed:

Please reread what you have written, and perhaps try again. It is incomprehensible.

No. We are not spinning. I just wasted half a day on two 11 inch netgains with the wrong shaft lengths.

Jack****

On Sat, Feb 9, 2013 at 3:22 PM, eclausen@comcast.net wrote:****

Hi Jack,****


Just wondered if you got your Siemens motor spinning yet. I made a post about power sequencing issues, so if you are having issues with the DMOC coming up in CRITICAL_FAULT, you need to check the ISR2CANComState in ccShell. I am finding on my system at least, there seems to be only one specific power sequencing procedure to reliably connect to the DMOC. The ISR2CANComState has to be ONLINE with the Macchina connected. You need to have a terminal program open looking and the debug port (USB connection) on the Macchina. If the ComStat is ONLINE then just power cycling the DMOC should bring it up in DISABLED and you should be able to control the motor with Collin's GEVCU program. You may have to close and open the com port for the debug output for it to work.****


Ed ****

http://www.EVTV.me http://evtv.me/

Electric Vehicle Television - KickinGas - One Car at a Time. ****

http://www.EVTV.me http://evtv.me/

Electric Vehicle Television - KickinGas - One Car at a Time. ****

http://www.EVTV.me http://evtv.me/

Electric Vehicle Television - KickinGas - One Car at a Time. ****

http://www.EVTV.me http://evtv.me/

Electric Vehicle Television - KickinGas - One Car at a Time.

http://www.EVTV.me http://evtv.me/

Electric Vehicle Television - KickinGas - One Car at a Time.

http://www.EVTV.me http://evtv.me/

Electric Vehicle Television - KickinGas - One Car at a Time.

http://www.EVTV.me http://EVTV.me

Electric Vehicle Television - KickinGas - One Car at a Time.