Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Beginner questions

Not open for further replies.


New Member
My high school is starting a robotics club next school year, and we need some info on getting started. The robots will be (hopefully) competing in the USFirst competition ( ). If you know of any other competitions we should look at, tell us please.

What I want to know:

As far as sponsors, we plan to ask Office Depot and Radio Shack. What other companies in Southern CA are good prospects? How much money do you think we should shoot for our first year? We were thinking around $1,000 if we can swing it.

What are good places to buy the components, such as motors, sensors, and electronics?

We know a bit about electronics, but not enough robot-specific. What is a good way to control motors? From reading posts here, an H-bridge looks like a good project. What about MOSFETs? Would either of these allow for speed control?

A PIC microcontroller seems a good choice for a robot's brain, but there are so many of them, which one should we get?

Any good info on physical construction is appreciated, since we only have experience with lego robots. We should have access to an arc welder if all goes according to plan.

Any helpful suggestions for some beginners would be really appreciated.


Edit: We don't want to make a single robot for that competition, we want to make as many as we can. One project suggested that we hope to do is a line-following robot.

It sounds like you are just starting out with this, it is good to see that you are interested.

You need to do a lot of research on the internet, do some searching. Those questions are too broad to answer completely and there is plenty of information on the internet to keep you busy for a very long time. Instead of trying to figure out how a MOSFET can be used to control a motor, try to learn what a MOSFET does on its own. Learn how a motor works. Then tie the peices together, it will all make sense.

It is quite clear that you are a beginner, and this will make it very difficult to get any sponsors for your robot. Companies only invest in people with a lot of technical knowledge and experience to back them up.

It is best for you to do some fundraising around your school and to find surplus motors and mechanical parts, it would save you a lot of money.

It's true, we're all beginners 8)

Pity about companies not wanting to invest in newbies.. perhaps some more local-type stores would be willing to contribute. I know a couple fairly well-off and generous people who I could count on for a bit of contributions. Anyone who has experience at fundraising, give us some ideas. Our school has two typical fundraisers, running the lunch carts and selling candy. Both will get money, and we'll do both, but we don't have too many people in the club, so we'll be looking for some fundraisers that offer a higher yield per person. Maybe create two line following robots and have a race with us raking off a percentage on the bets? Any ideas would be great.

As for finding "surplus motors and mechanical parts" where should be look for these types of things? I can't think of any store besides radioshack that carries electric motors. We would really like to spend the least amount of money possible, so any help finding cheap components is great.

We'd like to order our microprocessor ASAP, as in sometime in May, so we can start learning to program and experiment with it. Since we've never used one before, we aren't sure what features to get. Like how much memory should we get? We'd like a good number of I/O pins as well, at least 8 I'd think, for at least two motors, and several touch/proximity sensors. I mentioned the PIC before, but I understand the basic stamp is also common in robot control. Any recomendations as to which microprocessor(s) to buy would be really appreciated.
mattg2k4 said:
...........We know a bit about electronics, but not enough robot-specific. What is a good way to control motors? From reading posts here, an H-bridge looks like a good project. What about MOSFETs? Would either of these allow for speed control?

A PIC microcontroller seems a good choice for a robot's brain, but there are so many of them, which one should we get?

Any good info on physical construction is appreciated, since we only have experience with lego robots. We should have access to an arc welder if all goes according to plan.

Any helpful suggestions for some beginners would be really appreciated........
This is a good source of circuit theory and know-how.
Hey Matt,

If you know some wealthy and generous people, go for it! Also, some more successful local stores might be able to support you with your projects.

Microcontrollers sure are handy when you know how to use them, I am just getting into programming for a project I am working on. There are tons of families of microcontrollers that you can use, you just have to choose one that is appropriate for your application. These specs. include processing speed (MIPS), processing power(8-bit, 32-bit?), memory (ram, sram, flash) size, I/Os, interrupts, on chip peripherals (timers, SPI, I2C).

Then you need to figure out how to program them. The best bet is to find a new controller that you can solder or get a development board ( has some controllers with their crystals and I/Os easily accessed) with in-system programming capability. These are the cheapest programmers you can get a hold of, and they can still program powerful devices.

Also, you need to learn a language of choice for the controller. You can either choose to learn a low-level language or a higher level language. The lower-level language is the most tedious to work with, it is basically doing assembly instruction at a time that you specify. For more information on this, check out a controller from the various manufacturers such as and the list goes on, and read the datasheet on the programming language. It gives you the proper syntax and how to use each instruction.

A higher level language involves using a compiler for a different language such as BASIC and C. This is pretty much the easiest way to make a complex program, but it will run less efficient for code space then assembly language. I am using a (i think that is right) BASCOM AVR BASIC compiler, which is extremely easy to use.

If you could consider using straight logic to control the line follower, then do it. You cannot beat the speed of logic on a controller, but it isn't as robust and you might need to make a change.

For motors, don't go to Radioshack, their stuff is garbage. Search for surplus electronics motors at and you'll see some places which will have some nice motors for cheap. You don't need a massive motor to do what you want.


Thanks for the input Scubasteve, and for the site pebe.

Memory and I/O's on a chip are pretty straightforward. But processing speed and power, peripherals, and interupts aren't so self-explanatory. What should I consider when choosing speed and power? Typically more is better, but I'd rather only pay for what I need. What are interupts used for? For a touch sensor perhaps that warns the robot it's about to hit a wall? I understand timers, but what are the SPI and I2C peripherals mentioned?

Thanks for all the help :)
Sorry Matt,

Much of what I said is irrelevent to your application, I just trying to emphasize the variety of microcontrollers available.

You do not need much to do this. An interrupt would be useful for you to use. It does exactly what it says.. It can be used as an input to halt a program whenever it occurs and to execute a new program then it will return to the main program loop.

The SPI, I2C, etc. are communications protocols, which aren't very useful in your application. You only need an 8-bit microcontroller for this.. I am not sure about MIPS, but you don't need a lot.

If I were you, I'd just get a more beefy controller then what you need. They aren't too much more and they allow for expansion and a lot of flexibility. You can afford to be inefficient with your code, and etc. Checkout that BASIC compiler (AVR or 8051) and checkout the instruction manual on the site. It will explain how to use each command with proper syntax. You will need a programmer.. I am ordering an ISP programmer from 's distributors soon. Once connected, it can program your code in directly and you can run the controller to see how it works. Since this isn't too complex, this method is okay. No real need for simulation unless you are willing to see how it works.

I think it would cost around 10$-15$ for a nice microcontroller(DIP PACKAGE!) with some support components (~10$, crystal(throughhole), caps). You need a good breadboard that you can work with and some wires. If you can find a DIP to 0.1" header (2 X 5) adapter, then you will be set once you get the ISP programmer. You will need some LEDs for logic indication and maybe the use of a scope to see what is going on sometimes. Of course you will need an ultrasonic transducer with a drive transistor. There are circuits all over, just take a look for something along those lines. Also, I am assuming you have a 5V power supply to work with...

Once you get all of this, which will set you back a bit, future project development will be easy. You can always go the Basic stamp route which is around the same money, but there are some more features on their development board. The price of each stamp is quite expensive compared most atmel controllers, with not much more performance and benefits.

Someone out there might have a better solution, but this is the way that I would do it.

If a line following robot is what you want, why not start with the chassis from a remote control car? I've done this and the work and money you save are incredible. By the time you buy your motors and batteries and material to fabricate a chassis you'll have spent a pretty penny and lots of time. A remote controlled car with the electronics stripped off makes a great base for what you want to do.
Make sure the car you get actually steers in both directions, you're going to need a toy in about the $30-$40 dollar range to make a decent line following robot.
I'm a big fan of the PIC microcontrollers. Especially if you have one of the basic compilers available (and a programmer). They are easy to use this way and about one-tenth the cost of a basic stamp. I'd recomend the PIC16F877 it's way overkill for what you want but leaves plenty of pins available for extra features you may want to add.
Thanks for that suggestion lavenatti, but we've already purchased the components for our robot. We are using the batteries and motors from an RC car though, so we're meeting your suggestion halfway :wink:

I'm actually trying to learn microcontrollers at the moment using a PIC16F628, but it's not progressing very fast. I put it off during end of the year exams and haven't gotten back to it yet. All I've actually managed so far is the blinking led. I'm looking through amazon for some good books, if anyone has input on good books for microcontrollers, I'm definitely interested. But this robot will be controlled by comparators on the light sensors. It won't steer nearly as smoothly, but it's a heck of a lot simpler and I already know how to use comparators.

Right now we're using transistors for the motors because they're cheaper and I've got plenty lying around. It would be nice to use MOSFET's eventually though, since they don't drop as much voltage and generally are rated for more power. This first build won't have speed control, just on and off, but in future builds I think we'll use PWM. One thing I'd like to be able to do though is have the motor brake. I seem to recall that if for a DC motor the two connectors are shorted, it will brake, right? If not, what's the way to do it?
Hey Matt,

