Sign in

username:

password:



Not a member?

Search oopic



Search tips

Subscribe to oopic



Ads

Discussion Groups

Discussion Groups | | Using ultra sonic sensor with the oopic

Using ultra sonic sensor with the oopic - James Pinner - Mar 8 0:15:37 2008

I am looking at using the oopic microprocessor with 5 to 10 Ultra sonic sensors (LV-MaxSonar-EZ4 Ultrasonic Range Finder). What I was wondering is it possible to connect this type sensor to the oopic digital I/O pins. The sensor supports PW RX, etc. How would I communicate? Would I need the expansion module to do this?

I have attached the link to data sheet
http://www.maxbotix.com/uploads/LV-MaxSonar-EZ4-Datasheet.pdf

Any help would be great and I can add any more details if needed

---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.

[Non-text portions of this message have been removed]



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )


Re: Using ultra sonic sensor with the oopic - ooPIC Tech Support - Mar 8 0:30:18 2008

The easiest way to do this is to use the analog output of the MAXSONAR
unit and trigger them in sequence so you don't have interference. The
most straightforward way is to give each SONAR its own A2D line - With
the ooPIC you can have up to 7 A2D lines. With buffer resistors from
each SONAR you might be able to connect all of them to a single A2D if
you really needed to, but you'd have to experiment with that resistor
value and how fast you could switch units.

DLC

James Pinner wrote:
> I am looking at using the oopic microprocessor with 5 to 10 Ultra sonic sensors (LV-MaxSonar-EZ4 Ultrasonic Range Finder). What I was wondering is it possible to connect this type sensor to the oopic digital I/O pins. The sensor supports PW RX, etc. How would I communicate? Would I need the expansion module to do this?
>
> I have attached the link to data sheet
> http://www.maxbotix.com/uploads/LV-MaxSonar-EZ4-Datasheet.pdf
>
> Any help would be great and I can add any more details if needed
>
>
> ---------------------------------
> Looking for last minute shopping deals? Find them fast with Yahoo! Search.
>
> [Non-text portions of this message have been removed]
>
>
>



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: Using ultra sonic sensor with the oopic - wku_mobile - Mar 8 0:47:35 2008

The sensors can't be connect to the 31 Digital I/O lines and
communicate with PW or RX?

If I was to go with the A2D lines could I add a extension module to
get more then 7 (I was thinking it was only 4)?
Is there any example code on how to program using A2D?

Thanks for your help.
--- In o...@yahoogroups.com, ooPIC Tech Support wrote:
>
> The easiest way to do this is to use the analog output of the MAXSONAR
> unit and trigger them in sequence so you don't have interference. The
> most straightforward way is to give each SONAR its own A2D line - With
> the ooPIC you can have up to 7 A2D lines. With buffer resistors from
> each SONAR you might be able to connect all of them to a single A2D if
> you really needed to, but you'd have to experiment with that resistor
> value and how fast you could switch units.
>
> DLC
>
> James Pinner wrote:
> > I am looking at using the oopic microprocessor with 5 to 10 Ultra
sonic sensors (LV-MaxSonar-EZ4 Ultrasonic Range Finder). What I was
wondering is it possible to connect this type sensor to the oopic
digital I/O pins. The sensor supports PW RX, etc. How would I
communicate? Would I need the expansion module to do this?
> >
> > I have attached the link to data sheet
> > http://www.maxbotix.com/uploads/LV-MaxSonar-EZ4-Datasheet.pdf
> >
> >
> >
> > Any help would be great and I can add any more details if needed
> >
> >
> > ---------------------------------
> > Looking for last minute shopping deals? Find them fast with
Yahoo! Search.
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> >
> >



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: Using ultra sonic sensor with the oopic - rtstofer - Mar 8 2:19:57 2008

--- In o...@yahoogroups.com, "wku_mobile" wrote:
>
> The sensors can't be connect to the 31 Digital I/O lines and
> communicate with PW or RX?

The OOPic has no decent facility for using PW and serial I/O at 9600
baud would be iffy. You are pretty close in that a message is only 5
chars and, if you looped on receiving chars you MIGHT be able to get
a good message. Serial with the OOPic is a bad idea. If you want to
try, use oSerialPort on the only hardware UART. Using oSerialL on
any (or multiple) IO line(s) is doomed to fail.

>
> If I was to go with the A2D lines could I add a extension module to
> get more then 7 (I was thinking it was only 4)?

