Microcontroller

Discussion in 'The Projects Forum' started by tfarawi5, Jan 25, 2011.

  1. tfarawi5

    Thread Starter New Member

    Jan 25, 2011
    7
    0
    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
     
  2. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Looks like we are making two of these now. :D

    What is your background? How handy are you with electronics and/or code?
     
  3. tfarawi5

    Thread Starter New Member

    Jan 25, 2011
    7
    0
    I am in college in Montreal, I'm not bad in electronics, no background in coding.
     
  4. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    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.
     
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  6. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    Or Swordfish BASIC, or JAL2, or C18. Lots to choose from.
     
  7. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    In addition to PICAXE. there is the Arduino board. Check out the website at www.arduino.cc. Also type in arduino as the keyword in youtube and view a few of the videos.

    hgmjr
     
  8. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Ask 10 people, get 10 answers. Never Fails. :)
     
  9. arthur92710

    Active Member

    Jun 25, 2007
    307
    1
    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.
     
    • del.PNG
      del.PNG
      File size:
      17.9 KB
      Views:
      52
  10. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    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.
     
  11. tfarawi5

    Thread Starter New Member

    Jan 25, 2011
    7
    0
    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
     
  12. tfarawi5

    Thread Starter New Member

    Jan 25, 2011
    7
    0
    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!!!!
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    The circuit you attached has a number of problems:

    [​IMG]

    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.
     
Loading...