Pooh said:
John Popelish wrote:
I fully appreciate the above which you have explained excellently.
It seems however that certain ppl are mistakenly associating a change in battery
voltage with a direct relationship to motor rpm - which there *isn't*.
The O.P. has stated that his electrical system voltage rises as engine
RPM rises. I take him at his word, on this. This does not imply
proportionality, only variation in a particular direction.
You are being a bit too literal.
(snip)
So where did the 7805 ever come into the equation ? I got the impression that the
sensor's input was 5V.
The O.P copied a commercial circuit that has a microprocessor powered
from a 5 volt regulator, and so, has an A/D converter that uses the 5
volt regulated voltage as its A/D reference voltage. It is the
mismatch between the pot supply and the A/D supply that is causing
trouble, in my opinion.
I guessed that much, from your posts as much as anything. The 'uncertainty' about the
output voltage would clearly seem to be a result of the mechnical input not being
precise.
There will certainly be some of that, but it doesn't explain the wrong
gear position indicator flashing when the engine is revved up.
Once again I thought it was driven from 5V. Why mention a 7805 otherwise ? Of course
the OP seemed to be terminally incapable of describing his setup accurately.
That may be a big part of his problem. He really doesn't understand
the workings of the key pieces of his puzzle (the pot and the way it
is powered, and the A/D converter and how it is powered and
referenced). Rather than give him a complete course, we have sort of
been hanging around, discussing various details, waiting for the
various lights to come on in his mind, so he will either figure some
of it out, or ask useful questions. There are no answers so useless
as the answers to unasked questions. We have to be patient and wait
for the questions to be asked, if we are to have any hope that the
answers will not be misunderstood, or worse, ignored. We have lots of
understanding and answers that the O.P. may not be ready to hear, yet.
He just wants to get this thing finished and working, so he can ride.
I am interested in his electronics education, and know that
frustration and desire are good motivators for learning. If we had
redesigned his circuit immediately on his first post, so he could have
built a perfectly working unit, without understanding anything, he
would be doing something else, now, instead of building up all this
new understanding. So far, we have bumped into voltage dividers, A/D
converters, microprocessor programming, regulators and the electrical
systems on motorcycles. How much better is that than just having a
shift indicator that merely works, perfectly? I am willing to bet
that his new knowledge will change his life for the better more than
the shift indicator, eventually will.
Why are you taking part in this discussion? That is not sarcasm, but
a sincere question.