You could add an external analog multiplexer and still use one of the
OOPic A/D inputs. Try to find one that will operate with a single
supply of 5V. This one MIGHT work:
http://www.vishay.com/docs/72552/dg406b.pdf

> Is there any example code on how to program using A2D?

Read the OOPic documentation for the oA2D (or oA2D8 or oA2D10) object.

Richard



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: Re: Using ultra sonic sensor with the oopic - ooPIC Tech Support - Mar 8 11:24:58 2008

There are 7 A2D lines on the ooPIC - The ooPIC R and ooPIC C use the
upper 3 for LEDs and buttons but the ooPIC S has all of them available.
The ooPIC does not read PW well and serial I/O is not its strong suit.
I've used the MAXSONAR units on other micros and there too I used the
A2D as the simplest way to get the data from multiple units.

DLC

wku_mobile wrote:
> The sensors can't be connect to the 31 Digital I/O lines and
> communicate with PW or RX?
>
> If I was to go with the A2D lines could I add a extension module to
> get more then 7 (I was thinking it was only 4)?
> Is there any example code on how to program using A2D?
>
> Thanks for your help.
> --- In o...@yahoogroups.com, ooPIC Tech Support wrote:
>
>> The easiest way to do this is to use the analog output of the MAXSONAR
>> unit and trigger them in sequence so you don't have interference. The
>> most straightforward way is to give each SONAR its own A2D line - With
>> the ooPIC you can have up to 7 A2D lines. With buffer resistors from
>> each SONAR you might be able to connect all of them to a single A2D if
>> you really needed to, but you'd have to experiment with that resistor
>> value and how fast you could switch units.
>>
>> DLC
>>
>> James Pinner wrote:
>>
>>> I am looking at using the oopic microprocessor with 5 to 10 Ultra
>>>
> sonic sensors (LV-MaxSonar-EZ4 Ultrasonic Range Finder). What I was
> wondering is it possible to connect this type sensor to the oopic
> digital I/O pins. The sensor supports PW RX, etc. How would I
> communicate? Would I need the expansion module to do this?
>
>>> I have attached the link to data sheet
>>> http://www.maxbotix.com/uploads/LV-MaxSonar-EZ4-Datasheet.pdf
>>>
>>>
>>>
>>> Any help would be great and I can add any more details if needed
>>>
>>>
>>> ---------------------------------
>>> Looking for last minute shopping deals? Find them fast with
>>>
> Yahoo! Search.
>
>>> [Non-text portions of this message have been removed]
>>>
>>>
>>>
>>>
>>>



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: Re: Using ultra sonic sensor with the oopic - Brian Lloyd - Mar 8 13:13:54 2008


On Mar 7, 2008, at 11:11 PM, rtstofer wrote:

> --- In o...@yahoogroups.com, "wku_mobile" wrote:
>>
>> The sensors can't be connect to the 31 Digital I/O lines and
>> communicate with PW or RX?
>
> The OOPic has no decent facility for using PW and serial I/O at 9600
> baud would be iffy.

I am not doubting you but that implies that the oSonarDV and/or=20=20
oFeedBack1T objects don't work very well. (Actually we are only=20=20
talking about oFeedBack1T as that is the underlying object for=20=20
oSonarDV.) Or am I misreading your comment?

--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

=20

=20


(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: Using ultra sonic sensor with the oopic - rtstofer - Mar 8 13:37:20 2008

--- In o...@yahoogroups.com, Brian Lloyd wrote:
> On Mar 7, 2008, at 11:11 PM, rtstofer wrote:
>
> > --- In o...@yahoogroups.com, "wku_mobile" wrote:
> >>
> >> The sensors can't be connect to the 31 Digital I/O lines and
> >> communicate with PW or RX?
> >
> > The OOPic has no decent facility for using PW and serial I/O at
9600
> > baud would be iffy.
>
> I am not doubting you but that implies that the oSonarDV and/or
> oFeedBack1T objects don't work very well. (Actually we are only
> talking about oFeedBack1T as that is the underlying object for
> oSonarDV.) Or am I misreading your comment?
>
> --
>
> Brian Lloyd Granite Bay Montessori
> brian AT gbmontessori DOT com 9330 Sierra College Blvd.
> +1.916.367.2131 (voice) Roseville, CA 95661, USA
> http://www.gbmontessori.com
You should doubt me! That object certainly wasn't documented with V5
and B.2.2 although it says it has been available since B.1.
Considering the number of times this has come up, I am surprised it
wasn't mentioned earlier.

