Speedo out to drive DC motor

A forum for discussing applications and implementations of the MegaShift transmission controller code for the GPIO from B&G. This can control up to 8-speeds and 6 shift solenoids (plus a 16x9 table for controlling a PWM line pressure valve). It has manual and fully automatic modes (16x9 load x speed table), with under and over rev-limit protection, and full data logging of all inputs and outputs (among many other abilities). A TransStim to test your completed board is also available.
tobmag
Posts: 206
Joined: Mon Jan 02, 2012 4:22 am

Re: Speedo out to drive DC motor

Post by tobmag »

Lance.

Any update on this?

BR//Tobmag
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Speedo out to drive DC motor

Post by Bernard Fife »

Tobmag,

I don't see anything problems in the code, in your INI, or on my scope that shows the speedo out signal doing anything it shouldn't.

That doesn't mean you aren't having a problem, of course. The speedo output in the 2.1xx code was meant to be a frequency signal, not a PWM driver; so I'm actually a bit surprised it works at all. If this was mine, I would instead use 4.1xx code and configure the speedo output as a 'spare port 0' (aka. "sp0"), and then set the PWM to see if you can get it to match the correct speed. I would set it up as:
PWM Mode, with
- PWM Active: always on,
- PWM Index: Speed

Then I would use the table to set the PWM percentage at each speedo to drive the DC motor just how you like it. You likely will have to experiment with the PWM frequency to get the motor to work smoothly and consistently across it range.

There's more here: http://www.msgpio.com/manuals/mshift/spareport.html

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Speedo out to drive DC motor

Post by Bernard Fife »

Whoops, I didn't see this:
I Have been doing some testing and it does actually work to drive a DC motor connect to the mechanical speedo. Running SP1 in PWM mode.
I will look again at this.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Speedo out to drive DC motor

Post by Bernard Fife »

tobmag,

I don't see anything wrong in the SP1 code that would cause a problem. Have you tried different frequencies for PWM on SP1 to see if that helps? Make sure that the spare port is set to be 'always on' too.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Speedo out to drive DC motor

Post by Bernard Fife »

tobmag,

There was one small thing I found, and I don't believe it will affect your issue, but I have fixed it and compiled it into the test code that is attached (it has the same signature as 2.202):
Monitor_2202_testcode.abs.s19
TEST CODE ONLY - NOT A RELEASE CODE
(75.11 KiB) Downloaded 753 times
If you give it a try, it might eliminate one possible cause of your trouble. I haven't tested this change at all yet.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
tobmag
Posts: 206
Joined: Mon Jan 02, 2012 4:22 am

Re: Speedo out to drive DC motor

Post by tobmag »

Thanks Lance
Have you tried different frequencies for PWM on SP1 to see if that helps? Make sure that the spare port is set to be 'always on' too.
Yes I have tried but I cant see any changes in the frequence even though changing it, I do have a good quality instrumet but the Hz is actaully variable with the pwm signal but also jumping around quite a lot.
I'll see if I can shoot a video when measuring for you to see.

Did you check my setting for SP1 in my msq so there is nothing wrong there?

I'll have a try during the weekend


BR//Tobmag
tobmag
Posts: 206
Joined: Mon Jan 02, 2012 4:22 am

Re: Speedo out to drive DC motor

Post by tobmag »

Ok the I have done some testing.

Downloaded the s19 file and also the latest .ini

No changes.

PWM signal still cuts when changing gear

Can't get voltage below 3.5v even though everything is at zero speed and zero PWM percentage.
I also checked the frequency during a full sweep of the PWM%
At zero PWM% I have 4Khz and at 100% I have about 250hz.

I did also test the speedo out and that one is working as it should, stays at 5V and just changing frequence

Attached my current .msq

BR//Tobmag
Attachments
CurrentTune.msq
(38.66 KiB) Downloaded 917 times
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Speedo out to drive DC motor

Post by Bernard Fife »

tobamg,

Your settings look appropriate for what you are trying to do.

I need to confirm that the code is doing the correct things at all times with those settings, and I am looking at this now (it's a laborious and tedious process).

Voltages, and even frequency measurements, aren't much use, oscilloscope screen shots tell the real story. I will be checking these on my bench after looking through the code.

Have you tried other periods (i.e. frequencies) for the PWM?

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
tobmag
Posts: 206
Joined: Mon Jan 02, 2012 4:22 am

Re: Speedo out to drive DC motor

Post by tobmag »

Hi Lance
Have you tried other periods (i.e. frequencies) for the PWM?
Yes I have tried that as well but the problems are the same, didnt check if the frequncey changed though
I did hear that the hissing noice changed note, not that scientific though :-)

I'll see if I can borrow a scope

BR//Tobmag
Bernard Fife
Posts: 1696
Joined: Fri Apr 04, 2008 1:28 pm

Re: Speedo out to drive DC motor

Post by Bernard Fife »

tobmag,

I haven't found anything fundamentally wrong with the code yet, but have clarified a few things and these might correct your issue. I'll post modified code for you to try:
2203_test_code_Monitor.abs.s19
Let me know how it works for you.

Lance.
"Never wrestle with pigs. You both get dirty and the pig likes it." - George Bernard Shaw
Post Reply