views:

1265

answers:

17

I've always been fascinated by microcontrollers and I'm planning to do a few hobby projects just to satisfy my inner geek :)

I'm looking for ideas and motivation, so what did you develop using a microcontroller?

If possible please state the microcontroller and/or development environment and an estimate on hardware costs beyond the basic equipment (if applicable).

I'm interested in both successful and failed projects and any problems you encountered.

+4  A: 

I made a device that measured distance using ultrasonic transducers. The microcontroller drove the transducers directly. It could measure distance very accurately by just counting the number of iterations in a loop that waited for the return signal. The time for one iteration is very easy to calculate by knowing the clock speed and number of instructions in the loop.

Matt Spradley
+4  A: 

We made an ultra-short baseline (USBL) acoustic pinger locator for an autonomous underwater vehicle, as a project for an embedded systems class. Essentially the problem is to figure out which direction a sound (a ~1ms ping at a known-but-variable frequency every 1s or so) is coming from using three passive underwater microphones (hydrophones) spaced less than an inch apart. The vehicle was being constructed for the AUVSI competition, and the vehicle would have to use the output of this system to navigate to the beacon and surface (within a few feet of the actual pinger). The vast majority of the effort went into the signal conditioning hardware, PCB design, and so forth, but once we had converted the analog hydrophone waveforms to filtered square waves, we used an FPGA board with an embedded Microblaze soft core. We designed some custom hardware in Verilog to time the pairwise time-of-arrival disparity between all 3 hydrophones for every period of the chirp, and interfaced it with the Microblaze on the FPGA. The Microblaze then did the trigonometry to convert these times differences into estimated angles, and averaged many estimates in an intelligent way to come up with a single pretty-good estimate every chirp, which was then communicated to the vehicle's main processor via a serial port.

The development environment for the FPGA was a mixture between Xilinx ISE for the hardware portion of it, and Xilinx EDK for the software that ran on the Microblaze (it included a GCC-based toolchain for compilation).

Students can get pretty good prices on Xilinx ISE and EDK, but be prepared to pay a couple hundred dollars if your company/university doesn't already have it. Hardware-wise, another $400 should cover the FPGA board plus a spare, costs to have a few copies of the PCB fabbed, parts to populate the boards, etc. This of course assumes that you have the necessary soldering irons/reflow ovens (you can use a toaster oven (we did)), instruments (a power supply, multimeter, oscilloscope, and waveform generator), etc.

The full report can be found here.

Good luck!

Matt J
+1  A: 

Have you seen Ironman? (If you haven't, go rent it! For once the geek is the uber cool hero :D ). He got a system which handles everything in the house. Unrolling curtains at morning time, telling the weather forecast, etc. etc.. I've been sketching this system for my own pleasure, but I'm too lazy to create it. Maybe it's an idea for you :)

You could start out by something small, say, an alarm that unrolls the curtains in the morning.

cwap
A wife is cheaper :P
Aiden Bell
That's not what I've heard! :P
Matt J
+4  A: 

I love doing microcontroller projects...

Let's see, in the past 8 months I've been using mostly the AT90USB1287. It has a bootloader on it so you don't need a programming kit to program it (although you do need flip). You can use an eclipse plugin as your IDE if you don't like AVR studio 4 (which I never liked). The plugin is avaliable here

The microcontroller kit itself costs about $40 canadian and it comes with 4 LED's, a tiny 4 way joystick, and a temperature sensor. You can do alot with this little kit. Projects I've worked on recently include dancing roombas (I really need to talk to the professor about how he mispelled my name) That was costly in material though. Radios tend to go for about $20 each, and roomba's are about $100-150 referbished.

More recently, I was part of a group that made an autonomous model hovercraft that follows walls. The lift motor we took from a leaf blower, and was about $60 (and very much over powered). Each of the other motors was around $10 each and the high powered H-bridge needed to power them was $8. If you went smaller on the size you could probably do that project under $50 (on top of the microcontroller cost).

