How to: connect pot and HALL effect pots

AMC, H-Bridge projects etc.
Please use the image gallery for your pictures, a short tutorial can be found here.
The first image in the first post will be shown in the project gallery.

How to: connect pot and HALL effect pots

Postby sirnoname » Mon 29. Jul 2013, 15:07

How to really connect a pot to your interface board without loosing accuracy or smoothness

In this post I will explain how you have to connect a pot or a HALL effect pot to your interface card. I explain here how to increase the quality of motion of a new interface design or how you upgrade any existing simulator setup that comes with pots or hall pots. A pot has 3 wires. One is connected to 5V, the middle pin (the moving pinout) is connected to the interface Analogue To Digital Controller (ADC) input and the last one is connected to Ground (GND). The HALL effect pot has similar named pins but they are fixed and must be wired as noted on the housing or manual. HALL pots are different from normal pots because they use a magnetic field to detect their position. This HALL pots have a long livetime and are more accurate than normal pots. However they come with a integrated electronic and do not output 0 to 5V but 0.5 to 4.5 Volts. The noise of a Hall effect pot is smaller than of a analogue pot.

Sample of a good closed (dustfree) linear pot at farnell.de
1921


Sample of a HALL effect POT at farnell.de (uses magnetic field without mechanically slider and has electronic inside)
The pinout is written on the pot and are a must. Else the electronic in the pot get burned.
1922

Now the problem:
A pot or HALL effect pot has for example 100° movement but you do only use 50° of the 100° movement. Most members do now finetune the limits with the interface software. For example they set in the software, of a 8bit interface, as minimum 100 and as maximum 228. A 8bit DAC has 0 to 255 values, a 10bit DAC has 1024 values and a 12bit DAC has 4096 values which it can distinguishing from each other voltage level of your pot output. This is called the digital "resolution" of the DAC. If you use a 8bit DAC (AMC interface, Vellemann K8055d) you will loose in the above sample of 50° 128 values and the simulator will loose accuracy and smoothness in the movement. It is highly recommended, and a must, to provide your interface DAC 0 to 5 Volt. If you use the software limiter you are doing a nice tryout for the first time but this should not be a end solution. In the end you would have with a 8 bit DAC, and 50% lost of the pot way, around 32 positions, that your controller can accurate reach on one axis (this are i.e. 16 left and 16 right positions on lateral movement axis because it can only control +/- 1 value accurate, there will be always a small noise jitter on the pot output signal or your PID control loop setup is a little bit instable).

Interfaces and their build in DAC controllers resolution (higher bit resolution is better)
AMC 1.6: 8 Bit
Velleman: 8 Bit
Arduino: 10 bit
Pololu: 12 bit
SCN5 actuator with 100mm: equal to ~14bit (encoder with 20000 values, no pot)
SCN5 actuator with 150mm: equal to ~15bit (encoder with 30000 values, no pot)


It is highly recommended to
SWITCH OFF ALL SOFTWARE LIMITERS AT YOUR INTERFACE CARD

The solutions in a overview (details below):
1.) The most easy solution is to insure a full pot way by a hardware solution
2.) The second option is to use a electronic solution, the so called "level shifter" with a small opamp circuit connected between your pot and your interface
3.) The worst solution is to take a more accurate DAC with more resolution only to solve pot problems. A 8 bit DAC looses in the above sample 128 positions, a 12 bit DAC of a pololu interface looses also its 50% but with 4096 positions you have 2048 positions left instead of 127 of a 8bit DAC.

Details for the hardware solution:
a.) You can use a lever with different length and connect it to the pot and the simulator (maybe steel rods like used in the Rock'n'Ride Simulator)
Read this post: viewtopic.php?t=617
b.) you can use a small gear with different transmission to reach a full pot movement (RC models or hobby shops)
c.) you can paint a pot with silver laquer (not a HALL effect pot)
Read this post: viewtopic.php?f=39&t=723

