Page 2 of 7
Re: Speedo out to drive DC motor
Posted: Tue Dec 04, 2012 6:24 am
by tobmag
Tobmag, the current code is 100% documented. If I get run over by a bus, when the cheering stops users will have access to complete descriptions of all the parameters available on the web and in TunerStudio. This is entirely unlike some efforts, whee the documentation lags months or years behind code releases.
Lance.
Thanks for your reply, this makes me feel much calmer.
Actually it was me and not tmoble playing with the SP1 in PWM mode to run an DC motor for the speedo.
I will attach a log and my .msq when I'm back home
Many thanks Lance
Re: Speedo out to drive DC motor
Posted: Tue Dec 04, 2012 12:09 pm
by tobmag
Heres a log and my msq.
BR//Tobmag
Re: Speedo out to drive DC motor
Posted: Thu Dec 06, 2012 7:57 am
by Bernard Fife
tobmag,
Thanks, I will have a look. I need to dig into the code on a couple of other fronts, so I will have a look at this too. It should only take a few days at most.
Lance.
Re: Speedo out to drive DC motor
Posted: Thu Dec 06, 2012 11:08 am
by tobmag
Well we just got about 40cm of snow so I'm in no hurry really
Also looking at a really nice set of VDO gauges, speedo and tach so I might ditch the DC motor but would anyway be good to have this sorted.
Was thinking of another application that could be fun on a "racing car" that would be a speed sensetive PAS, quite simple to put in a PWM valve between the pump and steering rack. Dont really want to have any glitch in the signal there....
Just for my own understanding, I was looking at the log my self and couldnt see any drops in the pwm signal while shifting gear but the motor is reacting heavily.
(If I now was looking at the right output?)
I assume that what we see is just a calculation of what the ECU is about to send out, its not really any measurement?
If this is so in reallity we only se a calculation of an output rather then the actual value?
BR//Tobmag
Re: Speedo out to drive DC motor
Posted: Thu Dec 06, 2012 11:27 am
by Bernard Fife
I assume that what we see is just a calculation of what the ECU is about to send out, its not really any measurement?
tobmag,
That's right, the reported value is calculated. It doesn't make a lot of sense to use up an input to monitor an output channel (otherwise we would be cutting the useful I/O in half, and these are already scarce and precious).
The PWM percentage is supposed to be calculated whenever the commanded PWM for the output changes, but there are one or two ways in which this calculation can fail to happen in the code, and I will make sure those are fixed.
Lance.
Re: Speedo out to drive DC motor
Posted: Thu Dec 06, 2012 1:13 pm
by tobmag
Lance.
That's right, the reported value is calculated. It doesn't make a lot of sense to use up an input to monitor an output channel (otherwise we would be cutting the useful I/O in half, and these are already scarce and precious).
Yes I fully agree but this is just to highlite that what you see in a log might not be the reality, I used to work as a technical trainer for construction equipment and they also have quite a few ECU today and same thing there, diagnostic tools that we used is only showing a calculation not any actuals...
I did some more testing since I was thinking that maybe the small DC motor somehow was disturbing the electronics so I hooked up a normal lightbulb instead.
What I can see is that I cant get any voltage lower then about 3,5V so it jumps from zero to there...
Voltage is very irratic and will jump all over the place making it almost impossible to get a good reading, it will however get better after about 7-8volts.
Frequence, I understood that this would be set by PWM Period under "spare port PWM set up" and frequnce is then fixed and then the pulsewidth will be 0-100%?
Now when starting at about 3,5V I have about 4kH and at 10V I have about 1,5kH
There is no difference when changing PWM period.
The above apply for both DC motor and lightbulb.
BR//Tobmag
Re: Speedo out to drive DC motor
Posted: Thu Dec 06, 2012 1:41 pm
by Bernard Fife
Tobmag,
A voltmeter isn't very useful for measuring the proper operation of PWM, you really need to look at traces on a oscilloscope. I will do that shortly.
Lance.
Re: Speedo out to drive DC motor
Posted: Thu Dec 06, 2012 11:55 pm
by tobmag
Could be but usually you are able to measure the voltage over the load from a PWM driver
Dont have any oscilloscope (at home) so I'll wait for your findings
BR//Tobmag
Re: Speedo out to drive DC motor
Posted: Fri Dec 07, 2012 7:31 am
by Bernard Fife
Tobmag,
Yes, you can certainly measure the voltage. But interpreting that measrement is full of pitfalls, and maybe tell you more about your voltmeter than about the signal or the loads.
Lance.
Re: Speedo out to drive DC motor
Posted: Fri Dec 07, 2012 12:45 pm
by tobmag
tell you more about your voltmeter than about the signal or the loads.
Thats right, now thinking back what we did during the training sessions was not to measure the voltage ......we measured the pressure from the pwm valves.
Well been a bout 10 years now since I swapped job....
I think an old analog voltmeter would be better than a digital unless you have a USD1000 Fluke...
BR//Tobmag