Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Looking for help with a "Selecting" function

For general discussion related FlowStone

Looking for help with a "Selecting" function

Postby machinist » Wed Oct 19, 2011 7:47 pm

Hi again,

As you can probably tell by now, I have issues with many things. So lets start with the good.

-Phidgets connects wirelessly over network and correctly initializes sensors
-Motor control is working and tuned to compensate for any physical mis-alignments
-Webcam is correctly identifying colors and tracking effectively.

That being said, due to hardware limitations, the webcam does not wirelessly interface.

This Robot is being built to be used as a demonstration in a fast approaching Hobby Expo to show how anyone can use off the shelf electronics, sensors, motors, drivers, and inexpensive/free software to create robots. The total cost of this robot is sub $300 including webcam, wireless network USB hub, and all other electronics in an effort to show that custom built robots can be just as advanced as the lego mindstorms kits, more robust, larger, and more powerful for a similar budget.

My problem comes from the fact that my webcam doesnt interface wirelessly due to hardware constraints of the wireless USB hub. Instead I plan to use "VEX" line sensors and processing the analog input through the phidgets board to create Boolean true/false. Is there a way to create a "SELECT CASE" type function as used in the BASIC language? I'd like to take my 3 inputs, create a binary stream and then be able to distinguish from the string which sensors see the line and what the action would be. values would be as follows:

"010" centered on line
"100" left sensor sees line
"001" right sensor sees line

as well and "011" and "110" for partial one way or the other. I know I can make a bunch of blocks with various logic gates to determine the values but if there is a way to make these "strings" of data and process them without all of the gates that would be nice. Too many blocks and gates etc make the program very complicated to look at and might overwhelm interested visitors at our booth to the potential of this software/hardware interface in favor of the less complex LEGO Mindstorms NXT system.

Thank you
machinist
 
Posts: 11
Joined: Tue Oct 11, 2011 2:07 am

Re: Looking for help with a "Selecting" function

Postby Embedded » Thu Oct 20, 2011 2:58 pm

This is just up my street! I love making things out of junk and have been also thinking about making low costs systems for education that beat the Lego stuff.

Here's my idea: The XBug!

Very similar to what you are doing only hack an Xbox wireless controller instead of the Phidgets and the wireless USB.

XBugLR.jpg
XBugLR.jpg (77.39 KiB) Viewed 24320 times


Why:

1) The Xbox Controller is very cheap for a wireless one you can pick them up off ebay for around $40.00 USD
2) it is a DAQ something like 10 Digital Ins and 6 Analogue ins + 2 Analogue outs
3) It has two motors & controllers built in already (used for the vibrators). these can easily be connected to wheels!
4) It's wireless up to 30ft!
5) It's fully supported in FlowStone

Not bad for 40 bucks!

So you should be able to make an Xbug with a couple of Sharp distance sensors and bump sensors for a little over $100.

Maybe there could be a Xbug X-games where schools can go head to head in a competition!
Embedded
 
Posts: 143
Joined: Sat Oct 30, 2010 1:42 pm

Re: Looking for help with a "Selecting" function

Postby machinist » Thu Oct 20, 2011 4:49 pm

I like this idea alot. Its very simple and it has the "Hacker" side of things. I also just settled for making my own selector that uses busses and alot of logic gates to ultimately come up with all the possible configurations of the robot. more complex than I wanted but i made them into modules so the main flowchart/program looks pretty simple. i essentially created the 010,001,100,011,110,111 to each have a correlating output that flows through the PID loop to smooth the output and prevent oscillation into the motor controller. I just need to fine tune and it will serve its purpose excellent. I'll have to look into the X-Box controller too. I like that option as well for the inexpensive side of things. My robot is rather large right now but I think with careful component selection I can get it to a form-factor more suitable to line following. The platform right now will be converted to a more rugged off road base to ultimately work as a robo-magellan robot to compete in the Midwest SRS Robomagellan contest held annually through my club. I'm programming illiterate for the most part and have always had a fondness for the graphical languages. I can write in BASIC and interpret C and Dynamic C(Rabbit Semiconductor) to see what the program is doing but not really write it. The Flowstone software though lets me do advanced processes with pictures and lines and not worry if i need a parentheses here or there to function correctly. Plus, it appeals to other people who are in the same boat as me. It would be great to see more people involved in it and things like flowstone take the legwork out of needing formal training to get things to work. Mindstorms is excellent for people starting out, but when you want more customized, specialized, and in my opinion powerful robots, this is the way to go. A friend of mine through robotics, who does wonders with LEGO MINDSTORMS, would argue all of those points, but he also has been a consultant for LEGO, and his robots go so far above and beyond what any normal hobbyist can do with LEGO's that it is mind boggling, he also though, doesnt use the included software and writes in one of the other traditional languages that can be used with the LEGO processor. His stuff can be seen at teamhassenplug.com

Overall, Flowstone has really helped this project take shape quickly and I'm very interested to continue testing it out.
machinist
 
Posts: 11
Joined: Tue Oct 11, 2011 2:07 am

Re: Looking for help with a "Selecting" function

