PEKBot
JohnBF
Posts: 107
I was going to re-make a BoeBot with the Propeller Proto Board - the holes match up and all. But at the last minute I changed my mind. Who wants to solder everything in? All the fun is configuring, and re-configuring, and then changing everything all over again, particularly with the huge possibilities of the propeller chip. So I used the PE Kit instead.·I added a 9-volt battery to keep the chip power separate from the servos, added power switches and voila:·a PEKBot!·The PE Kit breadboards are held in place by friction·with a balsa enclosure, so I can reuse them again eventually.
Terrific fun with all kinds of different things going on at once!
/John
Terrific fun with all kinds of different things going on at once!
/John
Comments
http://forums.parallax.com/forums/default.aspx?m=174955&f=21&p=1#m175109
What kind of sensors do you plan on using?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
Would you like some object following code for it? It's got some useful Spin objects for speaker, servos, IR detection, and PID.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Andy
<Edit>
Modified source code was moved two posts down - here is the link: PE Kit Following Bot Source.
Vidoe clip is still here.
</Edit>
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Post Edited (Andy Lindsay (Parallax)) : 3/1/2007 9:05:21 PM GMT
Now I need to avoid the temptation to just download your code to the Bot, adjust the pin constants and circuits and have fun with it. I've found that when I do that I'm just renting the ideas. I don't really own the concepts until I build things from scratch. Well, maybe I'll do it the easy way just for a bit.
/John
Yeah, I know what you mean about owning the concept. You'll undoubtedly start working from the ground up after taking it for a spin. Also, a lot of the cog counter module techniques the objects use will be introduced in the forthcoming PE Kit Counters labs.
IMPORTANT: I posted a copy of the source code here with some more comments. The top file is "PID Following Propeller Bot.spin". Open·it and start reading the comments·from the beginning of the file. The top file's PUB init block also has comments on how each object gets initialized, and the main block has comments that explain the relation ship between the distance measurements and the servo outputs.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Post Edited (Andy Lindsay (Parallax)) : 3/1/2007 9:04:51 PM GMT
And the video very clearly·demonstrates·the difference in quality and smoothness of control with the PID.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Stan Dobrowski
Post Edited (Stan671) : 3/2/2007 2:44:38 AM GMT
I am trying to come up with something based on the Nuts and Volts Balancing Bot article, but using linear accelerometers instead of the angular tilt sensors. I am thinking if its possible to use the ADC program from the object exchange to read an analog voltage from the accelerometer. Any luck? It is just a project on the side for now. How far are you with the PID control, and/or the rest of the robot?
Well I won't know until I start building, but as far as I've been able to tell, hobbyist-level accelerometers have too much of a lag to keep the body stable.
The 'right' way seems to be to use an accelerometer to get a normal force vector, use atan2 to turn that into an angle, and combine that with angular velocity readings off a gyroscope. The most popular way to do that is a Kalman filter. While I understand how to use one, I won't claim that I have a firm grasp on what it's actually doing.
Once you figure out the angle, you compare it to what it "should" be, and use the PID control to minimize the difference. PIDs are way easier than they sound; the only hard part should be doing it without floating point math.
That's my plan too. It's made very easy by the low sample rates we're talking about (most of the people doing ADC are taking thousands of samples per second, and I only need a couple hundred.)
Since I'm prototyping it all on a solderless breadboard, I'm interested to know whether i can get decent ADC readings with that. Someone in an old analog thread mentioned getting it to work, but was a little hazy on the details.
After I get the darn thing to stand up, then I get to have fun adding a remote control, collision sensors, etc. It's a hobby and a learning process
PID has two generally accepted meanings: 1) Pelvic Inflammatory Disease-- not a fit subject for this forum, as in "Copper Seven"- IUD.
2) "Proportional band - Integral - Derivative" http://www.expertune.com/tutor.html
~~Brian
There's an example in·a post in this thread with the timestamp: Posted 3/1/2007 12:59 PM (GMT -7).
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
~~Brian
~~Brian
This method aught to do it (below).· Just add it to the PID object, maybe as the second method.· The object calling the method could use a command like pid.spNew(26.5) to update the set point.· Or, substitute a variable that·stores a floating point value in place of the 26.5 floating point constant.
BTW, what this does is copies the·method's·newSetPoint parameter (a local variable) to the PID object's sp global variable that gets used in the PID calculations.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Post Edited (Andy Lindsay (Parallax)) : 3/28/2007 10:40:46 PM GMT
~~Brian
http://forums.parallax.com/forums/default.aspx?f=21&m=162898
I replaced the BS2 with a propeller protoboard and very quickly got the bot to balance using the Ping))) sensor just like it did with the BS2. I then added two memsic 2125 accelerometers (one at the top and one at the bottom of the chassis) and an ADXRS300 rate gyro.
I then took the Parallax mini USB cable out of it's housing to make a very thin, very flexible wired connection to my PC and I am using PLX-DAQ to dump sensor readings to an Excel spreadsheet.
My strategy is to look at the accelerometer and gyro readings while the bot is actually balancing to develop strategies for getting the bot to balance with an accelerometer and gyro.
So far the data is interesting and I've got some ideas, but I have not tried to implement them yet. I'm trying to be patient and collect really good data first.
I'd be happy to post the spin code I'm using if anyone would like to take a look, but this is still very much a work in progress.
/John
I really wish someone would make a memsic-2125-style breakout board for the new generation of serial gyros; it would save me a ton of complexity.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Post Edited (Andy Lindsay (Parallax)) : 8/24/2010 6:40:26 PM GMT
I noticed while updating the PID·object that it already has an update method.· You can use that to update any of the parameters you initialize (including set point).· Best thing to do is open the PID object, then view it in documentation mode by clicking Propeller Tool's Documentation button.· The info for that method will be visible.
Andy
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Please show by picture or drawing how the prop circuit board is attached to the Boe-Bot robot chassis and also the lay-out of the wiring so I can duplicate the design shown in the clip. I have just purchased two Bot’s to use with the prop.
Thanks Jim
For mounting the board, you will need a rectangle the size of the PE Platform with counter sinked holes for four 4-40 3/8" flathead screws. Use the material of your choice (I prefer 3/16" plexiglass.) The outline of the square will depend on whether you want two or three breadboards. Two breadboards would be 4 4/10" X 3 2/10", three would be 6 4/10" X 3 2/10". Drill 4 holes in the center per the Board of Education Manual's mechanical drawing. That's four .125" holes with centers on 3.7" X 2.75".
For the wiring not covered by the schematic in the object example code, see the PE Kit Packaging, which is available from the Propeller Education Kit product page.
Make sure to put the 4/40 screws through your mounting board before removing the waxpaper from the adhesive under the breadbaords and affixing them.
Andy
P.S. If this is a 1-off and you want to use two breadboards, I can arrange to send you a scrap Board of Education PCB. That's what I use on my PEKbot (see attached).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Post Edited (Andy Lindsay (Parallax)) : 5/10/2007 9:14:30 PM GMT
Thank you so much. I can’t wait to get started. I have compiled all of your PE documentation as well as many of the books you have written. I am truly a fan of your work. I don’t know where you find the time to produce the quantity of work that you do.
I was going to skip the Boe-Bot after the Prop came into existence because the Prop is more challenging than the Stamp but now I will be able to do both the Bot and the Prop.
Thank you for the offer of the circuit board, but I have collected so much Parallax hardware that I should be OK.
Final thought: If I mount a stuffed animal on the Boe-Bot, what will our miniature Australian Shepherd think of the robot’s behavior. Time will tell.
Thanks again, Jim
What do you mean about PID ?
dro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
in medio virtus
Wow, thank you, those are high compliments indeed!
We shall look forward to a clip your Aussi Shepherd herding the PEKbot. Our cats get rather indignant whenever my PEKbot starts to follow them around.
inservi,
PID means Proportional, Integral, Derivative control. Here's a link to an explanation:
http://forums.parallax.com/showthread.php?p=529609
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andy Lindsay
Education Department
Parallax, Inc.
Post Edited (Andy Lindsay (Parallax)) : 8/24/2010 6:40:59 PM GMT