Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: Half Shell on November 03, 2007, 11:36:52 PM

Title: Puppy-bot
Post by: Half Shell on November 03, 2007, 11:36:52 PM
Hey guys, I'm currently designing/building a small home based robot that will move around my room and navigate around the many objects I have stored in here. The idea is to create a quasi-pet for my dorm room and use it as a small robot to test some behavior algorithm ideas I have. I call it puppy-bot (mostly because of an inside joke with one of my robot building housemates).

I bought a cheap remote control car and am using that as the chassis - it's a pretty simple and cheap base but it works decently well. I'm running the drive motors off of an a TI SN7544 H bridge and the smaller dc motor that turns the front wheels is ran directly by my microcontroller. For this project I'm using Arduino to run everything.

This weekend I managed to get the motors to be controlled by Arduino but now I'm making plans to add in object detection next week.

I was originally planning to do this using ultrasonics with bumpers as a backup but am finding that ultrasonics are quite pricey - it seems I can only find the Parallax Ping)) for 30 dollars to be within my price range and even that is far more than I originally wanted to spend. I was hoping on picking up two complete sensors for about 20 dollars. Does anyone have any suggestions on what else to use for object detection or maybe a good place with a cheap ultrasonic sensor I could buy? Will making them from scratch be much better? While I do have a need in the near future for ultrasonic sensors with great range this one I only need to detect objects within a foot range so nothing fancy.


Future plans for puppy-bot:

1- Object detection and collision detection with behaviors for moving about the room
2- Recognize the difference between a stationary object and a moving object - follow the moving object until it becomes stationary.
3- Recharging its own batteries - this is a big one that I have never tackled with any of my previous robot challenges before.
4- React to loud noises and pick out/react to a human's whistle.
Title: Re: Puppy-bot
Post by: airman00 on November 04, 2007, 05:34:14 AM
Infrared rangefinders cost about $8-$10 


Or you can make your own Ultrasonic Sensor for under $10 or your own IR sensor for under $5.
Title: Re: Puppy-bot
Post by: Trumpkin on November 04, 2007, 06:54:14 AM
You could also use this http://www.pololu.com/products/misc/0136/ it's right in your price range!
Title: Re: Puppy-bot
Post by: Half Shell on November 04, 2007, 09:46:29 AM
Awesome. You're right - the IR range finders seem to be more in my price range. I'm avoiding building my own sensors for now simply because I am going to reuse whatever I buy on future projects.

I think I'm going to pick up two IR rangefinders (the sharp one) and then figure out a good placement for them. Then I'll hit a front bumper and two side limit switches on the robot (plus a bumper on the back) and that should be able to do obstacle avoidance/collision detection fairly well.

Today I'm going to reassemble puppybot's RC car chasisis and attach a solderless breadboard on top with the h bridge wired in and microcontroller in there. My biggest regret is not being able to find a tank drive RC car - this one has a weak motor turn the wheels up front left and right and turns from there. I'll have to modify the behavior algorithms I know to suit that kind of drive.

I'm also thinking about rewiring the electronics to run off a rechargeable battery instead of the 4 double A's the car was originally supposed to run on.

If this base turns out to be a success I plan on buying another RC car base to experiment and teach myself basic mapping.
Title: Re: Puppy-bot
Post by: airman00 on November 04, 2007, 11:34:17 AM
perhaps you should have a scanning rangefinder ( a sensor on a servo)

Title: Re: Puppy-bot
Post by: Half Shell on November 05, 2007, 12:53:16 PM
I found a place with cheap ultrasonic sensors:

http://www.futurlec.com/Ultrasonic_Sensors.shtml

I am going to buy a set of the long range and regular ultrasonic sensors they list there (for comparison). I don't have need of the underwater one yet.

I'm buying a Sharp IR rangefinder from here:

http://www.robotshop.ca/home/products/robot-parts/sensors/contact-sensors/sharp-gp2y0d340k-ir-sensor.html

Smaller and less range but cheap as heck and should be what I need as a backup.
Title: Re: Puppy-bot
Post by: JonHylands on November 05, 2007, 01:03:59 PM
Those aren't actually sensors, in the normal sense. They are transducers, and require a fairly complex bit of electronics to do anything useful with.

Stick with IR -- its simple, you can do IR sensors for almost nothing, or buy nice premade IR sensors for very cheap.

- Jon
Title: Re: Puppy-bot
Post by: Half Shell on November 05, 2007, 03:05:10 PM
Yah after doing some research I realized that. I ended up ordering the sharp sensor from here:

http://www.futurlec.com/index.shtml

Especially since the other site I WAS going to buy from had ridiculously bad shipping. I'll have to wait a week but until then I'll make puppy bot completely bumper based.

I went to go get thermal paste and a heat sink for the IC h-bridge I have. While at my college's electronics shop I was talking to an electrical engineer there and he said that switching the motor's directions was probably what was causing most of the heat as there is a brief moment when I short it by having two logic highs. Made sense, I'll try it out later. I'm going to try and catch a ride to get some new solder and thermal paste for the heat sink (the shop was out of the paste).

Anyone want to point out the easiest way of making bumper switches before I go and make my own?
Title: Re: Puppy-bot
Post by: Ro-Bot-X on November 06, 2007, 12:48:37 AM
Before you switch the motors from one direction to the other, stop them for a moment. And instead of setting the high state for the pin first, set the low state first, like this:

Forward:
pin1 - high
pin2 - low

Stop:
pin1 - low
pin2 - low

Reverse:
pin1 - low
pin2 - high

If you do it like the following, it is bad and creates heat:

Forward:
pin1 - high
pin2 - low

Reverse:
pin2 - high
pin1 low

