PDA

View Full Version : Using voltage divider with BS2 and adc083



TonyA
07-25-2005, 09:59 PM
Hi,

It would be greatly appreciated if anyone can offer any advice/help concerning the use of a voltage divider with the BS2 and adc083.

I am attempting to use a product made by I-cubex called the "slidelong". I thought it was a variable force sensitive resistor, but it turns out it is actually a voltage divider and would require the use of an adc chip.

I'll be using it as a midi ribbon controller.

If anyone could offer any advice, referrences or help it would be much appreciated. Thank you.

Tony

Bruce Bates
07-25-2005, 10:31 PM
Tony -

You don't mention how much accuracy or resolution you're trying to achieve, but take a look at the PBasic RCTIME command either in the PBasic Manual or in the PBasic Editor Help file, which you may be able to use in this application. I believe both show examples of its use. Essentially the resistor (variable resistance) will become part of an R/C circuit, and you'll be measuring the charge/discharge time. The math required is shown in the examples as well.

Regards,

Bruce Bates

Yanroy
07-25-2005, 11:55 PM
I've used an ADC0838 with my stamp... it works great.ˇ I even have one ofˇthe inputs connected to a voltage divider - it monitors the robot's power supply, which is at 16.8V, so I divide it by 4 so it stays below 5V on the ADC input.ˇ I imagine this chip is similar to the ADC083 you're thinking about using.ˇˇI've attachedˇthe code I use to communicate with the ADC0838.ˇ Keep in mind that if you're going to use this for MIDI, you might want more than 8-bit accuracy on your ADC.

TonyA
07-26-2005, 02:51 AM
Hi,

I was thinking of trying the adc0831. Maybe another adc chip would be better suited for midi applications?

I was using a very simple program that made extensive use of the rctime command to read a photoresistor/capacitor, it worked well, sending midi messages out to a drum machine.

I thought this strip I bought was just a variable resistor (FSR), but it's really a voltage divider. At first I thought I could still use the rctime command, but maybe things will be more accurate if I used am adc chip. Should I sue a different adc chip?

Thanks for the info and great help.

Tony

Yanroy
07-26-2005, 03:03 AM
I'm a bit curious... how can it be a voltage divider without also being a variable resistor?ˇ If it has 3 pins, as a standard potentiometer, just use one of the ones on the end and the wiper and you should get a variable resistor...ˇ If it's some kind of active circuit, this won't be true, however.

TonyA
07-26-2005, 03:16 AM
I thought about that too, but when I asked their tech support they said it couldn't be used as a variable resistor, and then I got confused... I'm going to see how it works without an adc, just use the rctime command and see what I get.

Thanks again,
Tony