Details for the electronic solution:
Making a circuit that will set the minimum and maximum position of your simulator with two limiter pots is very easy. You can build this circuit on a breadboard. If you are using a arduino, you can use so called protoshields that comes with a small breadboard layout on it.

:idea: If you own a velleman k8055d interface you are lucky because it is already assembled to the board. They do not have any software limiters. But the circuit is not completed and the offset pot is missing. You may change this now.

You need for one axis:
- a operation amplifier IC with 5V supply voltage (LM324 ~0.3 to 4.7V). To reach whole 0 to 5V you should use so called "rail to rail" opamps (MCP6041, TLV274I like assembled in a velleman interface K8055d).
- two identical liniear trimmer pots with 1KOhm or any up to 10kOhm (smaller pots for thru hole breadboard mounting)
- a voltmeter for the tuning
- solder equipment or a good friend with that equipment
Download the datasheet of your bought opamp and look into it for the correct wiring like the following schematic from the source:
http://electronics.stackexchange.com/qu ... evel-shift
CCn0j.png
CCn0j.png (7.83 KiB) Viewed 16934 times

Vin is representing your pot (middle) output. Vout is connected to your interface board. The two pots will need to get adjusted to your minimum and maximum simulator movement. Pot2 represents the minimum, Pot1 will represent the amplification to reach the maximum.
The finetuning will take some seconds.
First you need the digital voltmeter and connect it to the output of your pot or HALL effect pot. You can measure this voltage directly behind your simulator pot (Vin in the schematic). Do not measure this voltage behind your opamp circuit. Move your simulator to the limits and write down your output voltage of the pot. Here we are using the sample of 50° with starting voltage of 1V and end voltage of 3.5V.
Now use the Pot2 trimmer to set the 1V at the + input of the opamp (triangle symbol). Then move your simulator to the maximum position and set with Pot1the output (Vout at the schematic) of your opamp to 5V. Move your Pot1 until it has 5V, It must be the border, do not move the pot more than needed.
Now you have to verify if your output of your circuit has 0 to 5 Volts, if you move your simulator from the minimum to the maximum position.

End of tutorial, copyright sirnoname for X-Sim.de
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Re: How to: connect pot and HALL effect pots

Postby eldeejay » Fri 16. Aug 2013, 09:47

Hi, has anyone tried this circuit?

I've tried and does not work in any way.

- SOLVED -

regards
Last edited by eldeejay on Sat 17. Aug 2013, 11:36, edited 1 time in total.
User avatar
eldeejay
X-Sim Supporter
 
Posts: 41
Images: 6
Joined: Tue 3. Jul 2012, 10:37
Location: Spain, Alicante
Has thanked: 4 times
Been thanked: 0 time

Re: How to: connect pot and HALL effect pots

Postby sirnoname » Fri 16. Aug 2013, 12:38

As written it is mounted twice to all velleman boards without the second pot.
Here is the schematics
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Re: How to: connect pot and HALL effect pots

Postby eldeejay » Fri 16. Aug 2013, 14:46

I finished the test and I will present my results. First I apologize for my doubts prior to this publication, (sorry and thanks Martin ;) ).

However, the scheme published by Sirnoname works perfectly, but it is important to know that the resulting output of this configuration is INVERTED. The configuration of this opamp is "inverter amplier" therefore Vo = ~Vin (inverted Vin).

If you already have your operating platform and install this circuit should consider this:
To insert this circuit, the motor will rotate on the oposite direction, the solution is to reverse the motor wires.



I recommend using this solution, authored by sirnoname

_____________________________________________________________________________________________________________________________________


Velleman scheme uses a opamp in configuration "noninverting amplifier". When setting the offset pot scheme would remain so:

1987

This configuration is not suitable for the needs of the project as opamp output it never becomes 0v because will always exist minimum input voltage, for example, I use a magnetic sensor whose output ranges from 0.5 to 4.5 volt, so in the minimum position will always exist at least 0.5 volts; and 0.5 volts Vout will always be minimal opamp Vout.

Do not use this setup.
User avatar
eldeejay
X-Sim Supporter
 