For debugging I strongly suggest you pick up a USB to UART converter, they cost about $20 and you probably only need one. It will let you output text from the microcontroller to a serial port in your computer, which can be displayed in hyperterminal (pre-installed in XP) or tera term (one I like beter, plus hyperterminal isn't pre-installed in vista)

Michael Walts
+3  A: 

I recommend the Arduino platform. It is quite easy to learn and there is plenty of ressources out there to help you get started. Hardware cost is minimal. You can get everything you need for under 40$.

See also the following related questions:

You can also find inspiration on the following websites:

JcMaco
+2  A: 

Might be a bit off-topic (it's really big hobby project) but it's cool: I helped develop the command and data handling subsystem of a small satellite that's based entirely on microcontrollers.

We had controllers do the following things (among others):

  • Control the deployment sequence of solar panels and antennas
  • Generate the control signals for and measure I-V curves of experimental solar panels
  • Interface with a wireless receiver inside the satellite that receives data from an expirement on the other side of the satellite
  • Generate valid telemetry frames and sending them through a VHF radio to Earth
  • Decoding and interpretation of commands received through a UHF radio and sent from Earth
  • Collect various measurements throughout the satellite and compile telemetry frames for sending them to earth

All of this in space of course and it has been running successfully ever since the launch which was over a year ago!

For controllers we used multiple controllers of the PIC18 series, for which we developed in Microchip's MPLAB IDE and used MCC18 compiler. For the main computer we used an MSP430 series controller from Texas Instruments for which we developed using the Crossstudio IDE from Rowley.

For more information about the satellite visit http://www.delfic3.nl/

Albi
That's a lot cooler than my CRUD application!
NotDan
+1  A: 

A friend of mine wanted an adjustable voltage -> PWM controller for his car. So I whipped one up with a PIC12. Used a lookup table for the PWM values so you could specify your curve in Excel then import it into the microcontroller. So you could have logarithmic relationships, squared, linear, etc. Too bad he didn't end up using it :(

Stephen Friederichs
what part of the car takes PWM inputs?
AShelly
+1  A: 

While I program microcontrollers professionally (my co-worker builds them), it is only a side business. A necessary evil so to speak.

Our boards are roughly digital I/O boards connected to the PC on one side (ethernet, serial 232/422) and the customers PLC's on the other side. The reason is mainly because customers seem to have chosen to standarize on a different PLC.

Usually the boards also provide encoder signals to other electronics (lamps and cameras). Everything galvanically insulated and capable of working with relatively high (50k+) frequencies. (no rocket science, but know your components). Small series, think several tens an year.

While we started with Microchip PIC18, we moved on to dspic33, except for the ethernet parts which still are PIC18 (the dspic33 16-bit parts with ethernet are scheduled for this summer I believe).

Think 2 serial in, 32 digital out + 16 digital in, CAN, (to link multiple boards), SPI (extra I/O expansion) and encoder building blocks. The boards have multiple options to place the components (e.g. RS422 instead of 232, inverting the polarity of the inputs etc)

A lot of work went into deciding which pins to use for what (these don't have a crossbar switch to software select pins), so that the pins are chosen in a way that some of the pins can be used for different purposes, e.g. pins with hardware counters attached to them are used as inputs, similarly for the second SPI port etc.

We program them in mplab, and usually the software is pretty simple, but gives us great flexibility. Most of the heavily lifting is done by the peripheral components (counters, de/encoder parts, pins with interrupts attached etc), and the code doesn't have to be very optimized since it is only rarely pollling.

Marco van de Voort
+1  A: 

The department I work in does nothing but embedded systems. Specifically, we design the PCBs and write the software which sits inside industrial equipment used in the petrochemical, power and water industries.

At the moment, a number of us are using the STM32 microcontroller from ST. ST have a "primer" for beginners and hobbyists called STM32 Circle. More standard development boards are also availble, such as this one from Keil, which comes with a code-limited (though fully functional) version of the Keil STM32 compiler.

We are using the STM32 for projects including:

  • The "motherboard" for one of these pieces of equipment, which does machine control and some communications;
  • Network cards for different industrial networking protocols;
  • An industrial remote control, which allows wireless communications with our products for extracting data, and updating firmware in the field.
Steve Melnikoff
A: 

My first project was to receive IR signals. TV, VCR (at the time), etc remotes and such. There are a handful of protocols, radio shack does or did carry a usable receiver. At the time I used a PIC developers kit, had to use a chip puller to pull the pic out of the proto board, put it in the programmer, reprogram it, place it back in the proto board, repeat. IR is a simple yet good learning project. From day one you write a few line program to copy the state of the input bit to an output led (once you learn to enable and configure GPIO), and you can "see" your remote control signals as the led blinks. Then go from there with measuring the timing of the pulses.

I current use olimex and other boards primarily from sparkfun.com (click on development boards). I highly recommend ARM based as that is going to have the most value to your resume, but the arduino is a nice low cost start, and there is a lot of support for that chip as well on the net. The msp430 (and arm) are nice for learning assembler. I also highly recommend the luminary micro boards, but they were just bought by TI so I dont know if TI is going to keep that product line as is or change it. The luminary boards pack a lot of goodies on board for a low price, you are limited on I/O though. It depends on what you want to do.

dwelch
A: 

most complicated thing i built was a PIC18 (the one with on board ethernet) which in turn controlled an analog devices sigmaDSP which is a audio codec with an audio specific DSP inside, digital in/out and 4 channels of analog out, so i fed the dsp from the spdif output of my computer and ran the analog outs into 4 channels of class D amps model ADAU1592 (up to 18W per channel)...these provide power to a couple of speakers, bi-amped, so 1 channel on the tweeter, one on the woofer...the pic talks to my computer through ethernet and can load new programs or modify values in the DSP. can fit about 30 bands of eq, range compression, stereo enhancement, clipping, etc into the DSP, works great.

i do embedded design for a living and had experience with these parts before which made this a rather simple project really

A: 

I built something very much like this: Analog and Digital Propeller Clock

I used a PIC micro and wrote the code in PIC assembly. Other people had done code for this, but I did it from scratch so I could add an extra feature—infrared remote control—which required a non-preemptive multitasking architecture.

However, I found that writing in assembler was not much fun compared to C, and at that time free C compilers for micros were not really available. Now, I'd prefer to try an Atmel processor with the GCC compiler.

Craig McQueen
+1  A: 

I personally use the Mikrotronika EasyPIC5 Development board. Well worth every penny and cost about 120 GBP. I started in learning in Assembly but soon switched to C of which a fully working evaluation copy comes with the Kit.

The Development Board contains everything you need for Rapid Application Development and plenty of example code.

I don't get enough time on my projects as I would like but this certainly makes development easier as I get immediate results.

Manufacturers Website

Paul
A: 

I made a little device that plugged into a US telephone line and announced the number of the caller from the CallerID information.

Parts: Motorola CallerID decoder chip, PIC 16C84 microcontroller, ISD sound chip, mini 8-Ohm speaker, diodes, capacitors, RJ-11 jack, 9 V battery.

Cost: $35 in 1995. The ISD chip was nearly $20 then because it was so new.

dwhall
A: 

One of my projects was to attach one of my microcontrollers to an ethernet network and be able to send and receive data. Then it could do tricks when it received commands. This is a great networking task.

Completely written in Motorola Assembly (68HC11)

Joe Philllips
+1  A: 

I made a network-based motor controller for programming sequences of large motor movements. I used a Rabbit RCM-2100 for the network communication and an LM628 motion-control IC to run the PID loop. The Rabbit is a simple socket server that listens for incoming commands, parses them, and then sets up the motion control chip to move a motor. The motion controller sends out an analog speed signal (+/- 10vdc) and then decodes position information from a quadrature encoder on the motor. The RCM2100 also watches a few other digital inputs in case it needs to interrupt the motion prematurely. There are inputs protected by optocouplers for fwd and rev limits, emergency stop, and manual override.

You can build up a network of these motor controllers and have literally dozens of motors all being driven by a PC sending out movement requests. The PC runs some software that I wrote in VB.Net & WPF.

This started out as a hobby / side project and became the foundation for my own business. These motion controllers are now used in live theatre to run special effects. Take a lookt at Creative Conners to see the current product.

I really like the Rabbit stuff. They sell great dev kits for $200 or less that include a prototype board, a C compiler and basic editor, programming/debugging cable (RS232), and a good amount of sample code to get you started. If you want to do any network programming their core modules are super easy to use, they come packages with all the necessary glue logic and an RJ45 jack.

gbc
A: 

I`ve been working professionaly with microcontroller by 3 years now.

One of my works was a electronic weight scale for any kind of load cell. It could be used to weight a truck or one pound. It was created using a PIC18F.

Other nice job was a fingerprint recognition hardware. My company bought a fingerprint module from Nitgen and the PIC microcontroller made the interface between this module and a truck tracking system.

In these projects I used a CCS compiler, but I don`t recommend it because it has lots of bugs. Some code goes always in assembler.

RHaguiuda