The DIY robotics thread.

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
EDIT:
List-0 resources at the top for your vewing convinience!

PIC microcontrollers:
Free C and Basic compilers, so long as the program size is below 2K.
http://www.mikroelektronika.co.yu/english/product/compilers/compilers.htm

General parts:
Jameco's robot store. They've got a 10$ extremely basic six-legged walker base (with motors) for 10$!.
robotstore.com

Polulu carries some really nifty things, including a 25$ serial motor controller.
Polulu.com

Solarbotics has some rather nifty gearmotors which not only outperform servos, but cost less (6$ or so each.)
solarbotics.com




To cut to the quick, I'm new to robotics. I can solder, I can build a desktop PC from scratch, and I can even repair laptops with a decent degree of skill. And, having exhausted the possibilities of my Lego Mindstorms set, I figured I should move on to something better.

I created this thread to help everyone who wants to build a robot, but has little experience, and a low budget. The RadioShack VEX line of products is really rather nifty, but after you get the programming kit and rechargable batteries, it's roughly 450$, and even then you're somewhat limited as to what you can use. The PIC 16f877A is actually very similar to the one used in the VEX controller, but only 8$.

This is also a place for electrical engineers, programmers, tinkerers, and scrappers to join in. I've recieved a lot of help from those more experienced than myself, so go ahead and feel free to post!

Anyway, I am now the proud owner of a Budget Robotics TankBot kit, so I'll do a quickie review to get things rolling.

TankBot
Budget Robotics
40$ including motors; 60$ for servo-driven model.
http://www.budgetrobotics.com/shop/index.php?shop=1&cart=290986&cat=51&

