Microcontrollers making a small robot with a pic

Discussion in 'Mac Programming' started by snoopy531, Sep 26, 2011.

  1. snoopy531, Sep 26, 2011
    Last edited: Sep 26, 2011

    snoopy531 macrumors newbie

    Joined:
    Sep 26, 2011
    #1
    Hi I am new to microcontrollers and i would please like to know which PIC microcontroler do you suggest me to use to build a small robot with many sensors. Like the one here(http://www.societyofrobots.com/robot_tutorial.shtml). And how many pwm channels does it have?

    Thank you very much
     
  2. lloyddean, Sep 26, 2011
    Last edited: Sep 26, 2011

    lloyddean macrumors 6502a

    Joined:
    May 10, 2009
    Location:
    Des Moines, WA
  3. Muncher macrumors 65816

    Muncher

    Joined:
    Apr 19, 2007
    Location:
    California
    #3
    My advice is to get a kit robot; not as fun, but much more reliable. Unless you want to work in microprocessor design anytime soon, stay away from FPGAs, they're extremely confusing and unforgiving.

    Might I recommend the BOEBOT? Not a pic micro controller, I know, but it's a good starting point for building a robot. Plus, once you work your way through every project, you can put a pic onto the BOEBOT and keep going (I should know, I did that).

    Truthfully though, micro controllers are frustrating. I would highly recommend going with safe stuff first (like the BOEBOT) instead of being ambitious - you will fail pretty quickly.
     
  4. lloyddean macrumors 6502a

    Joined:
    May 10, 2009
    Location:
    Des Moines, WA
    #5
    If anyone had read about the Cyber Cortex AV, linked above, they'd know that it is reconfigurable to look like a multicore Arduino-compatible amongst others.

    From the linked page -

    "Even more exciting is that many of the Cyber Cortex cores are “multicore” capable, and the board also includes 512KB of synchronous SRAM allowing you to run as many as four independent Arduino sketches all at the same time."
     
  5. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #6
    Filed away for future reference. Thx.

    This: http://www.digilentinc.com/Products/Detail.cfm?NavPath=2,400,790&Prod=BASYS2 has been my go to board for quick and dirty FPGA stuff, but I usually still handle the interface stuff in a real uController like a PIC or ATMega.

    snoopy531 can you tell us a bit more about yourself? How old are you what is your goal? What else do you know? ...

    You might want to consider learning something simple, either a kit like Muncher suggests or something dead simple like http://www.societyofrobots.com/step_by_step_robot_step1.shtml then take it a step at a time from there.

    I might consider an Arduino Pro Mini 5V like http://www.sparkfun.com/products/9218 (6 PWM, 6 analog in) and a FTDI Basic 5V http://www.sparkfun.com/products/9716 as the core of your digital world. Cheap and easy to use. Get more capability by adding more distributed brains instead of one huge brain.

    B
     
  6. SidBala macrumors 6502a

    Joined:
    Jun 27, 2010
    #7
    I would recommend you go with Arduino. They make it very easy for beginners.
     
  7. larswik macrumors 68000

    Joined:
    Sep 8, 2006
    #8
    I have an Arduino board, stepper motor, stepper driver all connected via USB. Just 2 weeks ago I was playing with it trying to write code to have it slowly spin up and down.

    I bought everything through www.sparkfun.com

    You need to use the Arduino interface to upload and program. Also you need to know C, another good reason to learn C before objective C.

    It's a lot of fun.

    -Lars
     
  8. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #9
    ;) Processing/Wiring isn't C. Definitely C-like, but not C. If anything Java is closer. In many ways C is like the programming equivalent to Latin. It's presence can be felt in many other languages. Clearly useful, but not necessary.

    This is where the background and goals come in.

    You can do a lot with a fully reconfigurable LEGO Mindstorms set, and the visual programming environment it comes with is very easy for even my kids (8 and 10) to pick up. However that may not suit your goals. Advantages are easy fabrication, programming and and availability of parts. Downsides are cost and the large size of the NXT brick.

    B
     
  9. lloyddean, Oct 1, 2011
    Last edited: Oct 1, 2011

    lloyddean macrumors 6502a

    Joined:
    May 10, 2009
    Location:
    Des Moines, WA
    #10
    It's actually C++ (thus C as well) and the IDE does some pre processing of your code at compile time to simplify some things for beginners.

    For correctness - Wiring is C/C++ and Processing is Java.
     
  10. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #11
    I sit corrected.

    Still, most Arduino sketches usually won't look like straight C/C++, and when they do you're probably over thinking it.

    Plus there are things that are not supported e.g. http://www.nongnu.org/avr-libc/user-manual/FAQ.html#faq_cplusplus

    B
     
  11. larswik macrumors 68000

    Joined:
    Sep 8, 2006
    #12
    With Xcode 3 I was able to write some code and it work pretty good but I was still learning a lot. There were a lot of things I had to do to set it up but Xcode 4 seemed to be a no go.

    Building a Motion control rig was the whole reason I got into programming in the first place.
     
  12. balamw Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #13
    Yeah, and that's not that well suited to Obj-C, though the GUI can be.

    This is what we need to get from the OP. What's the robot for? Why does he think that LOTS of PWMs are needed?

    B
     
  13. lloyddean, Oct 1, 2011
    Last edited: Oct 2, 2011

    lloyddean macrumors 6502a

    Joined:
    May 10, 2009
    Location:
    Des Moines, WA
    #14
    Yes, the language is C/C++ but the C library is incomplete while the C++ library is non existent.
     

Share This Page