Maybe V6 is what makes it available in B.2.2. In any event, I
haven't moved to V6 or C.1.1 and don't plan to do so any time soon.

But it is good to know that the OOPic can handle the Parallax PING
sensor.

Richard



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: Re: Using ultra sonic sensor with the oopic - Brian Lloyd - Mar 8 13:54:20 2008

>> I am not doubting you but that implies that the oSonarDV and/or
>> oFeedBack1T objects don't work very well. (Actually we are only
>> talking about oFeedBack1T as that is the underlying object for
>> oSonarDV.) Or am I misreading your comment?
>>
> You should doubt me! That object certainly wasn't documented with V5
> and B.2.2 although it says it has been available since B.1.
> Considering the number of times this has come up, I am surprised it
> wasn't mentioned earlier.

Hmm. It is amazing what you can learn when you read through the=20=20
documentation. More than once I have convinced people of my technical=20=20
omnipotence simply by reading the manual beforehand. ;-)

> Maybe V6 is what makes it available in B.2.2. In any event, I
> haven't moved to V6 or C.1.1 and don't plan to do so any time soon.

Maybe you can enlighten me as to why I should be using the V5 compiler=20=20
instead of the V6? Since I had no feedback other than Dan Michaels of=20=20
Oricomtech saying something like V5 was better documented and had=20=20
better examples, I ended up just using the V6 compiler.

> But it is good to know that the OOPic can handle the Parallax PING
> sensor.

Not sure it can. It assumes that there are two I/O lines, one for the=20=20
ping and one for the echo. Not sure if you can use the same line for=20=20
both. You would probably have to try it out.

--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

=20

=20


