PDA

View Full Version : ServoPod Question


dr who
09-28-05, 11:41 PM
I have a ServoPod USB, I have read the servopod documents and have some questions: The downloads seem a bit thin?

1. Does anybody know what "SENSOR ADC1 ANALOGIN 8" is? (text from the download) ADC1 which pin is that? and is ANALOGIN 8 pin, is it pin 8 or pin 7 (0-7, 7 would be 8) is the connection on J6???

I have run the GP2D12 program for the IR sensor on just about every pin and get no return data to show distance, should the programme show and return????

2. Does someone have a programme that indicates the IR sensor showing a return of data?

3. Does anyone have any data on Encoder interfaces that would be used to control output to a motor controller to move a motor?

4. Does anyone have any data the hall effect sensor by Honeywell SS443A. how does it interface with the servopod, it has 3 wires
Orange for +5v
Blue for sensor ground
Brown for sensor open-collection output
Would i use J11 for the connection?

5. Does anyone have any data on interfaces between the ServoPod and a main PC programme,

Any help would be great....

Cheers Marcel....

nmitech
09-29-05, 10:56 AM
1. Does anybody know what "SENSOR ADC1 ANALOGIN 8" is? (text from the download) ADC1 which pin is that? and is ANALOGIN 8 pin, is it pin 8 or pin 7 (0-7, 7 would be 8) is the connection on J6???

I have run the GP2D12 program for the IR sensor on just about every pin and get no return data to show distance, should the programme show and return????

Your "...." is missing the important info that is related to your question. Let start out with the complete example for the GP2D12 code below,

( TAKE ANALOG IN FROM A GP2D12, AND DISPLAY INCHES
( Written by: Mike Keesling
(
( GP2D12 LINEARIZER
(
: SENSOR ADC1 ANALOGIN 8 / ; EEWORD
: FDIST S>F FNEGATE
555.4619E0 F/ FEXP 42.1806E0 F* 4.6301E0 F+ ; EEWORD
: TEST BEGIN SENSOR FDIST F. CR 10000 0 DO LOOP ?TERMINAL UNTIL ; EEWORD


: SENSOR ADC1 ANALOGIN 8 / ; EEWORD

The line is breaking down like this,
: SENSOR ( create a word called SENSOR. This is similar to function name in C, sensor(){ )

ADC1 ANALOGIN ( put on stack the raw data 16-bit reading of Analog channel 1. In the document & schematic labels ANA1 on J5 pin 4.)

8 / ( take the value on stack divides by 8 or left shifted 3-bit (n>>3) to compute only 12-bit needed by A/D and replace the stack with a new value .)

; ( mark the end for the SENSOR fuction, } )

EEWORD ( tell the IsoMax kernel to save this SENSOR funtion in the program flash memory. )


: FDIST S>F FNEGATE
555.4619E0 F/ FEXP 42.1806E0 F* 4.6301E0 F+ ; EEWORD

FDIST function do a floating point calculation on distance based on the analog reading.

: TEST BEGIN SENSOR FDIST F. CR 10000 0 DO LOOP ?TERMINAL UNTIL ; EEWORD

TEST, a loop function display the distance on the terminal


2. Does someone have a programme that indicates the IR sensor showing a return of data?

The GP2D12 example program provided is a working program. So if you have the sensor connect correctly you will get the data reading as expected.

dr who
09-29-05, 11:25 AM
Thank you for your quick response.

I will follow your directions

Thanks again

Cheers Marcel....

Dave
09-29-05, 12:19 PM
Hello Marcel,

1. An analog voltage put on an ANA pin on either J5 or J6 would be read by entering the command :
ADC0 ANALOGIN . ( reads and displays ANA0 pin
THe ADC0 directs the ServoPod-USB to look at the ANA0 which is pin 3 on J5, the ANALOGIN gets the value presented there, and the period tells the ServoPod to display that value to the terminal. If you want to read another pin, simply change the ADC0 to the pin used, like ADC8, pin 3 on J6. The ServoPod will respond with an "OK" after displaying the value.
About the GP2D12, make absolutely sure that it is getting power (+5 and ground). If you have a digital camera, you can look through the viewfinder to see that the IR LED of the sensor is on by looking directly down the sensor.

2. The above line could work, or it could be defined as a word like :
: ATEST ADC0 ANALOGIN . ;
and then sun by typing ATEST to see what a current value is. A looped word could be used as well such as :
: ANATEST BEGIN 13 EMIT ADC0 ANALOGIN . ?TERMINAL UNTIL ;
This word will run and display values until a key is pressed. To clear these words, simple switch power, or type in COLD and hit enter.

3. There are examples on the Pods Download page (http://www.newmicros.com/store/product_details/download.html) called PID Controls that does closed loop control of 2 motors, reading the assocaited quadrature decoders to regulate the PWM output for the motors.

4,. The Hall sensor appears to pull down the output, and probably should be powered by 5 volts. The Timer pins have a weak pull-up, but an external resistor pull-up should probably be used with the sensor. Essentially a 10K resistor that connects to 5 volts, an the other ned connects to the sensor output and also the Timer pin you wish to use to read the sensor. The ServoPod inputs are 5 volt tolerant, even though they operate at a 3.3 volt level.

5. The ServoPod already communicates through the USB port to a PC, but the second serial could be used for RS232 communications. If a program can be written on the PC side to accept 8 N 1 RS232 data, at the various baud rates available, then it should be able to read and even send information to the ServoPod

dr who
09-29-05, 03:52 PM
Dave

I followed the directions in your reply,
The IR has power, signal connection to J5 ADC0 pin 3,
ran the program, changed the program, ran part of the program,
what should i be seeing? all i get is "OK", is that it?

Thanks Marcel...

nmitech
09-29-05, 04:40 PM
Don't forget to invoke the word to be executed, ANATEST "enter"

Try this, Highlight and copy the code below including the extra blank line at the end just to makesure the carriage return character is copied. Then paste it to the terminal program, NMITerm. The program will download and execute automatically. You will see the ADC0 readings display numbers on the terminal until you hit any key to stop.


: ANATEST BEGIN 13 EMIT ADC0 ANALOGIN . ?TERMINAL UNTIL ;

ANATEST



It is more meaningful to use program below with your sensor connects to ADC0,

SCRUB ( erase the previous application program if present )

COLD ( clear up system ram )

: SENSOR ADC0 ANALOGIN 8 / ; EEWORD
: FDIST S>F FNEGATE
555.4619E0 F/ FEXP 42.1806E0 F* 4.6301E0 F+ ; EEWORD
: TEST BEGIN SENSOR FDIST F. CR 10000 0 DO LOOP ?TERMINAL UNTIL ; EEWORD

TEST