I have a device that reads a linear analogue signal from a potentiometer.
I want to interrupt it with an arduino or similar in order to trim and/or make the signal non linear.
As the arduino outputs a pwm signal, would this mean it wouldn't be compatible with the existing device or does it depend on that device?
I have no info on the device in question, wouldn't know where to start to be honest. I was planning to test the outputs from the existing potentiometer and wire up the arduino appropriately and do a test.
I'm assuming if the current hardware sends an analogue signal out, then I need to send an analogue signal and not a pwm. But as I'm not an electronics experts I don't know if that's the correct assumption. I mean, I don't know where to start with messing around with the recieving hardware to know what it can and can't do.
TomGeorge:
Hi,
What is the application, why do you need to change the pot characteristic?
What is the range of the pot signal?
Have you looked at the Arduino controlling a Digital to Analog converter?
What is the non linear response to look like?
Can you post a graph?
Thanks.. Tom..
I don't have anything on paper, and the requirement of it being not linear is only because I don't know if it could be useful, it's worth factoring it in before I start right?
The application is pedal for a driving sim rig. The typical brake mod is to upgrade the potentiometer to a load cell. >£100 from a manufacturer or £20 for a DIY set up. And I like to tinker and the brake pedal just conveniently stopped working.
I did a bit more searching and found someone had done this with only a load cell and an amplifier so that says to me it does require an analogue signal. And to do that out of an arduino I need rc or low pass filters? But not sure if response time will be an issue. So maybe I'll just try the amp first and see how it goes.
And sorry, yes digital to analogue converter, another thing I was going to look into, but another thing I have no experience with, I seem to be finding all audio related hardware so if you could point me to something that I could read regarding an appropriate DAC, cheers
Paul__B:
The point is - if you have no information on the device in question, then you have nothing to work with.
I know what's going to it because I can test it. It's got 3.3v coming in, through a pot, then sends an analogue signal back from the pot.
The fact someone has already done it too proves its simple, at least at this end. I was just wondering how to produce a signal from an arduino that isn't pwm. The main benefit of putting it through an arduino is that the input signal can be modified before going to the main controller. If needed, which would be the easiest to adjust the feel as the in game settings will be limited.
Ron_Blain:
You really need to better define what you want or expect. That includes input and output in some detail.
"The fact someone has already done it too proves its simple, at least at this end".
Sure, open heart surgery is a snap.
Ron
I really don't think I'm talking about heart surgery, there is a pot that gets turned you depress the pedal. It's receiving 3.3v and returning some range from 0-3.3v.that much is clear without any other detail as its purely a pot and nothing else.
MarkT, yes intercept is probably better terminology, especially on an Arduino forum.
Ultimately, I want to read the signal from a load cell in place of the pot and return a value to replace what the pot did do previously.
So what you want to do is intercept a level between 0 and 3.3 volts. That's simple enough. Pressing a pedal is 0 to 100% which is 3.3 volts in engineering units. So at some given point (intercept) what do you want to happen? Just a single intercept point or multiple points? Same question, what would you like to happen?
I think you have slightly misunderstood what I want but I probably haven't described correctly. I want to take the full range of signal in, and send a range back out. I want to modify it in the middle, but ultimately the input won't be from a pot and I would like (but don't know if I need to yet) to be able to trim either end and maybe non-linearize it. It all depends on how it feels which I can't tell you yet. But that bit is just some math and not what I'm worried about, purely, how to I send an analogue signal out that isn't pwm, and preferably with 0 time delay, I know that's impossible but the closer the better really, which is why the other method I said I found proves its simple, load + amp straight into the controller. Nothing in the middle to cause delays. The guy didn't appear to even check the voltages and it worked fine, so I assume 3.3v is the ceiling.
I did a bit more searching and found someone had done this with only a load cell and an amplifier so that says to me it does require an analogue signal.
Then in a few words to answer how to send an analog signal out that isn't PWM? You don't. You can have digital out and you can have analog or digital in but no analog out. On the bright side Mark called it in post #8 and gave a link to a DAC chip. You want a Digital to Analog converter and the link is nice because the linked DAC uses I2C communication and a 12 bit resolution. Any Arduino alone will not give an analog out but with the link you are there for an inexpensive add on.
What we need to know as much as anything else, is the input impedance of the gadget to which you need to send the signal.
This matching discussion was encountered some time back - not so easy to find the reference. One suggestion was to use a "digital potentiometer" as the output device rather than a formal ADC and in this case, this would actually be a good approach.
But following from the older thread, there is no implication that doing this digitally with an Arduino is in any way appropriate; an op-amp circuit is likely the simplest approach. What is needed is a proper explanation as to what "make the signal non linear" actually means.
Did a bit of testing and this is what I'm reading from the brake hardware itself.
3.3v common ground
brake off 10.3ohm
Brake on 6.4ohm
Voltage
0.4vdc @ 0%
2.4vdc @ 100%
So I will need to send back 0.4 to 2.4vdc to return everything to normal.
Link to the guide here (if it allows me to post it).
Simply a load cell and amp in replacement of the pot. And it doesn't appear he put a lot of thought into the final voltage so as he says made in game adjustments to suit. So there always this basic option.
Paul__B:
What we need to know as much as anything else, is the input impedance of the gadget to which you need to send the signal.
This matching discussion was encountered some time back - not so easy to find the reference. One suggestion was to use a "digital potentiometer" as the output device rather than a formal ADC and in this case, this would actually be a good approach.
But following from the older thread, there is no implication that doing this digitally with an Arduino is in any way appropriate; an op-amp circuit is likely the simplest approach. What is needed is a proper explanation as to what "make the signal non linear" actually means.
I can sense your frustration, probably warranted in some degree, but I'm not an electronics engineer, so for how much you need to know from your point of view, its hard for me to tell you. I can only tell you want I have, see the post above, and I'm assuming as it has been done a much simpler way as per the link, the final product doesn't need to be that advanced. I saw this as a simple problem, and really just needed a good way to make a pwm signal into something that would appear analogue like the pot reference voltage that the controller is receiving.
As for non linear, I think you're really trying to pin me down to exact details, but to be honest I can't tell you because it will all be about feel in the end. Non linear meaning instead of 0-100% in a straight line, I might decide that halfway through once you hit the pressure on the load cell maybe a more or less aggressive curve could be the different to it feeling like a brake pedal or feel like a football. But I don't know that yet. I just want to option to tune it, if needed, once I know it all works.
That's the only reason for putting it through a microcontroller. I don't need to. I just want to account for it, and I can't make it work with pwm.
I'm assuming if the current hardware sends an analogue signal out, then I need to send an analogue signal and not a pwm. But as I'm not an electronics experts I don't know if that's the correct assumption. I mean, I don't know where to start with messing around with the recieving hardware to know what it can and can't do.
Just insert an RC LPF (Resistor Capacitor Low Pass Filter) between the Arduino PWM and the device that
needs an analog (not analogue) input .
R = 4.7k
C = 4.3uF
The low pass filter will convert the PWM to steady state analog.
This really a very common practice among Arduino users who lack a DAC (Digital to Analog Converter).