Beginner Microcontroller Project Resources?

In summary: Basically is uses the ATmega328 microprocessor except it all ready has a custom bootloader and it's completely wired to a printed circuit board.I third the Arduino. It is easy to use. I use one to control the opening and closing of my chicken coop door. With an added external real time clock the Arduino calculates sun rise and sun set and opens and closes appropriately. :)For more compute power you can go to the LeafLabs Maple board. It is an Arduino but with a much faster chip.I've always thought that was a load of crap. I learned how to program in BASIC (first language) with a Commodore PET computer. From day one I've looked for ways to
  • #1
phlegmy
120
0
Hey guys

I've been toying with the idea of building a diy digital annometer
I'm hoping it can be achieved with a device which rotates in the wind
which will generate pulses from a light interupted switch.

The pulses will be sent to a microcontroller which will use the info to
calculate the windspeed and output the result to an lcd screen
or even a pair of 8 segment led displays.

THE BIG ISSUE:
I've never used a microcontroller and am finding it diffucult to come across
very simple examples on the net.
So if you have any advise/guidance or litrature recommendations please share! :)

My circuit building experience is limited to simple op-amp circuits in college,
but I'm confident that once i come up with an electronically sound circuit i will be able to build it

My programming experience is limited to Visual Basic and programming PLC's in college.
but again learning the nescessary code should not be a big problem!

Thanks,
James
 
Engineering news on Phys.org
  • #2
My programming experience was limited to VisualBasic also (before that QuickBasic) and I managed to learn C and work with PIC uProcessors in a few months without anything except a book on C and the data sheet for a PIC 18F2520. Self taught. The data sheet is like a thick book, but I found it fascinating learning about all the PIC is able to do.
-
Microchip has a lot of resources on their website. I would recommend checking it out and downloading their programming environment. I ordered the PICKit and used the free programming environment MPLAB and it did everything I wanted it to. I'm sure it would for you too.
 
  • #3
Thanks nova,
The i'll check out MPLAB,
 
  • #4
Also check sparkfun.com for some kits, programmers, and other interesting bits.
 
  • #5
http://www.arduino.cc/

The language is c, but the programming in a uc is so limited that there isn't much difference between c and basic.

The important points are the dev environment is nice, a gui editor with a single button compile and download, and vast online resources and users sites
 
  • #6
NobodySpecial said:
http://www.arduino.cc/

The language is c, but the programming in a uc is so limited that there isn't much difference between c and basic.

The important points are the dev environment is nice, a gui editor with a single button compile and download, and vast online resources and users sites

I would differ on both assertions in the first sentence and argue from tortured experience that the second sentence is problematic...

While _some_ micro-controller applications may lend themselves to simple expression, there is a vast difference between c and basic at even that level. Also, there is a hypothesis that learning Basic as one's first language precludes the subsequent acquisition of correct programming habits.

I also believe that dependence on nice GUI dev-envs with single button what-evers exacerbates the issues with learning correct programming habits and makes it even harder/impossible to trouble-shoot the inevitable problems.

But I'm an old curmudgeon.
 
  • #7
schip666! said:
Also, there is a hypothesis that learning Basic as one's first language precludes the subsequent acquisition of correct programming habits.

I've always thought that was a load of crap. I learned how to program in BASIC (first language) with a Commodore PET computer. From day one I've looked for ways to keep code better structured, easier to edit, more self-explanitory, etc. Langauge has nothing to do with it. Granted, some languages are more suitable for certain tasks.
 
  • #8
I would second the idea to use the Arduino controller.

Basically is uses the ATmega328 microprocessor except it all ready has a custom bootloader and it's completely wired to a printed circuit board.
 
  • #9
I third the Arduino. It is easy to use. I use one to control the opening and closing of my chicken coop door. With an added external real time clock the Arduino calculates sun rise and sun set and opens and closes appropriately. :)
 
  • #10
For more compute power you can go to the LeafLabs Maple board. It is an Arduino but with a much faster chip.
 
  • #11
Averagesupernova said:
I've always thought that was a load of crap. I learned how to program in BASIC (first language) with a Commodore PET computer. From day one I've looked for ways to keep code better structured, easier to edit, more self-explanitory, etc. Langauge has nothing to do with it. Granted, some languages are more suitable for certain tasks.

If you had to _look_ for ways to make your code better you probably looked BASICly elsewhere, no? I need to learn to use those little smiley-face things...

I did, sort of, learn Fortran as my first language, then some ASM, then some Basic, and now am mostly proficient in C and (low level) Java. I don't remember that there is any way to structure Basic code, nor a way to manipulate data structures beyond simple arrays. Probably times have changed things beyond my ability to recognize though.
 
  • #12