(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: Using ultra sonic sensor with the oopic - rtstofer - Mar 8 14:40:22 2008

> Maybe you can enlighten me as to why I should be using the V5
compiler
> instead of the V6? Since I had no feedback other than Dan Michaels
of
> Oricomtech saying something like V5 was better documented and had
> better examples, I ended up just using the V6 compiler.

I haven't heard from Dan lately. I hope all is well!

V6 spent years in beta. There are two ways to look at that: first,
the compiler is perfect or, second, it wasn't a priority. Well, we
know it isn't perfect. I guess I just got put off by the amount of
time it spent in beta with no apparent effort to move it forward.

OTOH, V5 with all its' warts is a known quantity. It has been around
since Win95 and, while it lacks the newer objects, it is a lot more
stable.

I haven't spent ANY time looking at the new objects because I don't
plan to upgrade to V6 any time soon. Maybe if I did some reading, I
would get motivated. Or not... It's frustrating when things don't
work. oEvents comes to mind.

>
> > But it is good to know that the OOPic can handle the Parallax PING
> > sensor.
>
> Not sure it can. It assumes that there are two I/O lines, one for
the
> ping and one for the echo. Not sure if you can use the same line
for
> both. You would probably have to try it out.

I don't have the sonar device and there could be issues with the two
pin approach. Ordinarily, I would solve that by using either one pin
or at least turning the output pin into an input so it would float
when not pinging. But I have no idea how it is actually
implemented.

Richard



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: Re: Using ultra sonic sensor with the oopic - Brian Lloyd - Mar 8 14:52:56 2008


On Mar 8, 2008, at 11:20 AM, rtstofer wrote:

>> Maybe you can enlighten me as to why I should be using the V5
> compiler
>> instead of the V6? Since I had no feedback other than Dan Michaels
> of
>> Oricomtech saying something like V5 was better documented and had
>> better examples, I ended up just using the V6 compiler.
>
> I haven't heard from Dan lately. I hope all is well!

Last I talked to him he was experimenting with more powerful processors.

> V6 spent years in beta. There are two ways to look at that: first,
> the compiler is perfect or, second, it wasn't a priority. Well, we
> know it isn't perfect. I guess I just got put off by the amount of
> time it spent in beta with no apparent effort to move it forward.
>
> OTOH, V5 with all its' warts is a known quantity. It has been around
> since Win95 and, while it lacks the newer objects, it is a lot more
> stable.
>
> I haven't spent ANY time looking at the new objects because I don't
> plan to upgrade to V6 any time soon. Maybe if I did some reading, I
> would get motivated. Or not... It's frustrating when things don't
> work. oEvents comes to mind.

Yes, I agree. I tend to be a real stickler about reliable tools. Ever=20=20
since I started doing serious development back in 1980 I have focused=20=20
on reliable, stable tools. My first real experience was the Microsoft=20=20
Pascal compiler. (Pre MS-DOS if you can imagine that.) The damned=20=20
thing would get into some state where it assumed that the content of=20=20
the processor's register set had not changed across a subroutine call.=20=20
The result was bizarre results. One would go over one's code and not=20=20
see the logic error. One would insert some debug statements and=20=20
everything would work fine. One would remove the debug statements and=20=20
the code would go to hell again. I finally documented the behavior by=20=20
disassembling the code generated by the compiler and sending it to=20=20
them. They continued to deny there was a problem. It was at that time=20=20
I realized that I really didn't want anything from Microsoft. So far=20=20
they have managed to maintain my faith in them.
>> Not sure it can. It assumes that there are two I/O lines, one for
> the
>> ping and one for the echo. Not sure if you can use the same line
> for
>> both. You would probably have to try it out.
>
> I don't have the sonar device and there could be issues with the two
> pin approach. Ordinarily, I would solve that by using either one pin
> or at least turning the output pin into an input so it would float
> when not pinging. But I have no idea how it is actually
> implemented.

That makes sense. Also, the SRF-05 has a three-pin mode which combines=20=20
the ping input and the echo output so it is hardware compatible with=20=20
the Parallax PING(((.

--

Brian Lloyd Granite Bay Montessori
brian AT gbmontessori DOT com 9330 Sierra College Blvd.
+1.916.367.2131 (voice) Roseville, CA 95661, USA
http://www.gbmontessori.com

I fly because it releases my mind from the tyranny of petty things . . .
=97 Antoine de Saint-Exup=E9ry

PGP key ID: 12095C52A32A1B6C
PGP key fingerprint: 3B1D BA11 4913 3254 B6E0 CC09 1209 5C52 A32A 1B6C

=20

=20


(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )

Re: Using ultra sonic sensor with the oopic - dan michaels - Mar 8 15:57:54 2008

--- In o...@yahoogroups.com, "rtstofer" wrote:
>
> > Maybe you can enlighten me as to why I should be using the V5
> compiler instead of the V6? Since I had no feedback other than Dan
Michaels of Oricomtech saying something like V5 was better
documented and had better examples, I ended up just using the V6
compiler.
>
That comment was a few months ago. Maybe the online manual is all
updated now.
> I haven't heard from Dan lately. I hope all is well!
>
Depends on which bush you look behind.
> V6 spent years in beta. There are two ways to look at that: first,
> the compiler is perfect or, second, it wasn't a priority. Well, we
> know it isn't perfect. I guess I just got put off by the amount of
> time it spent in beta with no apparent effort to move it forward.
>
> OTOH, V5 with all its' warts is a known quantity. It has been
around since Win95 and, while it lacks the newer objects, it is a lot
more stable.
>
> I haven't spent ANY time looking at the new objects because I don't
> plan to upgrade to V6 any time soon. Maybe if I did some reading,
I would get motivated. Or not... It's frustrating when things don't
> work. oEvents comes to mind.
>
> >
> > > But it is good to know that the OOPic can handle the Parallax
PING sensor.
> >
> > Not sure it can. It assumes that there are two I/O lines, one for
> the ping and one for the echo. Not sure if you can use the same
line for both. You would probably have to try it out.
>
I use the Ping with my bot that has a Basic Stamp on it, and it works
fine there. One i/o line is used for triggering and outputting.
However, the Ping requires measuring pulsewidths down to microsecond
resolution, and the oopic isn't great for this.

However, I much prefer the Ping to the SRF0x devices, as I found them
to have bad sidelobe pickup. I haven't tried the Maxsonar that Dennis
mentioned, although I have a couple in the box now.

> I don't have the sonar device and there could be issues with the
two pin approach. Ordinarily, I would solve that by using either one
pin or at least turning the output pin into an input so it would
float when not pinging. But I have no idea how it is actually
> implemented.
>
> Richard
>
It should be possible to connect 2 I/O pins to a device like the Ping
that uses just one line for both I and O, by connecting them together
using a 1K or so series resistor, and connecting the remote device to
the Input line. This is how a lot of SPI devices are interfaced. Most
device output pins should be able to drive a 1K load.
- dan michaels
www.oricomtech.com
--- OOBOT40 Boards ---
========================



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )