Page 4 of 7

Re: Speedo out to drive DC motor

Posted: Sun Dec 23, 2012 12:03 pm
by tobmag
Hi Lance.

Downloaded and tested, still the same, signal drops at gear change but now it actually got worse since I cant get voltage below 6v now!

Did a quick test and set up SP2 for pwm and temperature as index, same there cant get below 6v and signal also drop there when changing gear!

Lower the load to abot 30kPa so the pressure reduction at gearshifting was disabled but it stilled dropped signal when changing gear.

Dont know if you remember but I manage to friye GP15 so controller thinks "down button" is always pressed, dont know if this will effect the SP ports?


BR//Tobmag

Re: Speedo out to drive DC motor

Posted: Sun Dec 23, 2012 12:21 pm
by Bernard Fife
Tobmag,

I will keep looking. The gpi5 issue won't affect the code, and it shouldn't affect the spare port hardware, but it's not impossible that it could create issues. I'll keep looking at the code, there is likely something simple staring me in the face, and I just need to keep looking until I fnd it.

Lance.

Re: Speedo out to drive DC motor

Posted: Sun Dec 23, 2012 2:05 pm
by Bernard Fife
tobmag,

Here's some test code:
2202_test_code_Monitor.abs.s19
It has a small fix to a copy 'n paste typo in the sp1/sp2 timer section, and has a counter added to the PWM loop for sp1. The counter is in place of the VSS errors in a datalog. If the counter continues to count up during a shift, then the code is functioning as it should, and we need to look at other causes.

Give it a try and let me know what you find.

Lance.

Re: Speedo out to drive DC motor

Posted: Mon Dec 24, 2012 12:41 am
by tobmag
Lance.

I'll give it a try as soon as Santa has done his job here....have two 7year old ones waiting (not so) patiently

Merry Christmas to all of you.

BR//Tobmag

Re: Speedo out to drive DC motor

Posted: Wed Dec 26, 2012 11:25 am
by tobmag
Lance.

Tested code but unfortunatly no difference, still all the same.

Attached a log for you if of any use.

BR//Tobmag

Re: Speedo out to drive DC motor

Posted: Wed Dec 26, 2012 1:28 pm
by Bernard Fife
Tobmag,

The counter in your log ("dbug") continues to count up until it rolls over (as it should), so the issue is not with the code. It looks like you'll have to scope the device for us to figure out what is going on.

However, I don't recall seeing a shift in the log, and I suspect you need to shift to get the behavior you are reporting, in which case you might want to post a log that includes a shift. <edit>Now I see that your log does include several shifts, so you'll need an oscilloscope.</edit>

Lance.

Re: Speedo out to drive DC motor

Posted: Thu Dec 27, 2012 12:20 am
by tobmag
Hi Lance.

I hope you had a nice Christmas.

I was starting to think that there might be a hardware issue....
Can you please tell me what you want me to measure, I can borrow a 2ch scope but its an old analog model but possible to take photos of the screen and post

As I see it I have the following issues on SP1/2:

> Loosing SP1/2 signal when shifting gear independantly of PWM index
> Lowest PWM% gives me 6v (was 3,5 before!!)
> Frequency shanges with pulsewidth from 0Hz to 6kHz (PWM 0 % - 100%)
> No changes in frequence when altering PWM period


My first question would be if all these things has anything in common that can create this?
(Perhaps I should start by verifying the TranStim?)
OR did I burn the processor more then I thought when the +12v lead hitted the board?
Everything is cleaned properly with a tooth brush and isopropanol
I will go thrue the build manual again and verify that everything is in its correct place and direction.

BR//Tobmag

Re: Speedo out to drive DC motor

Posted: Thu Dec 27, 2012 10:08 am
by Bernard Fife
Tobmag,

The possibilities are endless. As I have said, your answer is best found in an oscilloscope trace.

Lance.

Re: Speedo out to drive DC motor

Posted: Thu Dec 27, 2012 1:51 pm
by tobmag
final question before I start testing with the scope.

SP1/2 are also possible to have as on/off function under "user spare port"?
I tried that as well but I'm still getting an PWM signal out...

So actually I'm thinking that my CPU is not what it should be....dont know if its worth the time to try to find out whats going on or just ditch this function.

Everything else seems to work including speedo out so I can actually take that signal and convert to PWM.

Am I'm the first one to try the PWM on Sp1/2, anyone out there having this working??

BR//Tobmag

Re: Speedo out to drive DC motor

Posted: Thu Dec 27, 2012 3:36 pm
by Bernard Fife
tobmag,

It works for me. You can try the following code:
Test_code_2202_Monitor.abs.s19
This code is the same as 2.202, except that the variable 'dbug' only increments during a shift if the spare port is set to 'PWM - always ON'. If that variable counts up during shifts when you view it in megalogviewer or a spreadsheet, then I suspect you will need to look more closely at the hardware (either the board, or the motor you are trying to drive).

Lance.