schip, I assume you meant that basic allows 'sloppy' programming habits. Non-declaration of variables is a start. While you are correct, that is not to say the language creates sloppy programmers. I find in life that if people are sloppy at one thing they are sloppy at another. While a good programmer will have good habits, those good habits are not what make the good programmer. It goes beyond 'habits' and language should be no barrier. Also, simply because BASIC (or any other language) has some limitations and is unable to do something specific is not an excuse for a sloppy programmer. It also comes down to what is considered slopppy.
-
Probably times have changed things beyond my ability to recognize though.
I suspect so...
 
  • #13
well
i've made a start and ordered a book
"pic your personal introductory course" by john morton"

i'm starting from scratch so i'll make my way through this book
and come back later when i actually buy a microcontroller

Thanks for the contributions!
James
 
  • #14
phlegmy said:
well
i'm starting from scratch so i'll make my way through this book
and come back later when i actually buy a microcontroller

I don't recommend just starting off with only a book. I think being able to have something physically there to play and experiment with while learning makes the experience a lot more fun and fruitful. PICs are cheap (free if you're a student) and the programmers are very inexpensive for the features they have (I recommend the pickit 3).

When it comes to electronics, you really don't learn anything until something goes wrong and you have to bang your head against your workbench for a while until you figure out a solution. You can't get the same effect by banging your head against a book.
 
  • #15
hey topher,
book arrived yesterday, I'm on page 40.
you're right,
i'm going to buy a cheap starter kit.
i want to have a functioning digital anemometer by end of feb. steep curve ahead!
 
  • #16
UPDATE
i eventually bought a shipment of parts which arrived in March,
Everything including a Breadboard and resistor packs, capacitors, soldering iron and 7 segment LED displays, and of course some microcontrollers (pic 16f57) and a pickit2.


I initially found it tricky to set up;
I had to make up my own "programming board" to program the 16f57 using the pickit2
It also took some time before i assembled a program without errors!
But once i had the basics of how to write a simple program (turn a led on), assemble it, program it, and test it, it quickly became much more fun! (and sometimes frustrating!)

I decided to stick with assembly rather than learning C or some varient,
It is very easy to learn for the 16f57 as there are only 32 instructions,
and i enjoyed the challenge of constructing more sophisticated functionality from
a limited number of instructions.

I've all but completed the project (an anomometer) which set me out on this venture, and am pleased to report that its working more or less how i hoped it would.

So thanks for the suggestions and pointers back in january!
james
 
  • #17
waytago. dude!

But ASM...you do like a challenge.
 
  • #18
There are many good cheap microcontrollers you can use. TI, Freescale, Atmel, Microchip, etc. The Atmel AVR 8 bit micros are a good place to start. AVRFreaks.net has all the information you'll need. Call your local distributor, Avnet, Arrow, etc and see if you can talk them into loaning you an STK500 development kit. Start with an ATTiny part or an ATMega8 and start writing code in assembly. Learn how to read the datasheet and read write all the registers in the part and what they do. Don't start writing C code until you really understand the assembly language code. C compliers are not always your friend and if you can't read the assembly code you won't always know what the device is really doing.
 

What is a microcontroller?

A microcontroller is a small computer on a single integrated circuit that is designed to control specific functions in electronic devices. It contains a CPU, memory, and input/output ports, and is often used in beginner electronics projects.

What are some resources for beginner microcontroller projects?

Some commonly used resources for beginner microcontroller projects include online tutorials, project guides, forums and communities, starter kits, and microcontroller development boards such as Arduino and Raspberry Pi.

Which programming language is typically used for microcontroller projects?

The most commonly used programming language for microcontroller projects is C or C++, although some development boards also support other languages such as Python and Java. It is important for beginners to choose a language that is well-supported by their chosen microcontroller board.

What are some basic components needed for a microcontroller project?

Some basic components that are typically needed for a microcontroller project include a microcontroller board, breadboard, jumper wires, LEDs, resistors, capacitors, and a power source. The specific components needed will vary depending on the project and the chosen microcontroller board.

Are there any safety precautions to consider when working with microcontrollers?

Yes, there are some safety precautions to consider when working with microcontrollers. It is important to always disconnect the power source before connecting or disconnecting components, and to double check all connections before turning on the power. Additionally, beginners should be cautious when working with high voltages and should always follow the instructions and guidelines provided by the microcontroller board manufacturer.

Similar threads

  • Electrical Engineering
Replies
5
Views
1K
  • Electrical Engineering
Replies
5
Views
1K
  • Electrical Engineering
Replies
11
Views
7K
  • Electrical Engineering
Replies
5
Views
3K
Replies
6
Views
6K
  • Computing and Technology
Replies
5
Views
2K
Replies
4
Views
4K
  • Electrical Engineering
Replies
8
Views
17K
  • Electrical Engineering
Replies
2
Views
3K
  • Electrical Engineering
Replies
12
Views
2K
Back
Top