Micro Joysticks In Place Of Dial On Servo Testers

Ya’akov

Joined Jan 27, 2019
9,070
Welcome to AAC.

Those thumbsticks use momentary switches, the tester uses a potentiometer, so it couldn't be done in any sensible way.
What problem were you hoping to solve by doing it?
 

Thread Starter

DragonTheta

Joined Feb 6, 2022
89
Thanks

I want to control brushless motors with electronic speed controllers. I plan to use a micro joystick to control a servo tester in order to send a variable PWM signal to the ESC in order to control the speed of the motor.

I also found these

https://www.amazon.com/dp/B01M5L1BM...t_i_ZR1SQJ9YZZEGPCCC5PBZ?_encoding=UTF8&psc=1

https://www.adafruit.com/product/27...C9_FIkMFSmkrvV87XEehrLN9WyJXMBOhoCsOIQAvD_BwE


https://www.adafruit.com/product/512


I'm really looking for a single-axis micro joystick that stays in the position to where it's moved and doesn't return to center by itself
 

Ya’akov

Joined Jan 27, 2019
9,070
Thanks

I want to control brushless motors with electronic speed controllers. I plan to use a micro joystick to control a servo tester in order to send a variable PWM signal to the ESC in order to control the speed of the motor.

I also found these

https://www.amazon.com/dp/B01M5L1BM...t_i_ZR1SQJ9YZZEGPCCC5PBZ?_encoding=UTF8&psc=1

https://www.adafruit.com/product/27...C9_FIkMFSmkrvV87XEehrLN9WyJXMBOhoCsOIQAvD_BwE


https://www.adafruit.com/product/512


I'm really looking for a single-axis micro joystick that stays in the position to where it's moved and doesn't return to center by itself
All of those are also switches, not potentiometers.

The right thing to do at this point is bite the bullet and plan to use an MCU, like an Arduino to both generate the PWM signal and read the UI to adjust it. It not a terribly hard project, even if you are a neophyte.

Your current plan is a kind of false economy of effort. It looks easy, almost ready made—just swap out a knob—but it's not, and you will have little control over the result once you've duct taped and superglued your "solution".

A small board, like the Arduino Nano, a few wires, and a bit of code and you'll have something you can make behave exactly the way you want. You might even find it useful for other control functions in the project.

You can get plenty of help with it here. Lots of knowledgable, willing, and mostly patient helpers around.

Good luck.
 

Alec_t

Joined Sep 17, 2013
14,280
I plan to use a micro joystick to control a servo tester in order to send a variable PWM signal to the ESC in order to control the speed of the motor.
Are you aware that the normal servo tester ony generates a pulse width in the 1-2ms range at a frequency in the 20-50Hz range? That's unsuitable for a speed controller.
 

MisterBill2

Joined Jan 23, 2018
18,176
Those testers linked in post#1 are for testing RC style position servos, and so they deliver a signal similar to the one from an RC receiver. That signal will not be suitable for the analog input of an Electronic Speed Control driver, unless it is designed to accept such a signal.
AND the small joysticks in the listing are described as analog, and as it looks like three terminals they are quite possibly potentiometers. They look like pots in the picture, and do have centering adjustments.
So they might possibly function in the servo tester boxes. However the setting resolution will be very poor. Consider that the output will vary from zero to max with a very small movement of that lever.
Also, we have no hint about what sort of control signal the ESC drivers for the brushless motors require.
For an application that requires the position of a control to be held, slide-pots, (linear potentiometers) makes a lot more sense.
UNLESS the ESC devices for the brushless motors are designed for RC applications. The control signal required has not been mentioned.
 

KeithWalker

Joined Jul 10, 2017
3,063
A servo tester like the ones being discussed will work with a R/C brushless motor controller but it would be difficult to replace the potentiometer with a micro joystick. The small movement of the joystick would make it difficult to control the speed of the motor with any accuracy.
It would be simpler and much more effective to turn the servo tester on edge and replace the knob on with a lever or use a similar arrangement using an Arduino, There are examples online giving details of how to control a servo with a potentiometer. MisterBill2's suggestion of using a linear pot is an excellent one.It would give lots of control and would be easy to use,
 

Ya’akov