What it is:
The Budget Robotics TankBot is, as the name suggests, a tank. It's designed to replace Tamiya's treaded vehicle kit; although it uses the same treads, it includes the independent dual-motor gearbox which must be used in place of the included single gearbox. (Unless, of course, you don't want to turn.)
At roughly seven inches long and four inches wide, it's quite small; however, the included gearbox set is quite powerful and it can traverse obstacles of up to 2.5" without much trouble, so long as it's balanced. In fact, out-of-the-box the robot is quite tippy; however, my 1200mAh 7.4 volt lithium-polymer pack placed in the front made it balance just fine; 2-3 AA's mounted twoards the front should work as well. Each of the included motors draws 600 mA at three volts; they're standard 130 size motors, so it's not hard to find replacements to run at a higher voltage. At 4.5 volts, the robot's quite zippy; at three, it moves at a reasonable speed.
Construction of the robot platform is easy. The instructions, however, are a little clumsy; the 3D models don't exactly match the finished product. Perhaps the greatest annoyance is found in the assembly of the gearbox; Tamiya's instructions are all in japanese! Thankfully, the manual has lots of pictures, and it's not too hard to figure out. Expect to spend about three hours on assembly.



Now, for the questions:
1. DIY motor controller.
Polulu sells a motor controller kit for 20$; it has a microcontroller (a PIC) with preprogrammed firmware, and a small H-bridge. I'd like to buy the PIC seperately (10$), and use a L298 H-bridge, which is much more powerful. (2x 5amp channels vs. 2x 1amp channels.) What would I need to do to use this; if I recall, it needs diodes of some sort for protection. (The Polulu kit only has two capacacitors in addition to the two ICs in the kit; I imagine that one is for filtering power to the PIC, the other to the H-bridge.)

 

CycloWizard

Lifer
Sep 10, 2001
12,348
1
81
If you really want to do it ALL yourself... You can create your own controller circuits and perform the PCB layout manually, then have it made/make it yourself. Great free software: PCB Express. $60 gets you 3 copies of your board. I've used this to create a number of motor controls and read in feedback data using optical flags/force transducers.

This would be a lot of fun to try, but I don't really have the electronics knowledge. If someone designs the theoretical circuit, I can part it out and physically build it, but I have zero circuits knowledge above the level of Ohm's Law.
 

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
I have PCB etching supplies; there's no way in heck I'm paying that much money to get some tiny PCBs etched. Also, veroboard works pretty well for this type of thing. (20$ each is insane.)
 

herm0016

Diamond Member
Feb 26, 2005
8,421
1,049
126
i would recomend getting a chip like a bs2sx (basic stamp) this is what i use with the "board of education", an h bridge motor controler and a home made analog to digital converter for an old gravis joystick for control. its a quick little chip that will hold a fairly impressive amount of complex code.

http://www.parallax.com/detail.asp?product_id=28150

http://www.parallax.com/detail.asp?product_id=BS2SX-IC

these work great together. then get yourself a few servos, 2 drive motors, some scrap aluminum and lexan or wood or what ever you happin to have layin around, and a good batery pack (i have custom 2400 mAh NiMh packs from battries plus that only cost about $25) then you have all you need to build anything you can think of!
 

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
Originally posted by: herm0016
i would recomend getting a chip like a bs2sx (basic stamp) this is what i use with the "board of education", an h bridge motor controler and a home made analog to digital converter for an old gravis joystick for control. its a quick little chip that will hold a fairly impressive amount of complex code.

http://www.parallax.com/detail.asp?product_id=28150

http://www.parallax.com/detail.asp?product_id=BS2SX-IC

these work great together. then get yourself a few servos, 2 drive motors, some scrap aluminum and lexan or wood or what ever you happin to have layin around, and a good batery pack (i have custom 2400 mAh NiMh packs from battries plus that only cost about $25) then you have all you need to build anything you can think of!

The BASIC stamp is actually just a PIC microcontroller with a bootloader, a bit of extra flash memory, and a basic interpreter. Because it's using a basic interpreter, it runs much more slowly than a PIC with compiled software, and because it uses an older-model PIC with an interpreter, you lose a lot of features. The BS2x costs about 50$; the PIC 16f88 about 3.50$. The PIC16f88 has the same number of I/O pins (if not more), 2 ADC's, is much faster, and supports multiple threads. Plus, you can program it in C, if you have a compiler.
The reason I'm using the serial motor controller is to make programming easier, and to take the load off of the microprocessor. Seeing as how I'm not even sure if the Stamp even has a PWM output, I can't honestly see the point. (It also makes it easy to regulate speed.)
Also, I'm using lithium-ion-polymer batteries, as I already own them. They also far outperform NiMh batteries.
 

SamurAchzar

Platinum Member
Feb 15, 2006
2,422
3
76
1. I strongly suggest you try Atmel's AVR line of microcontrollers. They are much nicer than the PICs IMHO, very well documented and there's alot of info about them floating around.
They have a new family which is designed to perform motor control - try here.
It has many (something like 10, IIRC) PWM channels and additional useful stuff.
As it's a relatively new variant, you might have a hard time finding pre-made boards, though.

2. Be careful with those Lithium batteries - there's a certain lower threshold of energy you must not exceed or else the battery becomes damaged. You need to limit your consumption somehow.

3. GL HF


 

djhuber82

Member
May 22, 2004
51
0
0
Cheesehead:
What C compiler are you planning to use? I did some work with a PIC a couple years ago and at that time the compilers were so expensive (and I was getting paid so little) that I ended doing it in ASM.
 

MAW1082

Senior member
Jun 17, 2003
510
7
81
I would get a microcontroller and learn how to use that before anything else. I think the PICs by microchip are great. I used the PIC18F452 recently and I loved it. The great part about it is that you can write in PIC BASIC. No need to learn assembly with this little guy, even though it is extremely useful to learn.

Edit: uhhh . . . sorry didn't see you already have a micro and kit.

I'll post the schematic to the remote automated vehicle I built recently based on the PIC18F452.
 

MAW1082

Senior member
Jun 17, 2003
510
7
81
About H-Bridges:

I found this aspect to be the most challenging part of building a device that controls a DC motor. We went through about 4 or five designs before we built one that worked properly.

For one DC motor we used two power MOSFETs, two n-type BJTs and two p-type BJTs. We used the mosfets as +5V switches to mke absolutely sure the micro was electrically isolated from the motor. We then attached the output of the MOSFETS (in an active high configuration) to the two terminals of the H-Bridge.

We found all the materials that we needed for the h bridge at the local radio shack. If you want to get even more complicated, you could use darlington transistors to get a better gain from the input signal from the micro.

Still trying to find the schematic . . .
 

Radical Ans

Member
Jan 25, 2006
55
0
0
Originally posted by: SamurAchzar
1. I strongly suggest you try Atmel's AVR line of microcontrollers. They are much nicer than the PICs IMHO, very well documented and there's alot of info about them floating around.
They have a new family which is designed to perform motor control - try here.
It has many (something like 10, IIRC) PWM channels and additional useful stuff.
As it's a relatively new variant, you might have a hard time finding pre-made boards, though.

2. Be careful with those Lithium batteries - there's a certain lower threshold of energy you must not exceed or else the battery becomes damaged. You need to limit your consumption somehow.

3. GL HF


Another good thing about AVR uC's is that you can use GCC to program it in C. Makes life much easier. Also you might want to check out a RTOS like FreeRTOS.

 

Radical Ans

Member
Jan 25, 2006
55
0
0
Originally posted by: bobsmith1492
I agree about the Atmels; we used two Mega64s for a class project last semester, and they're fairly easy to program. We used the Atmel AVR programmer and AVR studio (the studio is free, I don't know how to get the programmer, but it sure LOOKS cheap ) and it worked out very well. Pic of our board:
http://claymore.engineer.gvsu.edu/~steriana/courses/326/hof05pics/Group2b.jpg


