Microcontroller

Thread Starter

tfarawi5

Joined Jan 25, 2011
7
Hey im making a prototype car that has to go back and fourth from wall to wall without human intervention, my prof. suggested to use a microcontroller attached to a sensor that will sense when the vehicle is close to the wall and then the microcontroller will invert the leads on the motor to make it go the opposite direction. Im new to this kind of projects. If anyone could give me suggestions on the topic like; which kind of microcontroller to use? where can i get one? and how to program it?

thank you
 

thatoneguy

Joined Feb 19, 2009
6,359
No background in coding, you'll need to learn one.

The PICAxe is programmed with a BASIC type language, easy to use and would be powerful enough for your application.

The motor direction change can be done with an H-Bridge, which there are many options for, depending on motor choice.

The distance detection can be done with IR Rangefinders, Sharp is a very common brand.

Sparkfun (linked above) has most of what you'd need in one place, though there are probably Canadian outlets you may find a better deal from.
 

SgtWookie

Joined Jul 17, 2007
22,230
Besides the PICAxe, you could use Mikroelektronika's MikroBasic for the PIC microcontrollers, which would give you a wider selection of processors to use.

First though, you'll need to define what you need in the way of sensors, motor control, H-bridges, etc. - getting all of your details sorted out will pretty much narrow down your requirements for microcontrollers.
 

arthur92710

Joined Jun 25, 2007
307
You can probably do it without programming.
Two push buttons, the type that you press once to turn on and then again to turn off, an XOR and an inverter. Put one button on each side, when it hits the wall it will turn around.

Comments on the circuit I attached?

Using a micro controller and ir sensors is better. The robot wont have to hit the wall at full speed.
 

Attachments

t06afre

Joined May 11, 2009
5,934
Hey im making a prototype car that has to go back and fourth from wall to wall without human intervention, my prof. suggested to use a microcontroller attached to a sensor that will sense when the vehicle is close to the wall and then the microcontroller will invert the leads on the motor to make it go the opposite direction. Im new to this kind of projects. If anyone could give me suggestions on the topic like; which kind of microcontroller to use? where can i get one? and how to program it?
thank you
Is this school work, or something you are making as a hobby project? If it is schoolwork. I am sure your school have some MCU development system. And it would be a smart thing to use this in your work.
 

Thread Starter

tfarawi5

Joined Jan 25, 2011
7
Thanks a lot people for the suggestions, I like the idea by arthur92710, but I'm not sure how exactly it would be set up. I also research XOR and it is sill kind of blurry what its function. can you elaborate with a bit more details your idea please???


Thanks you very much
 

Thread Starter

tfarawi5

Joined Jan 25, 2011
7
Thanks a lot people for the suggestions, I like the idea by arthur92710, but I'm not sure how exactly it would be set up. I also researched on XOR and it is sill kind of blurry to me what its function is. can you elaborate with a bit more details your idea please???


Thank you very much!!!!
 

SgtWookie

Joined Jul 17, 2007
22,230
You can probably do it without programming.
Two push buttons, the type that you press once to turn on and then again to turn off, an XOR and an inverter. Put one button on each side, when it hits the wall it will turn around.

Comments on the circuit I attached?

Using a micro controller and ir sensors is better. The robot wont have to hit the wall at full speed.
The circuit you attached has a number of problems:



There is no "off" for the motor, only full speed ahead or full reverse.
There are no current limiting resistors on the transistors' bases.
There is no current limiting resistor on LED1.
You're using NPN transistors on the high side; they will never saturate.
Since you have no base current limiting resistors, the low side transistors will clamp the gates' output at around 0.7v; so the motor will never see any current.
 
Top