Joined Jan 27, 2019
9,070
Those testers linked in post#1 are for testing RC style position servos, and so they deliver a signal similar to the one from an RC receiver. That signal will not be suitable for the analog input of an Electronic Speed Control driver, unless it is designed to accept such a signal.
AND the small joysticks in the listing are described as analog, and as it looks like three terminals they are quite possibly potentiometers. They look like pots in the picture, and do have centering adjustments.
So they might possibly function in the servo tester boxes. However the setting resolution will be very poor. Consider that the output will vary from zero to max with a very small movement of that lever.
Also, we have no hint about what sort of control signal the ESC drivers for the brushless motors require.
For an application that requires the position of a control to be held, slide-pots, (linear potentiometers) makes a lot more sense.
UNLESS the ESC devices for the brushless motors are designed for RC applications. The control signal required has not been mentioned.
Hey Bill. Those joysticks use 6mm tactile switches, and aren't really analog in their output. They take 5V in, and return high/low on two pins. This is one of the listings, you can see the switch on the PCB.

1644245193569.png
But there are joysticks of the same form factor, used as the other stick on a PS/2 controller that are genuine analog devices, with potentiometers. Here is a set intended to be used together. You can see the one on the right is using pots, not switches. Still, the real solution for the TS is a small MCU board and the control of his choice.

