How to create tones (piezo) from digital output pin

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
MaLa_2536816
Level 3
Level 3
First like received

Hi,

   

I'm using the psoc 4 pioneer BLE kit and I use the findme profile.

   

I want to produce tones from a piezo module when the led is activate.

   

Actually it make a weak sound! How can I make it stronger and with a variation?

   

Best regards

   

Martin

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Because your system runs with 3.3V I would suggest you to use a low voltage beeper. I don't know if you can blow a 2V module with 3.3V output.

   

 

   

Bob

View solution in original post

0 Likes
9 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum, Martin.

   

Use a PWM with 50% duty cycle and connect the beeper to line and line_n. Vary the frequency by adjusting PWM period and compare value.

   

 

   

Bob

0 Likes
MaLa_2536816
Level 3
Level 3
First like received

Thanks for your answer !

   

I'm not sure exactly what to do, Do I have to add a new PWM module and enable Output to pin_1 to wire into line and line_n?

   

Martin

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

When you  post your complete project we all can have a look at all of your settings or apply the changes you may need. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
MaLa_2536816
Level 3
Level 3
First like received

Here's my project

0 Likes
lock attach
Attachments are accessible only for community members.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

... and here's my suggestion

   

 

   

Bob

lock attach
Attachments are accessible only for community members.
MaLa_2536816
Level 3
Level 3
First like received

Hi,

   

I have almost the same result, it does a weak tone. I guest that my hardware setup is the problem I took a shield and piezo module from another development kit (see attachment). What piezo module do you suggest with the Pioneer kit?

   

Martin

Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Because your system runs with 3.3V I would suggest you to use a low voltage beeper. I don't know if you can blow a 2V module with 3.3V output.

   

 

   

Bob

0 Likes
MaLa_2536816
Level 3
Level 3
First like received

Do you have a module suggestion for the Pioneer kit?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Sorry, no suggestion.

   

 

   

Bob

0 Likes