Postby Embedded » Thu Oct 20, 2011 5:23 pm

Glad you liked the XBug idea!

Just realised what you were asking help for!

Maybe this will simplify things for your line follower:
Attachments
Line Follower.fsm
(9.03 KiB) Downloaded 1273 times
Embedded
 
Posts: 143
Joined: Sat Oct 30, 2010 1:42 pm

Re: Looking for help with a "Selecting" function

Postby Embedded » Fri Oct 21, 2011 4:23 pm

The bits arrived this morning for the XBug!

BitsSLR.jpg
BitsSLR.jpg (157.06 KiB) Viewed 24310 times


Here's the finished thing:

XBug FrontSLR.jpg
XBug FrontSLR.jpg (153.83 KiB) Viewed 24310 times


XBugTopSLR.jpg
XBugTopSLR.jpg (219.56 KiB) Viewed 24310 times


No had chance to test it yet with FlowStone as I'm waiting for the Xbox receiver (I thought it was Blue Tooth but it's not).
Embedded
 
Posts: 143
Joined: Sat Oct 30, 2010 1:42 pm

Re: Looking for help with a "Selecting" function

Postby fixstuff555 » Sat Oct 22, 2011 2:36 am

I'm really glad you built something like this! It's just what I was talking about in this post from May:

http://www.dsprobotics.com/support/viewtopic.php?f=2&t=215&p=531&hilit=xbox#p531

I think there is an incredible amount of small little applications like this using the Xbox controller hardware.
fixstuff555
 
Posts: 151
Joined: Thu Oct 21, 2010 3:24 pm

Re: Looking for help with a "Selecting" function

Postby machinist » Tue Oct 25, 2011 5:51 pm

That is really cool. The Linefollower went off without a hitch. I talked to about 50 people (dads with children count as 1 person) about the project after the demo and I'll be doing a presentation at a club meeting in the near future regarding implementing Flowstone (A very high level language compared to assembly or basic) with numerous external hardware examples into a very sophisticated robot requiring little down and dirty development time required for typical microcontroller based robots. I also am scaling this project up significantly to be used as a SRS Robomagellan platform. Plans include a 2WD differentially driven front section and a 2 Wheel trailer to carry the electronics. Implementing Navigation algorithms to navigate waypoints containing Orange Construction Cones, Vision Processing to locate the cones, environmental sensors to avoid obstacles and motor control fundamentals. This will be accomplished with BaneBots P60 Planetary Gearhead motors 132:1 Mathmatically outputting over 4000Oz-in of torque to drive 10 inch modified pneumatic wheels via chain and sprocket for an additional 2:1 speed reduction/torque increase, Dimension Engineering 25Amp Dual H-Bridge controlled Via RS232 interface, A Basic Stamp 2 that will control/interpret Sonar Sensors relayed back to the Phidgets 888 I/O board - phidgets board programming would be too complex to ping and receive the signals from the Sonar and latency might be an issue. I will set a threshold where the sensor shows an object as too close and then execute a avoidance algorithm. The Phidgets board will handle the bumper sensors. Also, I may implement a Light Sensor to detect brightness and used to calibrate the camera settings for color detection. The Image Processing will be done directly in flowstone. Ideally, a low cost Digital Camcorder will be the camera for better resolution and the ability to easily add various UV and polarizing filters to make outdoor sunlight filtering possible but the feasibility of directly porting it to flowstone is untested. Onboard computer will initially be a laptop but might become a small formfactor PC.

First step is to build the chassis, the wheels have been modified and hubs made on my lathe, shafts installed, tomorrow the motors and controller arrive. The Axles have been mounted on the frame and trued to alignment, this way, if there is any discrepancy in motor speed, I can adjust it via programming. Overall size is around 3.5 feet long and 2 feet wide. Rules state robots must be 4X4X4 feet. The cameral and GPS antenna will be mounted at 4 feet, the compass will get mounted in the trailer to isolate from motor noise. The sonar module is in last stages of construction. Assuming the chassis is completed by the end of the week or next week, I have about 48 weeks until the competition.
machinist
 
Posts: 11
Joined: Tue Oct 11, 2011 2:07 am

Re: Looking for help with a "Selecting" function

Postby Embedded » Wed Oct 26, 2011 11:17 pm

Wow that sounds like serious stuff! Let me know if you need any FlowStone software help?

What would be really cool for your project is the new Ximea CURRERA-R camera with built in embedded PC:

Currera CameraLR.jpg
Currera CameraLR.jpg (76.36 KiB) Viewed 24292 times


Yes this is a hires camera with a windows embedded PC built in, now supported by FlowStone :)

Also I managed to test my XBug today, it needed different motors and wheels but now works a treat!

I've had it roving around the kitchen autonomously and also line following - cool

XBugBot1.jpg
XBugBot1.jpg (67.7 KiB) Viewed 24292 times



XBugBot2.jpg
XBugBot2.jpg (67.51 KiB) Viewed 24292 times
Embedded
 
Posts: 143
Joined: Sat Oct 30, 2010 1:42 pm


Return to General

Who is online

Users browsing this forum: No registered users and 77 guests