Speedo out to drive DC motor
Re: Speedo out to drive DC motor
Any update on this?
BR//Tobmag
-
- Posts: 1696
- Joined: Fri Apr 04, 2008 1:28 pm
Re: Speedo out to drive DC motor
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.
-
- Posts: 1696
- Joined: Fri Apr 04, 2008 1:28 pm
Re: Speedo out to drive DC motor
I will look again at 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.
Lance.
-
- Posts: 1696
- Joined: Fri Apr 04, 2008 1:28 pm
Re: Speedo out to drive DC motor
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.
-
- Posts: 1696
- Joined: Fri Apr 04, 2008 1:28 pm
Re: Speedo out to drive DC motor
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):
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.
Re: Speedo out to drive DC motor
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.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.
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
Re: Speedo out to drive DC motor
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 918 times
-
- Posts: 1696
- Joined: Fri Apr 04, 2008 1:28 pm
Re: Speedo out to drive DC motor
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.
Re: Speedo out to drive DC motor
Yes I have tried that as well but the problems are the same, didnt check if the frequncey changed thoughHave you tried other periods (i.e. frequencies) for the PWM?
I did hear that the hissing noice changed note, not that scientific though

I'll see if I can borrow a scope
BR//Tobmag
-
- Posts: 1696
- Joined: Fri Apr 04, 2008 1:28 pm
Re: Speedo out to drive DC motor
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:
Let me know how it works for you.
Lance.