Jump to content

MSP430G2553 project . need some help. please!

Recommended Posts

Hi everyone! 


I have to do a digital tachometer . 


Informations : 

- speed range : 300-600 rot/min ; 

- measuring time : 0,2 seconds ; 

- display resolution : 10*rot/min;

- optical warning when overruning from 550 rot/min . 


My teacher said that i should generate a signal with two timers on a pin and then to convert it into rotations per minute . After that i should display it on 7segments or LCD display . 


I will be very grateful if you will help me with this project ! Thanks !

Link to post
Share on other sites

First, this is a school assignment, so we'll give you hints at best.


Then, try to describe what should exacly happen, which signal should go high/low when, why, what does it represent.

Try to split the task in blocks, for example: measuring the tacho, calculating the RPM, display a value on the display.

If you have the separate tasks working, only then start to integrate them into a whole.

Link to post
Share on other sites

Unfortunately, my teacher doesn't help me very much ... He didn't learned us almost anything about microcontrollers but he espects from us to search on google and make this project . 


This is what he told me about how to make the signal generation :  ... it's about setting two timers ... a formula about frequency ... external interrupt ...


And, I think a different method is changing the duty cycle  .


I don't know what to do ... if i will not make this project, then i will not be able to give the exam, which is very hard . 

Link to post
Share on other sites

I have MSP430G2553 LaunchPad . 

I have Code Composer Studio 5.3.0.

Display should be LCD or 7 segments . 


I asked my teacher if i can do my project like in this tutorial : http://www.pyroelectro.com/tutorials/digital_tachometer_rpm/parts.html with IR emitter diode and IR Detector ... and he said that this is difficult and that i should generate signal (for 0.2 seconds)  on a pin of the microcontroller and connect with a wire to another pin of the microcontroller and make the conversion to rotations per minute .. and then..  display it . 

We are counting how many rotations are in 0.2 seconds .

Link to post
Share on other sites

My display suggestions:


16x2 char display- $5, requires 6 wires, pretty easy to implement

Nokia 5110 LCD - $4-$5, requires 4 wires, large screen, rather easy to implement (43oh store has a BP board for it.)

7 segment LED module - $5, depending on how the module is done, might require 3 to 11 pins, should be easy to implement. You can also make your own module, but I would suggest getting one that is already assembled.

7 segment SPI - $2, requires 3 wires, easy to implement


Serial comm is very easy to do, your PC acts as your display, you see your output on the Terminal screen.


Here's my suggestion for your app:


TimerA0 generates pulses. If you want to get fancy, you can connect a pot to one of the analog inputs, use ADC to measure it, and adjust the "speed." you can also use the internal temp sensor to change the "speed."

TimerA1 is used to count the pulses


The rest depends on which display you choose


You can find all the code you need right here on 43oh.

Link to post
Share on other sites

Unfortunately, my teacher doesn't help me very much ... He didn't learned us almost anything about microcontrollers but he espects from us to search on google and make this project . 


FWIW, I don't think this project is hard.  You kids have it easy now...everything is easy to learn how to do by searching or watching youtube videos :-)

Go through the MSP430 tutorials so you can learn how to program it.  It's easy:



Then buy an LCD display and look at the data sheet on how to program it or look for MSP430 LCD examples and buy the one they specify.

Mount a wheel w/ a hole and add a contact or hole or something to let you know when it has turned.


Go hack on it for a while and tell us where you get stuck.  You don't have classmates you can work with this on?

Link to post
Share on other sites
  • 2 weeks later...

I did something almost identical recently - not the generation of pulses but the tacho part. My project is to count pulses from a water flow sensor to ensure water is flowing. I was actually trying out Grace to see if that was any good and it had 90% of the configuration done with a few clicks. (I'm not sure I'm a Grace convert yet though. It didn't help much with ADC and that's the bit that always causes me pain.)


It's about as simple a tacho as you can get and I'll explain it from the basics. I'm not sure where you are on this, so ignore me if you're already past this stage.

  • I declared an unsigned int counter variable with global scope and ensured it was declared as volatile.
  • I set up a pin as input and to trigger an interrupt. On this interrupt I incremented the counter variable.
  • I set up a timer to cause an interrupt every second. On this interrupt I checked the counter variable and then reset it to zero.


I could send you this simple code, but as it's a school project you'll learn more by working it out for yourself. And there's plenty of improvements that can be made. Going beyond the bare minimum for a project can earn you extra credit. Rather than counting pulses over a certain period, would it be better to measure the time between pulses? How can you avoid jitter? With my simple example a fixed 2.5Hz signal would show as 2 then 3 then 2, etc.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...