Getting started with microcontrollers.

  • Thread starter Jarfi
  • Start date
In summary: The PICAXE chips can be programmed in a variety of different languages, including Basic and Assembly. The Arduino is a more general-purpose microcontroller, while the Raspberry Pi is specifically designed for programming small computers, including controlling hardware.
  • #1
Jarfi
384
12
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.
 
Engineering news on Phys.org
  • #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.
 
  • #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.
 
  • #4
Jarfi said:
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.

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.
 
  • #5
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:
  • #6
vk6kro said:
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.

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
 
  • #7
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.
 
  • #8
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:
  • #9
meBigGuy said:
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.

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 won't 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.
 
  • #10
Jarfi said:
Also in most communities I explored the arduino were dominant, especially in the drone community.

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 necessary skills.
 

What is a microcontroller?

A microcontroller is a small computer on a single integrated circuit that is designed to control electronic devices. It contains a processor, memory, and input/output ports, making it suitable for simple applications that require precise control.

What are the benefits of using microcontrollers?

Microcontrollers are compact, low cost, and energy-efficient. They can be programmed to perform specific tasks, making them versatile for a wide range of applications. They are also easy to interface with other electronic components and can be easily integrated into larger systems.

What programming languages can be used for microcontrollers?

The most commonly used programming languages for microcontrollers are C and assembly language. Some microcontrollers also support other languages such as BASIC and Python. The choice of programming language depends on the specific microcontroller and the needs of the project.

What is the process for programming a microcontroller?

The process for programming a microcontroller typically involves writing code in a programming language, compiling it into a machine-readable format, and then uploading it to the microcontroller using a programmer or development board. The code can then be executed on the microcontroller to perform the desired tasks.

What are some common applications of microcontrollers?

Microcontrollers are used in a wide range of devices, including consumer electronics, industrial control systems, medical equipment, and automotive systems. They can be found in everyday objects such as washing machines, microwaves, and remote controls, as well as in more complex systems like robots and drones.

Similar threads

  • Electrical Engineering
Replies
10
Views
1K
Replies
9
Views
1K
  • Electrical Engineering
Replies
2
Views
974
  • Electrical Engineering
Replies
13
Views
2K
  • Electrical Engineering
2
Replies
49
Views
5K
  • Electrical Engineering
Replies
3
Views
1K
  • Electrical Engineering
Replies
5
Views
1K
Replies
1
Views
2K
  • Electrical Engineering
Replies
5
Views
1K
  • Electrical Engineering
Replies
17
Views
23K
Back
Top