Allways set the low state of the pin first, then the high state!
Title: Re: Puppy-bot
Post by: Half Shell on November 06, 2007, 03:56:12 PM
Yuup, and that's what I figured out after talking to that guy. There is NOTICEABLE difference. Got the thermal paste today so I'm going to school around with modeling hte circuit tonight and maybe build it tonight too.
Title: Re: Puppy-bot
Post by: Half Shell on November 06, 2007, 10:33:02 PM
I am simply exhausted! Puppy bot's drives are wired but it is such a rat's nest I'm debating just resoldering everything that I soldered and rewiring it when I have time... like Saturday.

In theory I have one H bridge with thermal paste on it thats holding a heat sink on top with two motors wired into it, both being fed 5 volts. the h bridge is powered through a 5 volt voltage regulator which also powers my Arduino board which is wired in as well.

I can see puppy bot's life being very short at this point - crappy wiring throughout the project as I teach myself how to finely soder is becoming problematic at this stage of the game. I'll see it through but I can see major difficulties in mounting sensors down the line.

This is an important learning situation, however. I now know to solder properly and leave myself more than enough wire room when attaching wires to electronic parts, especially motors and battery packs. I know now how to set up a voltage regulator and properly power my robot, and I learned how to use H bridges to modify motor speed and control my motors properly.

Pricing out puppy bot thusfar, ignoring the purchase of soldering equipment, new solder, and buying parts for the other project, I have spent altogether $83. That includes the cost of Arduino, which I will move from project to project and am using for school projects as well, the cost of a voltage regulator I will move as I need it, and the cost of the overpriced wires I bought cause I was in need, and the IR sharp rangefinder I will attach to it and likely move off of it as puppy bot is junked. I plan on spending a bit more to secure the breadboard and attaching the bump sensors. The rest is dependent on my own knowledge.

The benefit of using Arduino right now is later I can drop in microcontrollers that I'm experimenting with.

Frankly I think the lessons learned is well worth the cost so far.

Looking at the next robot I'll start building simultaneously, I have spent 30 dollars on the base which includes motors, 6 dollars on a hobby servo and 25 on another sharp ir range finder. Throw in the 3 dollar variable voltage regulator I bought, a 12 dollar 7.2 volt battery (I know I shouldn't run the motors at a lower voltage for long but I really don't want speed here and it's all I could find without spending 25 dollars) I will be spending about 76 dollars to build a mapping test robot.

More later I guess...
Title: Re: Puppy-bot
Post by: Half Shell on November 08, 2007, 03:28:14 PM
Puppy-bot's drives has been fixed. Now to solder up and plug in the voltage regulation system, wire in a switch, and wait on my infrared range finder and rechargeable batteries!

I pulled my hair out working on this trying to get the damned thing to run - I spent the entire day debugging other people's line follower bot's circuit boards in the labs and spent the night trying ot figure out why puppy-bot's drives wouldn't work.

In the end- I still don't know what it was. Maybe a fried H Bridge? I doubt it as I used two before my third and they had the same problem without the same treatments.

I'm debating not doing bumper switches on puppy-bot. It depends entirely on the performance of the infrared range finder. I'll keep everyone posted on what happens with it.
Title: Re: Puppy-bot
Post by: Spoil9 on November 16, 2007, 08:24:39 PM
This is excatly the type of project that i would like to build one day. I also was looking at the Adruino.
How are you liking the board?
How is it programming it for what you have done so far?

- Bill
Title: Re: Puppy-bot
Post by: Half Shell on November 16, 2007, 09:39:25 PM
Good thing I caught this post. The Puppy bot thread definately needs an update.

After some experimentation I've managed to confirm my greatest fear - that puppy bot can definitely not be done on the RC car base I modified. I unfortunately got a base in which the front wheels turn separately of the back two. Since the front is also motor controlled, not servo, it depends on the inaccurate use of a spring to return the front wheels to center.

While I think the RC car will prove to be a valuable platform for a future project (I'm imaging fixing the way the front wheels are done by replacing it with a servo) for experimenting with autonomous car simulation but that's down the line.

I plan on finding a new prebuilt chassis that is at least tank drive - probably another Robby RP5 I got from Troseen robotics - 30 dollars and tank treads in tank drive form. Replace the inside battery with a single 9 volt instead of 6 AAs and I'll have room to stuff electronics into it. Plus the base seems easy enough to build a K9 robot chassis over. I know someone else on the board is/has done an excellent K9 already - better than the one I'll do. But I'll be damned if its not so cool I want to do one too. Plus I got caught in a Dr. Who Marathon the other week so I can't say no to a project like this.

Currently some unique opportunities, such as very important Professor of my school asking me to design a robotics kit and giving me funding for it, is taking away from the puppy bot project's time. Since I'm doing multiple projects I'm putting puppy bot on hold for a bit and then will be focusing more on the kit design and my mapping experiments. I might even squeeze in some experimenting with RoboRealm but we'll see.

Arduino so far is excellent for robotics IMHO. If you can solder then I recommend Boarduino as I am having a pain trying to get Arduino working with anything that isn't a protoshield (whcih mine broke!) For 36 dollars you can get the basic decimillia and a USB cable to use for any project. Spend 2 more dollars for the TI SN75440NE (of which I just found out that, when combined in parallel, can double the max Amperage!) and you essentially have a complete robotics package. The programming is a sinch and so easy to program robotic behaviors. It should make my mapping robot experiments far easier.

The big downside is you have to pull it out if you want to use the Arduino for another project. I suppose if you are building a robot and the Arduino is bought just for that it's perfect, but if you plan on doing many projects with it like I am be prepared to buy two.

That's all for now. I'll answer any questions  that come up and probably revive the thread when I get around to making puppy bot.