Another plus is that AVR studio works with GCC. So you pretty much get a full compiler/IDE for free.
 

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
I've got a PIC microcontroller kit with a USB programmer and PIC-C compiler. It's a nice setup; it's based around the 16f877a microprocessor, and PIC-C is a pretty good compiler. (I'm still trying to figure out what to do with it, though. I don't know C.) And, for the record, I traded it for all of 15$ worth of chocolate; not bad for a 400$ kit!
That said, I've heard nice things about Atmel AVR microprocessors. The PIC18 and PIC24 line seem to be quite powerful, and are cheap. However, the Amtel chips certianly appear to be faster, and have a good bit more memory.
EDIT:
Atmel sells the AVR169(or something like it) in a rather nifty little carrier, which includes an LCD, 512 kb (4096 bits) of flash memory, and a built-in thermistor and RS-232 connector! And it's only 20$!
....why did I want to bother with PICs again, anyway?
 

MAW1082

Senior member
Jun 17, 2003
510
7
81
I really don't see you having an issue with the speed of the processor when you're just learning how to program.

Think about it . . . even a 1 MHz processor can perform 1 million operations per second. That is 1 us per cycle.

When you just learn how to use these things, you usually have to put in massive do nothing loops just to pause the program for a second or two.

My advice would be to learn to use what you have. I am pretty sure you should be able to use your PIC write software for it in BASIC. BASIC is way easier than learning assembly or how C reacts with hardware.

Use PICBASIC. You can read more here.
 

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
Originally posted by: MAW1082
I really don't see you having an issue with the speed of the processor when you're just learning how to program.

Think about it . . . even a 1 MHz processor can perform 1 million operations per second. That is 1 us per cycle.

When you just learn how to use these things, you usually have to put in massive do nothing loops just to pause the program for a second or two.

My advice would be to learn to use what you have. I am pretty sure you should be able to use your PIC write software for it in BASIC. BASIC is way easier than learning assembly or how C reacts with hardware.

Use PICBASIC. You can read more here.

PICBASIC Pro, which is the only version worth bothering with from what I've heard, is 250$. There are one or two basic compilers for the AVR that are entirely free.
 

Colt45

Lifer
Apr 18, 2001
19,721
1
0
an 877 is more microcontroller than you'll need, if you're just learning.

the best software for pics I've found is from mikroelektronika.
They have a basic and a C compiler for PICs, and offer a full featured version for free, only limitation is program has to be under 2k. And since you're just learning I'm sure it will be, for a long while yet.
http://www.mikroelektronika.co.yu/english/product/compilers/compilers.htm

oh yeah... sample.microchip.com *cough*
 

PowerMacG5

Diamond Member
Apr 14, 2002
7,701
0
0
I'm partial to SiLab C8051 Microprocessors. I have used the C8051F020 Dev Kit. We used it in my embedded control class. They are very powerful. containing multiple ADC's, DAC's, PCA's, etc... They have a plethora of output and input pings. We used them in autonomous blimps. I had to program it to maintain a certain height and altitude. We also had a competition where we needed to get from one end of the room to another (big room), maintaining a height in a range of 1m, and you needed to get from point A to point B the fastest.

The motor controls were all electronic speed controllers using PWM driven by the PCA. The thrust angle control was a servo, so that is simple PWM as well. We made use of the I2C bus to talk to an ultrasonic ranger, and electronic compass.
 

cheesehead

Lifer
Aug 11, 2000
10,079
0
0
The SiLab microprocessors look to be rather nifty. However, unlike, the PIC microcontrollers and AVR's, they're rather less common, and more expensive. (For example, the PIC 16f877A has several ADCs, and costs about 8$. A beefy Atmel AVR running at 16mhz with 128k of RAM is only about 12$.)

I'd very much like to see a video of the blimps cruising across the room.

Now, for the tricky questions.
1. Mapping
I'm teaching myself C for the PIC microcontroller. It's hard; you already know this. (That said, C for the PIC is a bit easier; at least everything is ALWAYS the same between the same model of PIC, and the commands are rather easier to master.)
What I'd like to do is design a robot platform that can, using an infra-red distance sensor (about 13$; they're highly directional and go up to about a yard) to map out an area in 2-D, save it as something that it can use and a GIF, and update it as it rolls about. I'd have at least a Pentium @ 100mhz and 256mb of storage on board, or a Gumstix if I can afford one, so CPU power is'nt a huge problem.

 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |