PDA

View Full Version : help with phidget 8/8/8 and EZ1 sensors



rbhutani
05-27-2008, 04:12 AM
Hi!!
I am working with phidget 8/8/8 interface kit and EZ1 sonar sensors. Intially I need to prepare a board with just 4 of those sensors and test a simple firing pattern. I was looking for the stuff on net. Found about how to connect the sensors and use the software available on the phidgets.com to toggle with them.
I am really new to them and I dont have any idea how to run those sensors in a simple DEFINED pattern. I mean how can I control the firing delays and record my inputs.
If would be really kind of you if you can let me know how to program(in c++) that or may be use an interface software for the initial testing to control the firings of the sensors. I have had looked on the available stuff on phidget.com like programming manuals but I am unable to implement that stuff for the firing of diff sensors.
I know I am sounding like a complete noobie but I would really appreciate any help.


Thanks and regards

Rohit:happy:

Alex
05-28-2008, 09:04 AM
I'm not sure about the programming itself, but I think Dave might be able to help you out with the logic. I'll give him a holler and have him chime in on this thread.

Dave
05-28-2008, 11:59 AM
Welcome to the TRC, Rohit :)

Using multiple MaxSonar sensors is pretty simple, but not totally straightforward. Connect the +5V, ground, and analog pins on the EZ to the corresponding wires on a Phidget analog cable, just like you would with any analog sensor. If you only needed to use one sensor, you could stop right here.

Since you're using multiple sensors, you'll need to switch them on and off in sequence so they don't interfere with each other. To do this, run a wire from the RX pin on the EZ to a digital output on the 8/8/8. When the digital output is on, the sensor will take continuous range measurements. When the digital output is off, the sensor will hold until the pin is brought high again.

It's worth noting here that switching the sensor on and off via the RX pin does not completely shut the sensor off. This is important, because when the sensor is powered down, it looses its calibration and has to run through a recalibration routine when it's powered back up. This takes about a half second and can screw up your distance accuracy if there's an object near the sensor while it's calibrating.

To test this out, you can use the software examples that Phidgets provides. If you're using Windows, then you can launch test applications from the Phidgets Control Pannel (double click the "Ph" icon in your taskbar's system tray).

Phidgets downloads:
http://www.phidgets.com/downloads_sections.php

LinuxGuy
05-28-2008, 08:16 PM
Since you're using multiple sensors, you'll need to switch them on and off in sequence so they don't interfere with each other. To do this, run a wire from the RX pin on the EZ to a digital output on the 8/8/8. When the digital output is on, the sensor will take continuous range measurements. When the digital output is off, the sensor will hold until the pin is brought high again.
Another way that would make sequencing the sensors easier would be to use a 3 to 8 or 4 to 16 decoder/demux. That way you only use 3 GPIOs for 8 or 4 GPIOs for 16 sensors. I'm not familiar with the EZ series sensors, so am not sure it would work. If it would work though, it would allow more to be done with fewer GPIOs.

I need to check into these EZ series sensors more. They look real interesting.

8-Dale

rbhutani
05-29-2008, 01:24 AM
Thank you all for the replies:happy:
@Dave - Wel i connected the sensors successfully to the phidget and was able to toggle with them from the test application provided for the windows via the digital outputs. But I cannot sequence their timing widout a program. Earlier I was using SRF04 sensors with a mavric II board and they worked well with a code in AVR Studio. I just had to provide a sequence to the PORT to which they were connected. Bitwise operators worked wel for them. A simple statement like PORTA |=0x0004 solved my problem.
Now with the change in the sensors I am unable to do such things with the interface kit. If you could help me with a subroutine that can handle that I would really appreciate that.
I am new to programming and I was programming in C++ using Turbo c++. I looked at the interface kit example on the site. I compiled that example in my compiler but it gave me an error
"error including "..\..\.. phidget21.h" " although the path was correct and I had also copied the file in the include directory too. But it did not work. are there any problems due the fact that I am working in windows?

@robotguy- yes using a GPIO seems to be an option but I am stil curious that if this thing can be done using only an interface kit.

Thanx once again for your replies

fitchett
05-29-2008, 11:24 AM
Where did you get Phidget21.h from? A lot of people will go get it directly from the Linux Source download, and that is not what you want to do. You can download it from here -

http://www.phidgets.com/downloads.php?example_id=17

Chester

rbhutani
05-30-2008, 12:53 AM
hello chester!! thanx for your reply.. ya i got it from this same link.... bt stil the same prob..

Rohit

rbhutani
06-11-2008, 01:15 AM
Hi all!!!
Well I started working in Ubuntu and learned it a bit and I finally managed to run 4 sensors via a code in C.
Thanks a lot to all for your help!!

Alex
06-11-2008, 11:11 AM
Great to hear rbhutani!

This would be an excellent tutorial if you didn't mind putting one together! There are sooo many people who are completely lost when it comes to getting Phidgets up and running in a Linux environment.

http://forums.trossenrobotics.com/forumdisplay.php?f=119

(for writing a draft, go here (http://forums.trossenrobotics.com/forumdisplay.php?f=120))

rbhutani
06-12-2008, 01:08 AM
Yup definately I will try to write a good draft. It could be of help to others. I will be posting it after the weekend :)


Regards

Rohit

Alex
06-19-2008, 12:02 PM
Any word on the tutorial? I'd love to check that out:D

Wingzero01w
06-20-2008, 03:07 AM
At least this spam is kind of decent... i forgot all about the upcoming WOW tournament =/. But still, its pretty annoying.

Alex
06-20-2008, 10:44 AM
I took care of the spammer and banned him/her:D For future reference though, there is no need to reply to a thread about the spam, because it will be deleted as soon as I am notified about it, thus leaving people reading a thread (after post is removed) scratching their heads like WTF is going on??

The quicker I'm notified about a spam post, the quicker the spam is gone and the guilty spammer is banned:) Reporting posts as spam is really easy, all you have to do is click the report post as spam button (http://forums.trossenrobotics.com/ambience/buttons/report.gif) at the top of the post.

Adrenalynn
06-20-2008, 11:42 AM
I have a twitch response for that button. :)

I don't know if it helps, but I go to the user's page, do a statistics, then copy the link to all his posts (see all posts by ____), and paste that in the report. My hope is that it helps you clean 'em with less effort.

Alex
06-20-2008, 11:46 AM
Actually, in the backend, it's really simple, so long as someone notifies me:)

All I do, is select the post, then on the next page there is a checkbox to delete all posts by that user and to ban him/her.

Adrenalynn
06-20-2008, 11:56 AM
Oh cool! I'll stop doing the extra work, then. :)

rbhutani
06-22-2008, 04:33 PM
hey!! hi to all!!
I am sorry for not posting the tutorial till now... Actually I am a student on an internship in Spain and I am from India. I am working here on these Phidgets and Ez1 sensors. So I am like doing the work whatever is assigned to me and trying to visit as much europe as I can on the weekends :P
From my guide at Internship I have now taken a whole week for writing down all what I have learned about these phidgets and sensors.
I will work on it and post it here as soon as possible.Actually I am thinking of using a wikispace to write on it for my future refernce. So I will either write a draft here or provide a link.

So dont mind and give mesome time to post it.[:)]

Gracias
Rohit

rbhutani
07-01-2008, 01:30 AM
Hi!!

I have posted a small tutorial about how I approached the things. It may not be fully correct but it worked well for me. Let me know of any changes or blunders :p


Rohit

Alex
07-01-2008, 12:04 PM
Links help:p

http://forums.trossenrobotics.com/showthread.php?p=13148#post13148

The drafts section doesn't show up anywhere else in the community, so people really won't know about it, unless they go into that forum and see it.

Anyways, I'm digging in and checking it out now. So far it looks great:D