new biped,

NickR - the more common used ADC is the ADC0831 (single channel) or ADC0832 (2 channel).

Here is a 16 page article that explains the use of the two parts I listed and it even includes Pbasic code examples. I highly recomend reading it if you are going to use ADC’s in your projects.

parallax.com/dl/docs/cols/nv … /nv118.pdf

Great except that he needs 4 channels.

He can use two ADC0832’s or one ADC0834. If he chooses to use two ADC0832’s he will need to use the CS pins to controll each.

Page two of this data sheet shows the different pakage types and the number of channels.

info.hobbyengineering.com/specs/ … DC0831.pdf

Hmm, Why not use a Micrhcip A/D converter. You can get an MCP3208(8 channels 12bit res) for a couple bucks. Uses SPI(ie SHIFTIN/SHIFTOUT) to communicate with it.

Here’s the data sheet:

ww1.microchip.com/downloads/en/D … 21298c.pdf

Nathan

He could use that one or any other type of ADC but the one I suggested has a document that tells you how to wire it up and code examples on its use. For me, I need all the information I can get to understand how it works and how to use it. It will save alot of frustration down the road when trying to use it in your project. The examples are for Pbasic, but since Mbasic is almost identical to Pbasic, it would be easy to modify the code to work with a Basic Atom.

It’s really a matter of personal preferance.

Hi there,

4 X 8bits A/N inputs on the SSC-32 and…
4 X 10bits A/N inputs on a Bot-Board with a BA28 on it !
or 3 X 10bits A/N scaled with the fourth (AX3)

Multiplexing an A/N inputs with unused outputs pins is a good idea…and easy to build !

:open_mouth:
So much info!
This makes me happy, though…
Perhaps I may not need a microcontroller…

I entirely agree, Mike.
I’m the same way.
I’ll post back with a billion questions in a couple of hours (it should take that long to read the sites).
:smiley:

especially when you got 32 of these outputs and only need maybe 20
im thinking weaponry with the rest

nick

Um… Jim… what’s the command syntax that we are supposed to use to read those ABCD I/O pins as analog?
I reread the SSC-32 manual (for about the twentieth time, lol) and I can’t find it in there.

Just a note. The AtomPro28 had 8 A/D capable pins(p0-p3 and p16-p19).

Nathan

It’s after the Schematic and before the 12 Servo Hexapod Sequencer Commands section. I’ll paste the info here…

Read Analog Inputs:
VA VB VC VD

VA, VB, VC, VD reads the value on the input as analog. It returns a single byte with the 8-bit (binary) value for the voltage on the pin.

When the ABCD inputs are used as analog inputs the internal pullup is disabled. The inputs are digitally filtered to reduce the effect of noise. The filtered values will settle to their final values within 8mS of a change. A return value of 0 represents 0vdc. A return value of 255 represents +4.98vdc. To convert the return value to a voltage multiply by 5/256. At power-up the ABCD inputs are configured for digital input with pullup. The first time a V* command is used, the pin will be converted to analog without pullup. The result of this first read will not return valid data.

Read Analog Input Example: "VA VB "

This example will return 2 bytes with the analog values of A and B. For example if the voltage on Pin A is 2vdc and Pin B is 3.5vdc, the return value will be the bytes 102 (binary) and 179 (binary).

Wow, I’m dumb. (I seem to be saying that a lot, lately.)
Somehow I missed recognizing that as the information that I needed multiple times.
:confused:
Thanks, Jim, for pointing it out.
:smiley:

Nick-R

Not only do you have altered brain waves, but you seem to be blind as well. :laughing:

I’m just messing with ya Nick. I just could not resist.

I’m not blind!
I can see perfectly well!
If you want to see like I do, close your left eye, and hold your hand over the right one.
:laughing:
Anyhow, I have a question (lol, I’m probably lying; I never have ONE question, do I?) for you, NickA, or whoever else can answer it…

If I wire my pressure sensors in a voltage divider, the SSC-32 will read the difference over it’s I/O pins as a ratio…
So, I can’t use the terminal program to read that ratio, can I?
The VA VB VC VD command answers with four integers which I multiply by 5/256 to get the voltage difference.
But, how can the terminal program read the ratio, when it’s set up to read voltage? (Damn, I lied, that’s two.)

Ok, I have to lie again, here comes a third, a fourth, and a fifth:
How did you power those pressure sensors?
I need 5 volts, but there are many ways to obtain that.
What batteries and resistors would you recommend to get the 5V?
Since weight is an issue, I only need between 30-60 minutes of run time with them.
I also hope to divide the batteries so that I can put a battery on each foot to power that foot’s sensors.
I figure that by placing them on the feet, they’ll give them a good centrifugal force, which should help with non-static gaits.

Please feel free to point out anything that is blatantly obvious with harsh language.
:laughing:

you can read them with the terminal program, the value is just a ratio of the two sensors. if the voltage is higher then 2.5 then you have a proportionally higher force on one sensor, if it is lower then 2.5 then the other sensor has a proportionally higher force.
for power i just used a voltage regulator from the shack powered off of main servo power. ever since li-po came out i have been experimenting withl my packs on the shin and/or thigh, it will minimize the balance issues but slows the step speed a touch.

im curious if any one else encountered this “lag” with a weighted leg?

if you need anything else dont hesitate
nick

Ahhh…
So, that’s why you said your program tried to keep the values at 2.5…
:open_mouth:

I’ve encountered that “lag” when I weighted my Biped Scout’s feet.
For me, it was very minimal, and was, in my opinion, worth it.
The added weight wasn’t good at all for static gaits, or slow non-static gaits.
But, it was extremely helpful for fast walks.
I was able to use the momentum of one foot to aid the movement of the next one.
It created something like a pendular effect.
With the exception of the first few steps, it seems to be a far more ergonomic.
I’ll try to do the same thing on my Humanoid, and I’ll get back to you when I have the results.
(In about two weeks, I’ll be getting the parts I need for a Humanoid.)

Alright… I’m confused…

I measured the voltage across the first two + and - terminals (above the ABCD inputs) on the SSC-32 and they’re 4.95V (my meter’s a bit old).
Doesn’t that mean that I don’t need an HD regulator?
I mean… it’s supplying a steady “4.95V”, so isn’t that a good enough power source for the pressure sensor voltage dividers?

I tried hooking up a simple voltage divider out of two fixed resistors, so I could get some idea how the pressure sensors are going to work.

I stuck a 330KOhm resistor on the + and a 910KOhm resistor on the -.
Then I connected the two resistors.
I measured the voltage drop across the 330, and it was 1.27V; I measured the voltage drop across 910 and it was 3.57V.
So, it’s about a 1:3 ratio, which is what it should be.

So far, so good.

After a bit of magic smell, I came up with this wiring:

x402.putfile.com/3/6107380671-thumb.jpg

When I read the voltage across the two resistors with my meter, it was ~5V on the 330 and ~0V on the other…
When I tried using VA on the LynxTerm, I got no response.

So, I scrapped that, and tried to make a voltage divider that was exactly like Nick_A’s diagram.
This is what I made below:

x402.putfile.com/3/6107402378-thumb.jpg

Again, when testing, the voltage across two of the resistors was about 0 and about 5 on the other two.
And, again, when I tried VA VB, I got no output.

(BTW, I know that the Lynxterminal and SSC-32 both function properly, as I checked to be sure that I hadn’t fried anything, so it’s got to be something with the way that I’m wiring this).

Does anyone know where I went wrong?

you need to elaborate on a few things. Firstly, did you actually get “no output” when querying the values or did you get zeros?

when you’re measuring the voltage with your meter, how are you measuring, across which resistors?

In your first diagram, I might be misunderstanding, but it looks like you’re involving a servo pulse in there for some reason. That’s not going to be helpful and might explain the odd readings. Instead, what you want to be doing is to have that signal between the resistors (where the pulse line is) going to A. I’ll name the three places on those resistors you can connect a line in top down, 1, 2, and 3. If you measured with your meter between any GND and 1, it should always be at 5V, 2 shoud be that divided ratio you’re looking for and 3 should be at 0. This is what your analog input is going to be measuring, between GND and the signal passed in.

A test just to rule out the basics, connect A directly to + and then to -. Make sure those reading VA is 255 when connected to + and 0 when -. If not, then you’re not going to get very var with the resistors.

one other note on this, after using these FSRs a bit myself, I’d suggest not restricting them in this divider manner. In this arrangement you’ll won’t have any way to determine if the foot is on the ground or in the air. Just the relative pressure between front and back, which should be approximately even in the air.

Another issue is that you’ll probably want to tune some offsets because of physical mounting issues and differences in manufacturing, they will probably not have exactly the same value when weight is evenly distributed. You could account for this after it’s divided or before hand, but keep in mind that you’ll probably want to do some sort of calibration like this.

Andy, you are most definitely correct; this setup is really only useful on nearly perfectly flat surface, but it does conserve on the inputs. (although your sensor board solves that) When i was working with these sensors i built in a slight toe up orientation when taking a step so that i received a spike from each of the two dividers when the aft sensors made contact. At this point the leveling subroutine would take over, leveling the load on the foot as the weight was transferred from the other leg.

It was not a graceful walk but it was dynamic, assuming you go by the definition that a dynamic gate is one in which you cannot stop with out a deceleration period. (i.e. you cant stop mid stride)

Nick_R, I believe it to be a good starting point for getting together some algorithms for balance and from there you can jump to the pic based sensor board done by Andy but that is just my $.02

nick