TinyCircuits Forum

TinyCircuits Products => Wirelings => Topic started by: randomvalue on March 22, 2021, 06:21:41 AM

Title: Audio Amplifier Wireling
Post by: randomvalue on March 22, 2021, 06:21:41 AM
Dear all,

I recently purchased the wireling starter kit in an attempt to make a sound amplifier.

However, I'm unable to find any documentation regarding the integration of the audio amplifier wireling.

Is there any way to allow it to output the sound from the Microphone Wireling?

thank you!
Title: Re: Audio Amplifier Wireling
Post by: braza on January 31, 2022, 12:13:34 PM
Got my Audio Amplifier too, but no examples are available.

Also, do I have to have microSD for the sound files or some audio files can be somehow added to the internal memory?
Title: Re: Audio Amplifier Wireling
Post by: lennevia on January 31, 2022, 12:28:06 PM
Here's the Audio Amplifier tutorial: https://tinycircuits.com/blogs/learn/audio-amplifier-wireling-tutorial
Title: Re: Audio Amplifier Wireling
Post by: braza on February 01, 2022, 11:50:19 AM
Here's the Audio Amplifier tutorial: https://tinycircuits.com/blogs/learn/audio-amplifier-wireling-tutorial
Thank you so much! Was it there all the time? I investigated the amplifier page and also searched the site.
Title: Re: Audio Amplifier Wireling
Post by: braza on February 01, 2022, 05:26:06 PM
I have a TinyDuino back from Kickcstarter times + Wireling shield. Would it work or do I need TinyZero at least?
I'm asking because I'm getting
Quote
"No device found on COM5
An error occurred while uploading the sketch"
with either TinyZero or WirelingZero as target devices.
Title: Re: Audio Amplifier Wireling
Post by: lennevia on February 02, 2022, 02:07:00 PM
You should not be selecting TinyZero or WirelingZero as the target since those are different boards with different hardware. I recommend refreshing on the programming process for the TinyDuino. Here's the getting started tutorial: https://learn.tinycircuits.com/Processors/TinyDuino_Setup_Tutorial/

I don't believe the hardware from the Kickstarter has changed drastically, but if you are still encountering issues after getting the right Tools selections set up for programming, let me know!
Title: Re: Audio Amplifier Wireling
Post by: braza on February 03, 2022, 04:34:26 AM
You should not be selecting TinyZero or WirelingZero as the target since those are different boards with different hardware. I recommend refreshing on the programming process for the TinyDuino. Here's the getting started tutorial: https://learn.tinycircuits.com/Processors/TinyDuino_Setup_Tutorial/

I don't believe the hardware from the Kickstarter has changed drastically, but if you are still encountering issues after getting the right Tools selections set up for programming, let me know!
I've been programming for TinyDuino and tried switching platforms to WirelingZero because I was already getting errors there:
Quote
WARNING: library SAMD_TimerInterrupt claims to run on samd architecture(s) and may be incompatible with your current board which runs on avr architecture(s).
In file included from C:\Users\yakov\Documents\Arduino\libraries\SAMD_TimerInterrupt\src/SAMDTimerInterrupt.h:51:0,
                 from C:\Users\yakov\Downloads\AudioAmplifierWireling\AudioAmplifierWireling.ino:2:
C:\Users\yakov\Documents\Arduino\libraries\SAMD_TimerInterrupt\src/SAMDTimerInterrupt.hpp:59:4: error: #error This code is designed to run on SAMD21/SAMD51 platform! Please check your Tools->Board setting.
   #error This code is designed to run on SAMD21/SAMD51 platform! Please check your Tools->Board setting.
    ^~~~~
C:\Users\yakov\Documents\Arduino\libraries\SAMD_TimerInterrupt\src/SAMDTimerInterrupt.hpp:134:4: error: #error Unknown board
   #error Unknown board
    ^~~~~
I also noticed a line in the tutorial "Pin A0 is the only pin connected to a 10-bit digital-to-analog converter (DAC) on the SAMD21 and is only available on Wireling port 0". I'm not that deep into hardware to differentiate whether this belongs to shield or motherboard therefore asked about TinyDuino as a target platform.
Title: Re: Audio Amplifier Wireling
Post by: braza on February 08, 2022, 01:48:48 PM
Sooo, should I buy TinyZero to make this shield work?
Title: Re: Audio Amplifier Wireling
Post by: Jason on February 11, 2022, 12:03:22 PM
Sooo, should I buy TinyZero to make this shield work?

If you are using TinyDuino, for sure follow the tutorial and choose

The other error about the interrupt library is because the example was made for the TinyZero's SAMD processor, not the TinyDuino AVR. That's not the only problem, the TinyDuino does not have a DAC output, this means each sample would have to be played at the same volume.

In any case, the TinyDuino only has 32KB of flash which won't store much useful audio (average .mp3 size is 1MB per minute of audio).  You could use the audio shield + SD card shield. This is probably the best route since I don't think we have any examples of using the TinyZero + Wireling amplifier + SD card shield anyway.

Although the TinyZero has slightly better specs than the TinyDuino, the example linked earlier only allows for playing a couple seconds of audio since there's no SD card/external storage.

I'm pretty sure you could at least generate sounds with the hardware you have, but you'd have to do some trickery with PWM.
Title: Re: Audio Amplifier Wireling
Post by: braza on February 12, 2022, 06:18:55 AM
Sooo, should I buy TinyZero to make this shield work?

If you are using TinyDuino, for sure follow the tutorial and choose
  • Board: Arduino Pro or Pro Mini
  • Processor: ATMega328P (3.3V, 8MHz)

The other error about the interrupt library is because the example was made for the TinyZero's SAMD processor, not the TinyDuino AVR. That's not the only problem, the TinyDuino does not have a DAC output, this means each sample would have to be played at the same volume.

In any case, the TinyDuino only has 32KB of flash which won't store much useful audio (average .mp3 size is 1MB per minute of audio).  You could use the audio shield + SD card shield. This is probably the best route since I don't think we have any examples of using the TinyZero + Wireling amplifier + SD card shield anyway.
  • https://tinycircuits.com/products/audio-tinyshield
  • https://tinycircuits.com/blogs/learn/124335431-using-the-audio-tinyshield-tutorial

Although the TinyZero has slightly better specs than the TinyDuino, the example linked earlier only allows for playing a couple seconds of audio since there's no SD card/external storage.

I'm pretty sure you could at least generate sounds with the hardware you have, but you'd have to do some trickery with PWM.
Yay, thanks for the answer! Couple of seconds is fine! Let me try no-DAC waay.