You are right about the braking function, all you need to do is short the windings. The voltage generated is fed back into the motor, which causes it to reverse.

I have settled on a simple BASIC compiler for AVR microcontrollers called BASCOM AVR for my programming needs. It is quite simple to use and can be very powerful, but it is not as efficient as assembly. There is a course I am taking in school soon to learn assembly and all of that fun stuff.

First USE THE AT89c2051 :D very easy code...
They have all the pdf files you need to read to understand how to work with that, you just need to have a programming kind of mind WHICH IT ONLY APPEARS IN SOME PPL ( when i was 17 i thought that didn't exist everybody kould programm, IT ISN't true i meet some ppl that it is very HARD to programm for my is quite simple) and some minor eletronic knowledge!! if you have the commands datasheet you kan do a lot, maybe i kan help you kreat baud-rates and turn INTERRUPTS ON! :D Stay kool :D

:idea: try to find documentation in 8051
I just wanted to make something clear. You said you were interested in entering the USFirst competition. That's great. I've helped out with USFirst and it's a great experience.

But it seems you haven't read the rules for the competition, and I just want to make a few things clear for you before you do aything that might hamper you in the future. In order to enter the competition, you must buy the robot kits that USFirst provides (hence the need for sponsers), I believe the cost of the kit is $5000 (I could be wrong, never bought one myself). Although companies like Home depot may not sponser you, it is possible to find other big name companies. I know that some of the teams have sponsers from Con Edison, SIAC, and other engineering companies. They will be your most likely sponsers.

Now as far as the kit goes. It comes with a robot controller and operator interface. You MUST use them in order to control your robot. If not your team will be disqualified from participating in the events. Both the robot controller and the operator interface use BASIC Stamp. So you're best bet right now is learning PBasic. They already come preloaded with a sample program to get your robot up and runnning. The rbot controller is attached directly to your robot and is what is used to control the motors and such. The operator intereface is used by the team to control the robot. The Operator Interface (OI) and the Robot Controller (RC) can communicate either through a radio (which is provided in the kit, and must be used) or through a tether.

Also included in the kit are speed controllers,relays, different types of motors. Enough to get you started on a robot project. You are allowed to use compnents outside of the kit, but there's a specific list of which parts you can or can't use that you must adhere too.

Oh and one last thing. Each team is allowed to have mentors. These are people who are either from the company that sponsered you or from other volunteers (like me). So it's also a good idea to find someone who has had previous experience in USFirst to help your team out.

Hope that helps, and good luck to you.
@dr_scrapper - We're already going with PIC's, bought the programmer and some books on using them, no way I'm changing processors halfway through ;)

@Occult - Well the $5000 startup cost is rather steep, much steeper than we'll be paying our first year at least. The way it appears right now, this first year of robotics we'll be learning and developing, then the next year we'll (or rather they, as I'll be graduating) start getting into competitions. We don't have nearly enough people interested as we'd like, only three dedicated members and another five or so who are interested, but not willing to dedicate any serious time or resources. Once we've got a few high quality robots built that we can parade around to school assemblies and show off to businesses, I think we'll have a better chance of getting the money and people interested we need to start competing. With the current budget situation in California, we won't be able to get any real support from the school in money, facilities, tools, or materials. We DO have some O-scopes and bench power supplies we should be able to use when the physics teachers don't need them, but that's the extent of it.
I'd like to congratulate you. You have picked out the most difficult, time consuming and
sophisticated hobby on earth. But on the other hand, this is the most fun hobby one can
imagine. ;)

I'd just like to advice you that you shouldn't be too agressive in this hobby. As said before,
it's difficult and time consuming. Like with myself; I had been reading books and internet
posts for more then two years before starting to build my first robot.. :)

I also learned that it's good to start on small projects.

check out Although I don't live in Dallas and am not a member of DPRG
their webpage was of great help when I was starting. :)

Have fun! :D
If its a problem for u to find out what models of PIC u shuold pick (sorry)
U can looking for some particular interesting features.

Some PIC-models have something called H-PWM.

It means that the microcontroller have an or several outputs the user can configurate as a PWM-output. With H-PWM (Hardware-PWM?), the microcontroller can work with another tasks more easy. So in first place u should look for a PIC with 2 H-PWM or more.......and think about the input u need AD-converter? .......and so on. I the end u will find out what PIC u need :?
Not open for further replies.

Latest threads