Shop OBEX P1 Docs P2 Docs Learn Events
Using voltage divider with BS2 and adc083 — Parallax Forums

Using voltage divider with BS2 and adc083

TonyATonyA Posts: 226
edited 2005-07-25 19:16 in BASIC Stamp
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

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-07-25 14:31
    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
  • YanroyYanroy Posts: 96
    edited 2005-07-25 15:55
    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.
  • TonyATonyA Posts: 226
    edited 2005-07-25 18:51
    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
  • YanroyYanroy Posts: 96
    edited 2005-07-25 19:03
    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.
  • TonyATonyA Posts: 226
    edited 2005-07-25 19:16
    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
Sign In or Register to comment.