Jump to content
43oh

light alarm clock project using msp430


Recommended Posts

Awesome, so the programmer part of the launchpad was draining your batteries?

Ddi you make any progress on your buzzer problem?

buzzer problem is still out there :/ i guess i must make an inspection step by step. wish there was a debugging tool for energia so that i could follow up the variables.

 

battery problem is fixed by mbeats' suggestion of disconnecting VCC and RTS jumpers. my code is still heavy ^_^

Link to post
Share on other sites
  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

After many hours of working on displays,buttons, menu systems and so on, here is my result work. (The clock somehow lags significantly up to 5 minutes in about 6 hours) But i haven't try the new RTC

@roadrunner84 tone() and notone() are standard Arduino functions. They are part of Energia. They can be seen in the Energia's library folder

That's a huge slab of code!   I have some questions (although I cannot read your comments) (((sayi%1000)%100)%10)%1) a number divisibe by 10 is also divisible by 100 or 1000 (as 100/10 is a round

Posted Images

ok. i gave up after working on this problem too much. alarm sound isn't working.. it gives a clean buzzer sound at the first alarm but when i re-set the alarm; second alarm isn't working good (just like in the last video i have uploaded) 

 

because i decided that i won't able to solve this on the CODE partt, now i must find some alternatives; actually i am stuck on this and i need suggestions.. what i think now are ;

 

 -can i use a capacitor to make the buzzer sound smoother? cause at the second time it makes that disconnecting effect like ON and OFF square wave? 

 

-can i totally seperate the sound part; even making the sound generator (a simple one, by using a 555 maybe) externally and control it with the launchpad ? (but this control signal may interrupt just as in the buzzer sound itself)

 

as i said; suggestions are welcomed.

 

 

post-30056-0-30043700-1361259756_thumb.jpg

Link to post
Share on other sites

ok. i gave up after working on this problem too much. alarm sound isn't working.. it gives a clean buzzer sound at the first alarm but when i re-set the alarm; second alarm isn't working good (just like in the last video i have uploaded) 

 

because i decided that i won't able to solve this on the CODE partt, now i must find some alternatives; actually i am stuck on this and i need suggestions.. what i think now are ;

 

 -can i use a capacitor to make the buzzer sound smoother? cause at the second time it makes that disconnecting effect like ON and OFF square wave? 

 

-can i totally seperate the sound part; even making the sound generator (a simple one, by using a 555 maybe) externally and control it with the launchpad ? (but this control signal may interrupt just as in the buzzer sound itself)

 

as i said; suggestions are welcomed.

There are some cheap mp3 modules that can be triggered via a simple serial (not uart) protocol or gpio. It would let you play music as an alarm, or sound effects, even in a programmed sequence or in order.

Link to post
Share on other sites
 

 

post-30056-0-30043700-1361259756_thumb.jpg

I doubdt that a control line just enabling the buzzer would get interrupted. You can give it a try and see whether it's working.

i have tried to that many times.. the problem is i have to use a control button to stop this sound when i woke up. if it is pressed up, it will stop the buzzer. maybe that part has issues, but why it is working the first time.. i am so mad i guess i will smash my launchpad : )

 

btw i have added a picture, can you comment it might work in my case or not please?

 

post-30056-0-30043700-1361259756_thumb.jpg

Link to post
Share on other sites

There are some cheap mp3 modules that can be triggered via a simple serial (not uart) protocol or gpio. It would let you play music as an alarm, or sound effects, even in a programmed sequence or in order.

I have some problems finding such modules since i live in turkey. but i guess i have found an sd card module.. worth trying for better results indeed. i would like to wake up with the song of "wizard " by "black sabbath" : )

Link to post
Share on other sites

If it's working fine the first time (after power up) and not the times thereafter, then you probably forgot a part in your clean up (ar re-arm) phase when stopping the alarm. Some timer that starts working with the buzzer but you forget to disable or clear? A pin that changes output mode?

 

Do you have the code of the tone() and noTone() routines?

Link to post
Share on other sites

If it's working fine the first time (after power up) and not the times thereafter, then you probably forgot a part in your clean up (ar re-arm) phase when stopping the alarm. Some timer that starts working with the buzzer but you forget to disable or clear? A pin that changes output mode?

 

Do you have the code of the tone() and noTone() routines?

void buzzerbaslatma(void){
basl_buz:

buttonState33 = digitalRead(buttonPin3);
//if(buzzermode=!0){tone(speakerOut, 600);}else{noTone(speakerOut);}

  
  
  if ((buttonState33 != old33) &&(buttonState33==0)) {   

goto nos2;

  }
  else{
    old33=buttonState33;
  }   
  ledyazdir(16,1); //N
  ledyazdir(0,2); // 0
  ledyazdir(0,3); // 0
 ledyazdir(0,4); // 0
switch(buzzermode){
  case 0:
  noTone(speakerOut);
  break;
  case 1:
  tone(speakerOut, 300,500);
  break;
  case 2:
  tone(speakerOut, 600,500);
  break;
  case 3:
  tone(speakerOut, 600,500);
  break;
  }
//tone(speakerOut, 600);
  digitalWrite(powerled1,HIGH);
goto basl_buz;  
nos2:
noTone(speakerOut);
alarmonoff=0;snz=1;
   for (int jk=0;jk<150000;jk++){int jk2=map(jk,0,150000,255,0);analogWrite(powerled1,jk2);if(jk2==1){break;}}  
digitalWrite(powerled1,LOW);ledbrightness=0;

}

 

here is the tone() noTone() routiens. I have tried different configurations with that but none of them has worked :/ i have even tried to reset all the variables(global) as its default values (at the beginning of the code)

Link to post
Share on other sites

I would check all the physical connections too. I had a strange case where a shift register was hooked up to some LEDs. It worked the first time but instead of resetting after power was completely removed, it would show the last thing it had displayed when the power was reconnected. I couldn't get the MSP430 to communicate with it again until I removed both chips and put them back in. It turned out that one of the wires to ground had come loose.

Link to post
Share on other sites

No, I mean, you call the routines tone() and noTone from this routine, but I can't see what's in them.

Where is the "void noTone(pinname){....}" part?

ermmm.. i didn't use such a code at all.. isn't that necessary for making melodies etc? all i ask is a annoying buzzer sound so i have used just the frequency.. ?? : /

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.

Guest
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...