Potentiometer overshoot #1813
Replies: 8 comments
-
Posted at 2019-05-16 by AkosLukacs First, can you check the voltage with a multimeter? Just measure the voltage between gnd and the pin you are reading as you move the joystick? Just to be sure it's not a faulty potentiometer / wiring. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-16 by @gfwilliams I imagine you're using ESP8266 based on your other posts? The ESP8266 ADC only has a voltage input range of 0 to 1v as far as I know, so yes - you'll only be able to read the first 1/3 or so of the potentiometer range if you connect it direct - you need to add another resistor between the pot and 3.3v to act as a potential divider and bring the voltage down. If you don't want to do that then all the official Espruino boards have a full 3.3v range ADC. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-16 by Gustav Alright, what values should i be expecting ? will test this when i get home. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-16 by Gustav Sorry for not naming the board, I use the Official MDBT42Q board |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-16 by AkosLukacs The second pin says "5v", but if you use it with a 3.3v micro, like the MDBT42, you should connect the "5V" pin to 3.3V! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-16 by Gustav Alright, so its output is calibrated on 5v ? and because it reaches 3.3v rather quick, thats a 100% for the microcontroller ? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-16 by @gfwilliams Ahh, thanks! As @AkosLukacs says, the MDBT42Q has 3.3v inputs, so you just need to connect the line that says 5v on your joystick to the 3.3v pin on the MDBT42Q. There's nothing 'smart' on the Joystick board - it really is just potentiometers so will work just fine off whatever voltage you supply. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-05-16 by Gustav Awesome thank you both ! It works like a charm. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-05-16 by Gustav
Hello, im feeling retarded.. but when reading potentiometer(Joystick) values with the code;
It idles at 0.65 ish.
So when moving forward the remote goes quickly to ~1 and the overshoots and start going back. So when full throttle its at 0.76.
It doesnt really matter which potentiometer i plug in they all give me some kind of going over max value and back behavior.
Thanks,
Gustav
Beta Was this translation helpful? Give feedback.
All reactions