Posts: 41
Images: 6
Joined: Tue 3. Jul 2012, 10:37
Location: Spain, Alicante
Has thanked: 4 times
Been thanked: 0 time

Re: How to: connect pot and HALL effect pots

Postby Tombo » Sun 29. Sep 2013, 02:48

Tombo
 
Posts: 97
Images: 36
Joined: Fri 22. Feb 2013, 20:52
Location: Germany
Has thanked: 6 times
Been thanked: 8 times

Re: Help with operation of this circuit

Postby 7733star » Sun 20. Oct 2013, 05:11

I am hoping I can get some help with the operation of this circuit. I built the circuit and it does seem to work for me somewhat. It does limit the travel of the simulator but I am unable to set the limit to what I would like to get. I think I followed the instructions on how to setup the circuit but what happens is the motor just rotates without stopping. What I did was set the simulator to its max position and with the voltmeter connected to GND and pin3 of the chip I adjusted the pot2 until I get 5 volts. I then set 0 volts when connected to the output of the circuit with the simulator in the min position. Also I do not get equal amounts of travel thru the range of the simulator. I get more travel from midpoint to max in one direction than the other. I am not really to savy with electronic stuff I am learning as I go. Sorry if I sound kinda confusing but I am trying to understand better what to exspect from this circuit.

Thanks for any help.
7733star
 
Posts: 17
Joined: Tue 13. Aug 2013, 05:41
Has thanked: 0 time
Been thanked: 0 time

Re: How to: connect pot and HALL effect pots

Postby Tombo » Wed 6. Nov 2013, 21:59

Hi,
i build this circuit too. But i understand it like this. My pot has a rotation from 0-280° which is 0-5v for arduino. So if ii use only 20-220° as pot movement with my simulator i have to use software limiter and loose some positions which my motors can reach. So if we say 220° is 4,12V which is my max position in my simulator this circuit whill amplify this voltage to 5V. Is this right? Because the circuit is not working like this so did i understand something wrong or build the circuit wrong?

Thomas
Tombo
 
Posts: 97
Images: 36
Joined: Fri 22. Feb 2013, 20:52
Location: Germany
Has thanked: 6 times
Been thanked: 8 times

Re: How to: connect pot and HALL effect pots

Postby Tombo » Sun 24. Nov 2013, 18:51

I have builded this circuit again like this
2326

But for me it still doesn't work. I use lm 324N http://www.produktinfo.conrad.com/datenblaetter/175000-199999/175838-da-01-en-IC_LM_324_N_DIP14_STM.pdf and 10K pots. I have min and max Voltage of 1,64V and 3,94V. Pot 2 is set to 1,64V but Pot 1 is at max 1,64V too I only can lower the Voltage to 0,64V measured between opamp pin 1 and gnd. I've checked my wireing twice and can't find the error maybe someone can help me.
Tombo
 
Posts: 97
Images: 36
Joined: Fri 22. Feb 2013, 20:52
Location: Germany
Has thanked: 6 times
Been thanked: 8 times

Re: How to: connect pot and HALL effect pots

Postby RafBR » Tue 7. Jun 2016, 22:15

4125
Hi,

I am trying to use hall sensor a1302 instead of regular pots.
In this Picture you can see what is happening. I have some kind of offset here.
I made marks over where I can reach with moving the magnets.
Maybe this is due voltage drop across the sensor?
How can I center the middle position as a regular pot?

412841274126

My regards,
Rafael
User avatar
RafBR
X-Sim Supporter
 
Posts: 136
Images: 24
Joined: Tue 20. Mar 2012, 21:53
Location: Brasil
Has thanked: 6 times
Been thanked: 4 times

Re: How to: connect pot and HALL effect pots

Postby sirnoname » Tue 7. Jun 2016, 22:25

You will not reach the full 5V that is true. The AD converters are also not the best. Make a screenshot of your calibration, its hidden.
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Next

Return to Controllers and Drivers Projects

Who is online

Users browsing this forum: No registered users and 1 guest