Close

Phew-Phew

A project log for AT-AT or 'All Terrain Armored Transport'

Creating a model of this iconic 'vehicle'. With some animation. ( no, it won't walk)

cees-meijerCees Meijer 07/22/2023 at 20:140 Comments

After deciding to leave out the cannon motion for now, it was time to focus on the possible effects that were left. First there is the lights. That one is easy. Just a few LEDs will do. Originally these were planned to go at the back of the cannon and project their light all the way through the barrel. That did not work, the light was not even visible, so I modified the cannon nozzle so it would hold a 3mm LED. Some very thin (wirewrap) wire was used to feed through the cannon barrel.

Second would be some sound. And I'm thinking of the iconic sound of the cannons as they are fired. 

Still wanted to keep it cheap, so let's see if we can just do this with the Arduino Pro Micro.

Mucht to my surprise there is indeed a library that allows por playing short audio samples from an Arduino: the 'PCM' library.

And there are some decent instructions on how to use it here:

http://highlowtech.org/?p=1963

These are my steps:

Found the blaster sound on YouTube:

Used the online service 'Dirpy' to extract the audio : https://dirpy.com/

Used Audacity to extract only the first part ( a single blast), converted it to mono and saved it to a MP3 with the lowest possible sample rate (8000)

Then I used the 'EncodeAudio' software to convert it to a list of numbers that can be inserted in the Arduino program. And it works. Well, kind of.. The sound is awful, and you can just barely recognize the original audio. I've tried to edit the clip a bit ( add a fade-in to avoid the clicking sound at the start, maximize the amplitude) but it does not get any better than this.

 Now this could also be due to the small laptop-speaker that I used so I attached a slightly bigger one. And yes, this does improve the sound, but it's still pretty bad.

So we'll go one step up, and use a MP3 player module, the well known DFPlayer which can be bought for less than an Euro at AliExpress. Lets hope this will improve the sound to an aceptable level.

Discussions