Maker Pro
Maker Pro

How to use a double slide to control vibrating motors?

Nine

Nov 18, 2014
6
Joined
Nov 18, 2014
Messages
6
Hi, I want to make a system with five groups of 5 vibrating motors. These groups should be controlled by using a slide. The silde bar should be divided by the 5 different groups. If I use two slides, the groups between the slides need to be turned on.
I attached a file with a little sketch.

I have absolutely no experience with this, can anybody help me?IMAG0725.jpg
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,728
Joined
Nov 17, 2011
Messages
13,728
Welcome to our forum.

We need a bit more information. are these analog slides (potentiometers) or slide switches?
 

Nine

Nov 18, 2014
6
Joined
Nov 18, 2014
Messages
6
Hi,

I have not decided jet, I don't know which one would work in this system.
 

Nine

Nov 18, 2014
6
Joined
Nov 18, 2014
Messages
6
I suppose the potentiometer will be most convenient.
 

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Either would work, but does a 5 position slide switch actually exist?

If it does exist you could do it with logic, possibly even just diodes.

If it is a potentiometer you will need and ADC.

A suitable microcontroller could handle either very simply.

Bob
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,728
Joined
Nov 17, 2011
Messages
13,728
This is a 5 position selector switch.

Regardless of whether you will be using a switch or a potentiometer, you will hardly find one component that has the two knobs in line. You would have to position the two switches or potentiometers side by side.

May I suggest as an alternative a set of 5 pushbuttons arranged in line? These pushbuttons can easily be read by 5 ports of a simple microcontroller (e.g. an arduino if you don't want to build your own). You could put an LED next to each pushbutton or use pushbuttons with integrated LEDs. These LEDs would be controled by 5 outputs of the controller to indicate which 2 buttons are actually the ones seting the range.

If no button is pressed, the state of the outputs doesn't change.
When a button is pressed, the software activates the respective output (LED) and deactivates the previous output (depending on which button is pressed the previous higher or lower output).
If you decide to not only light the LEDs for the leftmost and rightmost button, but also all LEDs in between (the full range), you can use the same outputs that drive the LEDs to drive the motors. You will ned a simple driver stage as a microcontroller will normally not be able to drive a motor directly.
 

Nine

Nov 18, 2014
6
Joined
Nov 18, 2014
Messages
6
Allright, plans have changed a little. Instead of using a slide with two sliders, I want to use two different slides and position them next to eachother. I want to write a program that turns off all the group's below the left slide, and that turns off all the group's above the right. The group's that remain are in between the slides and will be turned on.

Now, I am wondering what kind of pot-meter I am supposed to use: Linear mono or Linear stereo.
 

Nine

Nov 18, 2014
6
Joined
Nov 18, 2014
Messages
6
Oh and I considered the button-system. Yet as an Industrial Design student I am supposed to make usage of the product suitable for the user, which will be a DJ. Slides have a better feeling than buttons in the case.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,728
Joined
Nov 17, 2011
Messages
13,728
Then you can set up the cuircuit as follows:
  • use 2 slide potentiometers connected between e.fg. Vcc and GND
  • use a microcontrolller with 2 analog-digital converter inputs (ADCs)
  • digitize the analog value from each potentiometer (a typical µC will have an ADC from anywhere between 8 bits and 14 bits)
  • quantize the digitized analog values such that you get 5 distinct values for each potentiometer (e.g. using an 8 bit ADC will give values from 0...255, so a mapping like this were suitable:
    • 0...51 -> 1
    • 52... 103 -> 2
    • 104...154 -> 3
    • 155...205 -> 4
    • 206...255 -> 5

From these quantized values (in range 1...5) determine which motors are ´to be turned on.

Note that having two sliders side-by side will allow the sliders to pass each other, thereby moving the lower slider above the upper slider. You may want to make use of this e.g.to allow an operation of motors 1 + 5 but not 2...4, or you may need to make this psotion mechanicallly imppossible. The latter can be achieved by using knobs so wide that they block each other.

Slides have a better feeling than buttons in the case.
I'm not quite sure this is true. You're controlling an essentially digital system (motors on/off) using an analog input device (sliders). This is not very intuitive.
Once you have the microcontroller, drivers and motors set up, you can easily build both input devices (sliders/pushbuttons) with comparatively little modification of the program. This will allow you to evaluate your assessment of the user-friendliness of either device.
 

Nine

Nov 18, 2014
6
Joined
Nov 18, 2014
Messages
6
Thank you so much for your advise. I'll keep you updated.
 
Top