joysticks.png
[EDIT: See my retraction in #11, I was just plain wrong. Sorry.]
 
Last edited:

MisterBill2

Joined Jan 23, 2018
18,176
OK, I looked at the stik with the pots.
And still, the required signal for the motor controller is unknown, and so the best choice is also unknown. I try to avoid computers of any size when direct control will work.
 

KeithWalker

Joined Jul 10, 2017
3,063
The analog sticks do have potentiomenters on them but I doubt whether they have the same resistance values as the on in the servo controller. if it worked at all, It would probably not give the correct range of control.
 

Ya’akov

Joined Jan 27, 2019
9,070
OK, I looked at the stik with the pots.
And still, the required signal for the motor controller is unknown, and so the best choice is also unknown. I try to avoid computers of any size when direct control will work.
Input to the MCU would be direct control if it is also the PWM generator. If could be analog or digital input, but I have the idea the TS wants an analog adjustment for the UI.
 

Ya’akov

Joined Jan 27, 2019
9,070
Hey Bill. Those joysticks use 6mm tactile switches, and aren't really analog in their output. They take 5V in, and return high/low on two pins. This is one of the listings, you can see the switch on the PCB.

But there are joysticks of the same form factor, used as the other stick on a PS/2 controller that are genuine analog devices, with potentiometers. Here is a set intended to be used together. You can see the one on the right is using pots, not switches. Still, the real solution for the TS is a small MCU board and the control of his choice.

You know what. I am wrong about this.

The tactile switch is stick down, the bottom image is rotated. I mistook the stick as the sort that using discrete directions. I couldn't find a schematic showing the control in a PS/2 controller when I looked, so I leapt to the wrong conclusion.

Nonetheless, the second half of my comment stands, the MCU is the way to do it.
 

KeithWalker

Joined Jul 10, 2017
3,063
OK, I looked at the stik with the pots.
And still, the required signal for the motor controller is unknown, and so the best choice is also unknown. I try to avoid computers of any size when direct control will work.
A controller could be made using a couple of 555s to give pulses at 18mS intervals with a mark/space ratio that varied the pulse length from 1 to 2mS in length. That is all that is needed to interface to the motor controller.
 

Ya’akov

Joined Jan 27, 2019
9,070
A controller could be made using a couple of 555s to give pulses at 18mS intervals with a mark/space ratio that varied the pulse length from 1 to 2mS in length. That is all that is needed to interface to the motor controller.
The advantage of the MCU is that modifications will be in software. That means adding features won't require re-eingineering. And for device like this, the MCU is simple and very effective. So it feels to me avoiding the MCU is overcomplicating things.
 

KeithWalker

Joined Jul 10, 2017
3,063
The advantage of the MCU is that modifications will be in software. That means adding features won't require re-eingineering. And for device like this, the MCU is simple and very effective. So it feels to me avoiding the MCU is overcomplicating things.
Yes, I agree with you Yaakov. The only hardware that is needed to do the job is a ATTINY85 and a potentiometer.
 

Thread Starter

DragonTheta

Joined Feb 6, 2022
89
Thank you

I really appreciate it


"the small joysticks in the listing are described as analog, and as it looks like three terminals they are quite possibly potentiometers. They look like pots in the picture, and do have centering adjustments.
So they might possibly function in the servo tester boxes. "

From reading through the thread, it sounded like there is agreement that one or more of the micro joysticks or alternatively, a slide potentiometer, would function as a way to control the servo testers. Is that correct

"However the setting resolution will be very poor."

For the project I am doing, the sensitivity is in the range I'm looking for. A slide potentiometer with a travel distance of about an inch or less would also be in that range.

"Input to the MCU would be direct control if it is also the PWM generator."

I don't understand

"It would be simpler and much more effective to turn the servo tester on edge and replace the knob on with a lever"

For this project, the signal generation control device needs to be roughly an inch by an inch by an inch and any smaller than that means more choices with the build

"A controller could be made using a couple of 555s to give pulses at 18mS intervals with a mark/space ratio that varied the pulse length from 1 to 2mS in length. That is all that is needed to interface to the motor controller."

What are 555s

"I try to avoid computers of any size when direct control will work."

After an unexpected hazardous situation with a computer-based project, and with the way outcomes sometimes change in unforeseen ways when computers are used, this is exactly how I approach the build I've started, especially because it's extremely safety critical.

"The analog sticks do have potentiomenters on them but I doubt whether they have the same resistance values as the on in the servo controller. if it worked at all, It would probably not give the correct range of control."

Is this the problem that would be solved by the 555s with the pulses at 18ms

"The advantage of the MCU is that modifications will be in software. That means adding features won't require re-eingineering. And for device like this, the MCU is simple and very effective. So it feels to me avoiding the MCU is overcomplicating things."

To me, quality of life benefits with configuration are helpful in order to streamline the design. Using a small chip in this design is among the set of acceptable outcomes. However, with this project having a highly extreme requirement for safety or as I call it security and for reliability, I put security and reliability as what determines the build. That makes for using the simplest design that's possible, up to the point of any problems that come about because of the simplicity, which would make the project less simple.

"The only hardware that is needed to do the job is a ATTINY85 and a potentiometer."

What does the ATTINY85 do

Thank you everyone for the massive amount of help.

It sounded like the question of signal type got sorted out, but if it's relevant, the ESCs are for UAVs and they are 4 in 1 boards.

Priorities for this project are

1. Simplicity. Specifically hardwired, direct connections
2. User interface device within small enough size limit - about one inch by one inch by one inch
3. Preferred user interface device form factor - First: Micro joystick that holds its position - Second: Micro joystick that returns to center - Third: Slide potentiometer - Fourth: Modifying a knob by attaching a lever and operating it from the side
 

Ya’akov

Joined Jan 27, 2019
9,070
The ATTINY85 is a low power 8-bit 8-pin MCU that includes analog and digital I/O and can be programmed using, among other things, the very accessible Arduino IDE. If you run it at 5V you can set the clock to as high as 20MHz, so it is very capable of responsive operation for using interfaces.
1644257674760.png
It is a very small package that would only need a few passives and the program to solve your problem. The linked datasheet might be intimidating but in practice the tools you need are very accessible, and the ATTINY85 chips will cost you about $2.50 each. The programmer needed is not much more than that.

I Really believe this is the "safest" option. If you are comparing it to buying unknown quality low end parts and bodging them together, this is hands down more controllable and repeatable. It can even have programmatic safety feature to shut things down when they are out of limits.
 

KeithWalker

Joined Jul 10, 2017
3,063
A programmer of some kind is required to program the ATTINY85. I use one made from an Arduino nano and boot and program it with the Arduino IDE.
Using a ATTINY85 microcontroller also has the advantage that any potentiometer value from 5K to 100K can be used.Nano_ISP.jpgIDE INTERFACE.jpgIDE INTERFACE.jpg
 
Last edited:

Thread Starter

DragonTheta

Joined Feb 6, 2022
89
I agree that it is very logical to expect to have better results with a small industrial quality chip than with a product of recreational quality.

As far as the price of the build, there will be multiple user interface control devices along with multiple speed controllers. Would it be necessary to use an Arduino or other solution for each 4 in 1 ESC, for each motor, or only one to program all of the chips

If the answer is that it's only one for all of the chips, is it plausible that an issue with the Arduino or other solution could cause an issue with all of the chips that it programs, and lead them all to fail at the same moment

In this build, it is acceptable for one or even a couple or perhaps a few of the chips to fail, but it would almost certainly cause a massive and catastrophic problem for someone if they fail all at once.
 
Top