NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » Piezoelectric Sound Level Meter - Need some help

December 17, 2011
by Tohyj
Tohyj's Avatar

Dear All,

I am currently doing a project using the piezoelectric sound level meter.

I am really bad at the C++ programming. I tried to understand and modify the temp sensor programme, but i have really no clue what the programme is talking about. I do not know which part i can modify the programme and i dont know where to start. I also did some reading online, but it seems different from the temp programme.

Does anyone has done this Piezoelectic sound level meter programming ? Is it possible if someone can send me the programme for reference ? So that i can try writing my own programme to start somewhere.

Thanks.

Regards, Tohyj

December 18, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Tohyj,

The sound meter project is a pretty difficult project, so I would not recommend jumping right into it as your first project. I highly recommend you go through the entire NerdKits Guide, which will get you used to working with projects as well as Makefiles.

Once you feel you are ready to jump into the sound meter, you can start with the code that we posted for that project on its video tutorial page.

Humberto

December 18, 2011
by Tohyj
Tohyj's Avatar

Thank you so much Humberto!!

I will take your advice, i will go through the guide again and again till i get it right, NOW.

Tohyj

December 21, 2011
by Tohyj
Tohyj's Avatar

Hi Humberto,

Can i check with you, which Makefile do i use for the LCD Source code for the sound meter circuit ?

Regards, Tohyj

December 21, 2011
by Tohyj
Tohyj's Avatar

Hi Humberto,

So sorry, i just figured it out!

Can i ask another question? The display duration of the result seems to be very short. i do not have enough time to take down the readings. how can i delay the it?

Regards, Tohyj

December 21, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Hi Tohyj,

I'm not exactly sure what you mean here. The sound meter is constantly taking sound amplitude readings as fast it can and displaying those readings on the LCD. If you make them display for longer the readings are going to lag behind real time, and the lag will keep growing. What exactly are you trying to measure here?

Humberto

December 24, 2011
by Tohyj
Tohyj's Avatar

Hi humberto,

Because the readings displayed too fast, I am unable to take down the values. For example, I measured a sound, it displayed max, min and diff values. But I don't have enough time to take down the readings. Is it possible to delay the display for about 10sec? Then after 10sec later take another readings. Or by using a switch to start another measurement.

Another question: what does the values stands for about? For example, the max value start at 560+, min : 580+, diff: 20+. What does all those values stands for?

Really thank you so much for Helping!Helping

Tohyj

December 24, 2011
by treymd
treymd's Avatar

You could insert a delay in the while loop within main to "slow it down", but realize that you will be missing samples during this delay period. If you for instance wanted to capture the highest value a certain noise produced, it might just happen during that delay, and be lost.

You could of course, try other means of capturing the data, perhaps use the uart to transmit all of the data to a PC for capture, or even use the flash or eeprom on the mcu to record data. Each of these methods I believe will still slow down your readings to a degree, increasing the chance that significant readings are missed.

December 25, 2011
by Tohyj
Tohyj's Avatar

Thanks Treymd, i will try adding a delay inside the programming and see how it goes.

Does anyone know what does the Numbers means ?

For example, it displayed MAX: 560+, MIN: 580+, DIFF: 20+ what does all those number means ? dB ? Current ? Voltage ?

Thanks everyone for helping =)

Tohyj

Post a Reply

Please log in to post a reply.

Did you know that you need to think about wires differently when you're transmitting signals more than a few inches? Learn more...