Analog output?

i need some info on using the analog outputs as a way of faking a potentiometers function. i am making a head tracker that will interface with an xbox 360 controller to use the head tracking to manipulate the right (head movement) joystick.

as a proof on concept i am controlling the 2 potentiometers in the joystick mechanically using a servo but what i want to do is use the fez domino to fake the potentiometers output. i am assuming that i can wire the analog outputs of the fez to the potentiommeters leads and fake the controller into thinking that i am adjusting the potentometer, but im not really 100% sure of how to occomplish this. anyone have any suggestions or have done anything like this?

i think your biggest challenge is that there’s only one analog out…

But if you think about it, analog out is exactly behaving like a microcontroller adjusted potentiometer. So emulating one of those should be fine.

With Fez though, 100% = 3v3; i have no idea if the xbox360 controller is a 5v device, but i’d almost bet so given it’s almost a USB device; in that case you won’t get to a voltage level that represents 100% of the device with a 100% output on the fez. Perhaps you can measure the changing voltage on there as you move the stick, to read the approx values?

hmmm, hadnt thought of that, i was assuming that there were 5 analog that could go either way. i see now that only one of those is an output. right now i am just using servos to turn the potentiometers but this is just to prove the concept, i would much rather fake the potentiometers and keep it all electronic not mechanical (using servos). is there another way to do this? how about some sort of DAC chip? im no wiring wiz, so i am just guessing…

You could possibly “simulate” analog out with PWM - so a 50% PWM wave is 50% of the voltage when averaged out; depends on how the sampling rate on the recieving end is worked out…

I am sure there are DACs readily available but don’t have a recommendation for you - here’s an Evaluation Guide for some TI chips, but I have no experience with any of them[url]http://focus.ti.com.cn/cn/lit/ug/slau117a/slau117a.pdf[/url]

Why don’t you chuck a 4051 analogue switch on a breadboard and multiplex the output or a couple of MAX 4922 12 bit dac’s “SPI mode” that will do the trick

Cheers Ian

ian, that is over my wiring-noob head, can you explain it a little or give links to hardware at least? and i didnt find a MAX 4922 online, did you mean the MCP4921/4922 listed here:
[url]Smart | Connected | Secure | Microchip Technology

Sorry I meant microchip not MAX… Yes that’s what I use… This way the DAC can latch after its updated so there is a constant voltage on the DAC output.

If you only need two outputs, then you only need one chip MCP4922. they are relatively cheap aswell

Cheers Ian

Or you might use a digital potentiometer like [url]http://datasheets.maxim-ic.com/en/ds/MAX5494-MAX5499.pdf[/url]