Embedded Systems Design

Project Suggestions


Projects

Here are some suggestions for projects. As well as providing ideas for projects, they also give guidance to the expected complexity level for a project.

The projects offer a range of challenges in terms of hardware and software, and in implementation some are more open ended than others. You should also consider the extent to which you will be able to work incrementally, or whether everything must work before you can get a useful outcome.

In some cases something similar has been been attempted before, but in others the idea is untried. In this case, there is no guarantee that the project will actually meet its specifications. You are expected to evaluate options and do calculations to check the limits of what is possible before starting implementation.

To make writing your report easier, take notes in a lab book as you progress, including feasibility calculations (for example how much storage is needed), design options, preliminary designs, tests of intermediate steps, and also what didn't work as expected, and why.

So far you have used prototyping boards, plus a printed Circuit Board (PCB) to interface to the LCD. Many of the projects require the same set of basic parts, so we have made a PCB available with the following:

  • ATMEGA328P microcontroller. This is the same as the ATMEGA168 device you have used before, but with more RAM.
  • M25P16 flash memory including library support
  • DS1302 Real Time Clock (RTC) including library support
  • MS24P movement sensor
  • A 6 way analogue/digital port for additional hardware, with a controllable 3.3 Volt supply, and a precision voltage reference for the ADC
  • A BCD switch, screwdriver selectable. This might typically be used for switching from a logging to an output mode, for example
  • Connections for serial (using the lead you have already used) and LCD (using the LCD interface PCB you have already used)
  • And finally, for the challenge, the PCB can be run entirely from a 1 Farad capacitor instead of a battery.

Alternative ideas

Owing to time constraints, not all of the features of the ATMEGA series of devices have been specifically covered in the workbooks, for example:

  • I2C peripherals, such as accurate AtoD converters, memory, clocks.
  • Pulse Width Modulation, often used to control servos
  • Digital to Analogue conversion (using devices with a DtoA built in or resistor ladders)
  • 1 wire serial devices

However they may prove invaluable either in the suggested projects or if you have an idea for a project you would like to try.

Project suggestions

VGA tester

The problem:

When people try to use a projector with a laptop, it sometimes fails to work, and it is never clear which part is not working. A battery powered device which outputs a simple chequerboard pattern to a VGA connector would be really useful in this instance.

Create a battery powered signal generator to generate a test signal on a VGA connector, meeting the timing requirements of the relevant standards. Although the microcontroller cannot keep up with the high bitrate needed for a full VGA signal, a low resolution chequerboard pattern is sufficient for testing. Meeting the VGA standards will require careful timing design, and precise use of timers, but it is possible if the microcontroller uses the highest possible clock rate. See: http://en.wikipedia.org/wiki/Video_Graphics_Array#Signal and http://www.tinyvga.com/vga-timing/1280x1024@60Hz

RS232 diagnosis

The problem:

RS232 communications can be difficult to debug, partly because of confusion over whether the Transmit and Receive signals need to be crossed or straight, and also because unless the baud rate is right, a terminal will probably display nothing.

Create a device to sample a bidirectional serial signal, deduce the baud rates from the pulse widths observed within the signal, decode the traffic and display it on a 2 line LCD, for example top line transmit, bottom line receive. There is a PCB available to do the voltage conversion part of the RS232 interfacing, and make swapping between straight and crossed connections easy. Microcontrollers with 2 serial ports are available, which will make the task easier, for example the ATMEGA644P.

Colour detector

We have a sensor which consists of three different colour detectors (R,G,B) on a small chip, and which outputs a frequency dependent on the light intensity for the selected colour. Because the output is a frequency, it works over a huge range of input intensities, but it cannot be used to detect rapid changes in colour, it is more suited to making colour measurements.

Can you think of an interesting way of making use of this sensor, for example by comparing the results of a colour chart such as http://www.w3schools.com/Html/html_colors.asp across a range of LCD displays.

Lens controller

We use motorized lenses in some of our research projects. These are very good quality, and can often be found very cheaply on the secondhand market because they require a control board. We have made a lens controller PCB for controlling these lenses, with all the hardware in place to control the lens zoom, focus and iris. The PCB uses the ATMEGA168 as its controller.

Write control software for the microcontroller to receive commands via serial to control the lens functions. The lens outputs analogue voltages representing the current zoom and focus positions, and has digital inputs to control the zoom and focus motors.

