I am wanting to build a Sallen Key low pass two pole filter, with 2 fixed capacitor values, and 2 variable resistor values. For the variable resistors I want to use analog knob potentiometers wired as rheostats. I want the resistance values of each of the two rheostats to read in ohm values on the two lines of my 16X2 Liquid crystal display, connect to my Arduino Uno.
I recently did a project with Arduino Uno, 16X2 liquid crystal display, and a potentiometer, where the LCD read out frequency using one code, and beats per minute using another code. I did this using AnalogRead where the wiper of the potentiometer was read.
I am not quite sure of how to code to obtain the rheostat resistance values displayed on my 16X2 LCD screen. If I can figure out how to code to obtain rheostat ohm values on the 16X2 LCD, I think I know how to put each one of the two rheostat values on the two lines of the 16X2 LCD.
If possible, I would like to look at some examples of, hookup circuit, and code for a rheostat ohm values being displayed on a 16X2 LCD> Thanks!
How do you expect to read the values of resistors that have active signals coursing through them? Just generally, can you see the problem? Any excitation signal that can be used to read the resistance will by definition appear in the bandpass signal, and vice versa.
About your only hope would be a dual ganged pot, unless you want to get extremely esoteric, e.g. high frequency / low frequency splitting and filtering...
aarg, thanks for replaying. I am not going to have an active signal coursing through the Sallen Key filter. No input signal is hooked to the Sallen Key filter. This is only about Arduino reading rheostat values in ohms and displaying them on a 16X2 LCD.
Sorry, I'm a little bit baffled by that statement. What is the use of a filter that does not pass signals?
aarg The use of the filter is for an amplified violin low pass filter. If the 2 capacitor values are known, and the two resistor values are known, one can mathematically figure the cut off frequency in hertz. No signal has to be present. I can figure mathematically for a Bessel, Chebyshev, or Butterworth filters. No signal has to be present to measure capacitors or resistors. I can manually measure the resistance of the rheostats with a ohm meter. It would be a lot more convenient looking at the LCD screen instead of measuring with a ohm meter.
I'll pass it to the team...
aarg, you don't have to know anything about filters to help. Think of it this way: If I have a simple potentiometer wired as a rheostat, how do I display the ohm values of the rheostat on a LCD 16x2 display using Arduino Uno. I know you know what a rheostat is. I know you know what a LCD display is, and an Arduino. I can figure the rest, if I only know how to display the rheostat reading on my LCD display. I can hook up the Sallen key filter arrangement, and figure the cut off hertz.
To make things simpler, maybe I should have asked how to make a variable ohm meter with Arduino and a LCD
Maybe you should think the other way.
Don't measure the resistance, but let the Arduino make the required resistor,
with a digital pot instead of a manual pot. Or with a decade resistor box with reed relays.
Leo..
Yes, maybe we are missing something but I agreee this seems an AAF way to do it.
Use digital pots and you can use the arduino to "dial up" the filter frequencis rather than just resistance values.
Hi, @KeithHilton
So why do you need to measure the pots with Arduino?
All your experimentation can be done with a calculator or Excel spread sheet, display a range of potentiometer values and a worked out frequency
Then use a DMM to set your POTENTIOMETERS and apply signal.
Tom...
Google is your friend here.....have you asked her??
I think there's plenty of prior projects to peruse , using resistance measurement , involves stable Vref (internal) and conversion from analog value to ohmic values.
Yes cherk, I think you are correct. I have checked with Google and there are many examples of resistance values being read on a LCD with Arduino. Most of them involve one resistor, but when a rheostat stops turning that is one resistance.
The reason I am using rheostats is pretty simple. The people using the device know ZERO about Arduino, or using C++. They do know how to turn a knob and they can read numbers on a liquid crystal display. As for what the numbers on the LCD mean---I have a chart that tells the cut off frequencies in hertz for each of the resistance values.
I know this project may sound a bit confusing, especially for those who have not done work with filters and audio. I am going to try some sample code and put my own twist on the code. For one thing, I will be doing two resistance values on the two lines of the 16X2 display. I will probably get hung up in coding and may need help. I am very green at coding, but I am trying my best.
TomGeorge said, "Then use a DMM to set your POTENTIOMETERS and apply signal." I totally agree, I personally could do that. The problem is the people using the device don't know how to use a DMM. They don't know what a ohm is, or what a ohm meter is used for. The people I am dealing with can turn a rheostat knob, and they can read numbers on a liquid crystal display. That is the extent of their technical ability.
Yes. Please clarify it. And, you would hardly believe how much work I've done with filters and audio... run us through the user process. You've basically given us steps 2 and 3 but not 1 and 4. Fully explain the application.
Also what is this mysterious "sample code" that you speak of?
I am late reading this thread. Keith, why don't you just create a voltage divider with a resistor equal to the greatest resistance of your rheostat, with the fixed resistor connected to one end of the rheostat and the other end of the rheostat connected to ground. Apply 5 volts to the end of the fixed resistor. Connect the not-ground end of the rheostat to an Arduino A/D pin and read the voltage, and compute the resistance of the rheostat. Then you can display the resistance you have computed.
Isn't that what you have been asking for?
Compiles but untested:
/* Connect one end of rheostat to 5V, other end to fixed
* resistor and analog input, other end of fixed resistor to GND.
*/
float fixed = 10000; // value of fixed resistor in ohms, 10k here
float unknown;
int adcVal;
void setup()
{
Serial.begin(9600);
}
void loop()
{
adcVal = analogRead(A0); // use your analog pin number
unknown = fixed * 1024.0 / adcVal - fixed;
Serial.println(unknown);
delay(1000); // pause to read
}
While your at it code the maths to calc and readout frequency
cherk, I think coding the mathematics for the cutoff frequency is a great idea. Actually the mathematical formula is on the level of high school algebra. Not difficult at all.
one over the ----23.14 the square root of resistor 1resistor 2capacitor 1*capacitor 2.
I am new at coding but I think I can do it.
Before I code the mathematics, I want to get my LCD displaying resistor values.
@KeithHilton The only sense I can make of your problem is
You want to measure up some settings on a few potentiometers, then remove them from the measurer/setter circuit and install them in the Sellen Kay filter circuit.
Close?
a7