Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Getting started with microcontrollers.

  1. Oct 8, 2013 #1
    Hello, I would like to purchase a microcontroller for a project.

    Is knowledge in c++ needed to program it? I only know java. And are there software that help you program it without programming, using other methods than c++. Lastly, what would be a good choice for an rc controlled device, with at least 8 different motors and several sensors.
     
  2. jcsd
  3. Oct 8, 2013 #2
    No, you do not need knowledge of c++. But you will need to program the part in a low level language such as c, assembly, or machine code. You will need a programmer, a breadboard, power supply and associated parts. Oh, and you will need a good beginners book for the chips you want to learn. I started out with the PIC chips by Microchip Technologies. My first book was Easy Pic'n. Microchip has free software with a nice IDE, but the programmer is not free. Depending on your background in electronics it may be a while before you will be writing code for your rc controlled device, but you will have a lot of fun getting there (if this kind of thing interests you). I don't know which manufactures or devices would be best (if there is a best) for the application you're interested in. The PICs are the only ones I've worked with. Maybe someone else can help you with that.
     
  4. Oct 8, 2013 #3
    Depends on what system you want to use.
    For example an Arduino can be programmed in either Assembler, C (not C++), or Basic.
    A Raspberry Pi on the other hand can be programmed in any language you want, including Java.
    Both systems are good for beginners.
    The Arduino is much slower and has little memory but it is good for real time applications, i.e. you can time electric signals very precisely with better than microsecond precision.
    The Raspberry Pi doesn't give you that kind of timing, at least not without some serious tweaking. You usually can not expect more than millisecond precision on it, but it is otherwise a much more powerful system.
     
  5. Oct 9, 2013 #4

    vk6kro

    User Avatar
    Science Advisor

    Probably the cheapest and easiest to use are the Picaxe chips.
    These are simple to program in a language like Basic but with many enhancements, using free software. The chips are cheap and, once programmed, they can just be used in circuits like any other chips.

    The larger chips have many inputs and outputs and many tools to perform different jobs.

    The instructions always include clear examples of how to use each command.

    Download the Programming Editor from Rev-Ed. This includes the full instruction manuals for programming the chips.

    Particularly, look for the Picaxe 20X2 chip. This can run at speeds up to 64 MHz and is very powerful.
     
  6. Oct 10, 2013 #5

    meBigGuy

    User Avatar
    Gold Member

    If you are serious about uP controlled devices you will learn C and assembly code. That's just the way it is. Whatever devices you finally choose, there are books and tutorials to get you going, and since you already know java, a second language is not that hard.

    The processor is one thing, but available development boards and peripheral devices and capabilities can influence the choice. PicAxe and Arduino are both good for real time systems controllers. Chances are there are projects similar to what you want that can get you started.

    Here is a site that deals with a lot of the issues you will be asking about.
    http://letsmakerobots.com/start [Broken]
     
    Last edited by a moderator: May 6, 2017
  7. Oct 20, 2013 #6
    I have been checking all this, but are you sure the PICAXE chips can support video and radio out/inputs? Because right now it's pretty much arduino or PICAXE, and I'm making my final decicion.

    I have checked both and there are assembly languages for arduino too. I will choose PICAXE if they do allow for input for radio recievers and all that jazz
     
  8. Oct 20, 2013 #7

    meBigGuy

    User Avatar
    Gold Member

    oops --- you changed the requirements. Now you want video. The first thing you must decide on before starting is what you really want to do. Make a list of all the Inputs, outputs and functions and any other special requirements (like power consumption, cost, language support, and so on). Then you can decide the correct solutions. By "functions" I mean what you want to do to the inputs to create the outputs.

    There is a big difference between a controller talking to a radio module, and trying to implement a software radio. Between controlling a video device and actually processing video.
     
  9. Oct 20, 2013 #8

    vk6kro

    User Avatar
    Science Advisor

    Micros are mostly used where clever control is needed. This is obtained at relatively low speed.

    So, they may control very fast devices which actually operate at radio frequencies, but they do not usually operate at those frequencies themselves.

    The faster Picaxe chips may clock at 64 MHz, meaning they can do 64 million things a second, but even simple jobs like comparing two voltages involve many steps and limit the number of times something can be done each second.

    The decision about which micro to use need not be difficult or permanent.
    If you can program the chip by following simple instructions, as you can with a Picaxe, this may be more attractive than having to attend a 6 month course before you can do anything.

    Using a high level language, as the Picaxe and Arduino do, shields you from having to get involved with many lines of fairly boring code just to do a simple job. You can make one typo and then spend an hour trying to find it.
     
    Last edited: Oct 20, 2013
  10. Oct 21, 2013 #9
    I am doing a DIY drone.

    I have the list, it's:

    Microcontroller. (microcontroller1)

    Input: radio reciever for digital input(for controlling motors and servos) and a camera module.

    Output: 5-7 motors, 4-6 servos, radio transmitter for video signals.

    Station (microcontroller2)

    Input: radio reciever for video signals, buttons or signals that are sent to the radio transmitter.

    Output: Video signals out(come from the radio reciever and go through the microcontroller), radio transmitter with digital signals(from the buttons/signals) that will control the servos.

    Perhaps there could be 2 radio devices instead of 4 if the digital and video out/input are combined, that is the video transmission and digital signals for the motors are using the same radio transmitters, I have yet to look into how that works.

    After much overthinking on this matter, I have decided to get an arduino starters pack, since I took some courses for fun in java not long ago, and their language is almost the same as java, so it wont be hard for me to get into. Also arduino seems to be more high-tech and I just don't see myself transmitting radio signals through PICAXE chips, they seem less advanced. Also in most communities I explored the arduino were dominant, especially in the drone community.
     
  11. Oct 21, 2013 #10

    meBigGuy

    User Avatar
    Gold Member

    Of all you have said, that is the most important for one who is starting out. As for overthinking, You haven't really thought something out until you are sick of thinking about it.

    You created a nice list of all your inputs and outputs, but nothing about the transformations. For example if you really want the video to go through the processor so you can use it for something, then that is much different than just controlling the routing of video from the camera to the transmitter. (digitizing and processing video is a high bandwidth big deal).

    A functional specification is generally made up of high level block diagrams, inputs, outputs, and transformations (functions). Then you start breaking down the blocks into finer blocks until it is easy to think about. When you actually try to write it down you begin to see and resolve the issues.

    My impression is that you have a good grasp of what you are trying to do and are about to embark on a very fun project with the neccessary skills.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Getting started with microcontrollers.
  1. Getting Started (Replies: 1)

  2. Getting started? (Replies: 1)

Loading...