Hello. I am new to the Arduino life. I have looked at them for years and finally got an Elegoo R3 for a starter.
One thing I would like to do is build a set of controls for a helicopter sim. I have a set of real life controls for a Huey that I will build gimbals for and put to use.
I have some experience with the electronics end of things and basic programming.
So with this project I plan on using hall sensors on the axis. The first hurdle is the fact that this stick only moves around 30 degrees. So I'm assuming that it will benefit from as much resolution as I can give it. As a comparison the commercial controls I have are 16 bit on the x and y axis.
I know I will need a different board, maybe the Leonardo? These boards or only 10 bit so I am again assuming I will be needing a 16 bit ADC.
Once I get squared away with some guidance as far as what is needed to achieve this goal I can make plans how to move forward.
I just got an ADC 1115 up and running. Tied into an UNO 3. Some thing doesn't seem right though.
I'm using the basic Singleeded.ino example file.
I have an A1324 hall sensor input in slot 3 and the full 5 volts on slot 2.
This is a sample of the output:
AIN3: 13046 2.45V
AIN2: 26403 4.95V
So it's not getting the full 5 volts but more importantly why am I not seeing an output closer to 16384? I suspect it's because it would require the 6.144 vcc to see the full range?
Will the map function fix this?
I'm using 2 magnets, one on either side of the sensor that rotate on the end of a shaft. Once I get this part working correctly I will move on to trying out some different configurations for the magnet/hall sensor.
Thanks Jim. Didn't think of that.
I do need max resolution. The cyclic only moves 30 or 40 degrees.
So I dug out a pot to use. Dialed in 4.08 v. on a separate board. Moved it over to the project board and gave it a go without changing the gain yet. Nothing coming out of the ADC? So I put a meter on and it shows .922 v. What the hell?
I don't get it!
Here's a pic....maybe some one can spot it. I have pulled the Red vdd lead off the ADC before I turned it back on with the meter to take the pic. And removed the lead from the + rail to analog 2 imput.
So 5v from Uno goes to the trim pot and the output from the trim pot feeds the + rail on my bread board. Unused inputs on the ADC are grounded ( white wires) with the exception of the ALRT.
The pot has the red feed, orange ground and another red to feed the + rail.
The red, blue and yellow are the hall sensor...yellow is signal.
The yellow lead from the pot goes to the meter and the ground is the blue (top right).
That will never work.
Unless the device you are trying to power only draws a very small amount of current, using a pot almost always never works.
The voltage drop across the pot will vary depending on the current draw of the ADC and hall device. These currents are not constant so the voltage to the devices will also change.
Besides, both the hall and adc need a regulated 5V.
WoW....through a lot of tinkering. I dug up a 15k res for the R 1 side and 10k, a 3k and a 330 ohm res. for the R1 side of the divider.
So now it's showing the high as 3.95 v out of the sensor and 31606 and the low is 0.01v - 113. And this is about 90deg turn on the shaft.
I read somewhere that a small cap across the hall sensor would help smooth out the noise.