Where is the hot spot in the PC ?

You have already used the MCP9700 temperature sensor in workbook 2. Using this device it is possible to make a very repeatable and reasonably accurate temperature sensor. Between 4 and 6 sensors need to be deployed in a PC to find where the heat flows are within the case, and which parts get hot in use. The ATTINY45 microcontroller has all the functionality you will need for the temperature sensor part, and as it is in an 8 pin package, it would need less soldering.

Combine several microcontrollers to find the hot spot in a PC. One might be a master, and communicate with several others over a shared serial line, or they might each have a simple SPI type interface back to the master.

Movement detector

We have sensors which are very sensitive to movement. Make a data logger to detect human movement and log it to decide whether the wearer has an active lifestyle. See: http://www.cl.cam.ac.uk/teaching/1011/P31/docs/MS24.pdf

Consider whether it is more efficient to log start/stop times, or active/inactive every second. Use sleep mode to extend the battery life. How long can the device work from a miniature coin cell, or even a large capacitor. Consider how the data might be stored and later offloaded, and how to tell the wearer whether they are being fit or a couch potato. The project PCB is probably ideal for this logger.

Radio link

Use 2 microcontrollers and a radio transmit/receiver chip such as the ER900TRS to make a radio link, which would work as a serial extender. Using a real-time clock or the timers in the microcontroller, or more probably both, synchronise the transmit and receive so that a batch of data is sent every minute, and sleep the rest of the time. See: http://www.cl.cam.ac.uk/teaching/1011/P31/docs/ER900TS.pdf

Polar movement

We have a chess playing robot which uses two stepper motors and two arms to move the pieces using a magnet under the board. The current movement is a bit jagged, and could be improved by interleaving the pulses to the stepper motors. To make things more complex, the two arms have different step sizes. Ideally the movement should be as close to cartesian as possible. As an example of the movement, think of how you would draw a straight line if your wrist was in a plaster cast and you could only move your elbow and shoulder joints. The mechanical parts and stepper motor drive electronics are complete.

Program a microcontroller to execute smooth* linear movement for the arm and magnet assembly, by issuing appropriate stepper motor control signals.

This is a challenging project, and will need more time than just the remaining 4 sessions. You might want to look at the mechanism, and talk to Brian Jones about stepper motors before deciding to undertake this project.

*OK, maybe not that smooth when operating at the limit of reach.

Dynamic frequency recorder

Make a recorder for sound which adapts its sample rate to match the frequency of the sound being sampled. For example the flow of water in a pipe will produce a characteristic sound, and if it is assumed that the rate will not suddenly change, the recorder can adapt the sample rate to minimise the memory required to store the samples.

Intermittent sound recorder

Make a recorder for sound which ignores quiet periods, but timestamps and logs louder sounds, including something like 1 second prior to the sound exceeding the threshold, and a few seconds after.

Security / knock pattern sensor

Some of the roadside cabinets for telecommunications are fitted with shock sensors to detect attempts at forcible entry. To avoid the alarm going off during authorized entry, the engineer might be required to enter a characteristic sequence of taps to the cabinet to disable the alarm. See: http://www.cl.cam.ac.uk/teaching/1011/P31/docs/MS24.pdf for details of a suitable shock sensor.

Digital safe

Create the electronics for a home or hotel digital safe. The lock mechanism would be driven by a servo, and you would need to implement a 4 or 6 digit key code to gain entry. These devices are battery powered, so it is important to sleep for nearly all the time, and to energise the servo for only a very short period. With a home safe, you enter the code, the door unlocks, then stays unlocked until you close the door, as detected by a microswitch. For a Hotel safe this almost guarantees that guests will leave the safe empty but locked with an unknown code when they leave, so the mechanism will need to be programmed differently.

Power clamp logger

Using a clamp meter which produces a voltage in proportion to the current in a wire, make a logger which calculates and logs power usage over time, with the ability to output logged data via serial, and the ability to show cumulative power used on an LCD.

Digital compass

Using the HMC**** chip which has an I2C interface, create a digital compass. You will need to devise a suitable display for the user to show them their heading. Then, make a logger which records the heading every few seconds, and which can calculate a very rough bearing back to the starting point, and display it to the user.

Copyright Ian Wassell and Brian Jones 2009