0

Pi and Max9744 Amplifier
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Pi and Max9744 Amplifier

by Larry67 on Wed Jun 09, 2021 9:39 am

Would like to know if the headphone output of the Raspberry Pi is compatible with the input requirements of the Max9744 Amplifier. I have some mp3 message files residing on my Pi which I would like to broadcast based on certain environment conditions.

Thanks in advance for your guidance

Larry67
 
Posts: 42
Joined: Tue May 08, 2018 2:57 pm

Re: Pi and Max9744 Amplifier

by adafruit_support_bill on Wed Jun 09, 2021 9:42 am

Yes. A headphone output makes a suitable input for the MAX9744.

adafruit_support_bill
 
Posts: 81562
Joined: Sat Feb 07, 2009 10:11 am

Re: Pi and Max9744 Amplifier

by Larry67 on Wed Jun 09, 2021 10:54 am

Thank You for your quick response. I will pursue that approach

Larry67
 
Posts: 42
Joined: Tue May 08, 2018 2:57 pm

Re: Pi and Max9744 Amplifier

by Larry67 on Wed Jun 09, 2021 4:59 pm

I was able to get the pi and the Max9744 amp all wired up and playing my messages. I did not use circuitpython but copied directly the full python code you provided for volume control. I used the pip command as follows to get the libraries onto my Pi model 3B+.

sudo pip3 install adafruit-circuitpython-max9744.

I tested the code you provided, changing the volume from 31 to 63 with some appreciable increase but still not loud enough for me to leave the room. I am using one 20 watt 4 ohm speaker that you have sold.

I previously used your music maker card along with the max9744 amplifier and the 20 watt speaker you previously sold on your site with an Arduino. Setting the volume in the Arduino sketch to 50, I basically had to leave the room it was so loud.

Did I do something wrong in my installation? Would increasing the Power Supply to the Max9744 from 9 volts to 12 volts (33%) give me a corresponding increase in volume of 33%. In other words is the voltage and volume a linear function.

Any help would be appreciated.

Thank you

Larry67
 
Posts: 42
Joined: Tue May 08, 2018 2:57 pm

Re: Pi and Max9744 Amplifier

by adafruit_support_bill on Wed Jun 09, 2021 7:01 pm

The stereo line-out jack on the music maker shield is a 2v peak-to-peak signal. I believe that the Pi is only about 1v pp, so at similar gain levels, the volume would be much lower.

adafruit_support_bill
 
Posts: 81562
Joined: Sat Feb 07, 2009 10:11 am

Re: Pi and Max9744 Amplifier

by Larry67 on Thu Jun 10, 2021 9:52 am

Thanks for that information.

Two questions:

1. Would I see an appreciable increase in volume if I used 12 volts rather than 9 volts to power the Max9744.

2. Do you make a similar music maker shield for the Pi.

Thank you. Was really hoping I could use the Pi for this application because it provides must more flexibility with Python.

Larry67
 
Posts: 42
Joined: Tue May 08, 2018 2:57 pm

Re: Pi and Max9744 Amplifier

by adafruit_support_bill on Thu Jun 10, 2021 10:38 am

1) Only if the input signal is already causing it to clip at 9v. If you were already able to get more volume with the MusicMaker shield while powered with 9v, then the answer is no. The issue is the weaker input signal is not capable of driving the amplifier to maximum output volume.

2) Unfortunately, no. We do not have a Pi version of the board. Many of our Arduino compatible boards do run CircuitPython, but due to the limitations of the language for real-time applications, support for the VS1053 chip is quite limited.

See the notes here:
https://circuitpython.readthedocs.io/pr ... en/latest/

adafruit_support_bill
 
Posts: 81562
Joined: Sat Feb 07, 2009 10:11 am

Re: Pi and Max9744 Amplifier

by Larry67 on Thu Jun 10, 2021 1:52 pm

One last question I will leave you alone. I do appreciate your notes and the link you provided. Although I am not an audio expert, this does help me understand.

This is what I am currently doing to get environmental messages broadcasted using the music maker card which contains the environmental messages and the MAX9744 amplifier to drive your 20watt 4 ohm speaker. In fact I just bought two more music makers and two more amplifiers thinking I would make more of these units. One for both of my brothers.

I have a pi that receives an integer variable and writes it to a file and that variable gets sent to the Arduino using a serial connection. This works fine for single digit numbers. I have not been able to get it to work with numbers of more than one digit. That is why I thought I could use the pi to drive the messages to a speaker instead of sending the variable to the Arduino.

Here is where I probably am asking too much of you guys. I have not been successful with my hours of google searches to find a way to send multiple digits to the Arduino. I find lots of sketches and programs that will send one digit but the ones that describe how to send multiple digits never work for me.

Do you have a site that you would recommend I could go to that would help me send a two digit number and be accepted by the Arduino's serial connection.

If you can't answer or this is beyond the scope of this forum, I will understand.

Thank you

Larry67
 
Posts: 42
Joined: Tue May 08, 2018 2:57 pm

Re: Pi and Max9744 Amplifier

by adafruit_support_bill on Thu Jun 10, 2021 2:15 pm

The print() function in CircuitPython will convert an integer into multiple ASCII digit characters.

You can use the parseint() function on the Arduino to read that multi-digit number from the serial port: https://www.arduino.cc/en/Reference/ParseInt

adafruit_support_bill
 
Posts: 81562
Joined: Sat Feb 07, 2009 10:11 am

Re: Pi and Max9744 Amplifier

by Larry67 on Thu Jun 10, 2021 2:43 pm

Thank you. I will try this. I won't bother you anymore. Your help is much appreciated.

Larry67
 
Posts: 42
Joined: Tue May 08, 2018 2:57 pm

Re: Pi and Max9744 Amplifier

by Larry67 on Mon Jun 14, 2021 5:00 pm

I felt I need to clarify something in case someone else is interested in using the MAX9744 with a Pi.

I am using an internet service that converts text to an mp3 file for my environmental messages that I want to broadcast through your 20 watt 4 ohm speaker. Great speaker by the way.

What I found was the volume (amplification of the sound file) was pretty low. So i used some software to increase the volume of the message. Now I can easily broadcast the message so it is clearly heard in a big room. I have the volume set to 62 and it works fine. I tried it with song I purchased from Amazon and I set the volume at 50 and it worked fine also.

I still need to satisfy my coding curiosity and use the hints you provided for serial transmission of a multiple digit variable.

Thanks again for your help.

Larry67
 
Posts: 42
Joined: Tue May 08, 2018 2:57 pm

Please be positive and constructive with your questions and comments.