Elm Chan's audio player info

Go To Last Post
28 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a need for an audio player & I thought it was time that I have a look at this project as it comes up all the time.
I configured my EasyAVR5A ( which has a SD card socket) to a ATtiny85 etc. It did not work first up!
After searching AVRFreaks, I came across posts regarding fuses, SD card formatting, RIFF-WAV format, removing last three lines from the .hex files.
Tried it all, still did not work! Anyway, after a good sleep, I decided to have a good look at the configuration of the EasyAVR5A and I found that I had plugged the MCU into the wrong socket DIP8A whereas it should have been DIP8B :oops:
It now works like a rocket. What a great bit of coding!

I was confused a little by earlier posts, which did lead me up the garden path for a while, so I thought I would makes some notes which others might find useful.
a) Build the mono version first to make sure that your wiring ( & socket selection is OK). Once you loose the ISP capability, things just get harder!
b) Two posts on this subject had conflicting information regarding the SD card format. Either FAT or FAT32 works fine!
c) The term RIFF-WAVE is a little confusing if you are really not into that sort of thing (which I am not).
I just use files with a .WAV ext. and they work fine.
I did use a hex editor and had a look at the header to make sure that there was no problem ( this is before I woke up regarding the wrong socket). A good source of .WAV files is the 100's of system wave files that belong to Windows, for those who need a starting file.

Ah yes, I did brick a few ATtiny85's and had to build something to de-brick them.
What should have been a one hour job turned out more like 10 hours before I had it working! :( :oops: :oops: :oops:
Moral of the story.
Always check your own work before suspecting other's work!
Elm's code works beautifully straight out of the box!

My latest rabbit mitigation project will involve have some PC external speakers with a Elm player located around my property, randomly playing "howling foxes", "gun shot noises" and "the squeal of a rabbit in distress".

My vegie garden was going real well until it was decimated
over about three nights by roving rabbits! :x :twisted:

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Post your wav files so we can vicariously experience the sound of howling foxes and rabbits in dis dress.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Lee,

I'm sure a Tiny driving a 386 amp and a matching Tiny Speaker will be a nice project...

but if you really want to get the rabbit's attention then this is what you need:

JC

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But you need to sit up all night long watching the flir camera. It needs to have a motion sensor. Just keep fido inside when robo rabbit cop is on patrol.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
My latest rabbit mitigation project
If you can't beat them why not use them? Start a rabbit processing and packing business, the more wabbits around the more profit.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can you make a video of the results for us, like this fellow did?

How to stop cats pissing on your car,
Please ignore all of the video links on the right of the youtube page...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That is a crackup sbennet! Actually, if enough cats piss can be collected & sprayed along a boundary, it is very effective for keeping rabbits away.
I have been trying to think of ways of measuring the effect of the mitigation system. Apparently rabbits do get stressed out & go elsewhere or actually drop dead on the spot if they are frightened enough.
I do know, that when they touch the bottom wire of my electric fencer with their nose, they drop dead. However in the summer their coats are too well insulated and they move very quickly so the probability of getting zapped by the 2 second or so pulse is very low.
My idea is to insulate one of the fencing wires & run 24 VAC around the property (5 acres) and have PC speakers (cheap) running of them with a Elm recorder randomly playing some scary sound. I probably need some day/night time control to minimize disturbance.
The tank looks nice Chuck, but I am after a 24 hr. solution.
I can't stand the smell of underground mutton John. I just cannot understand how people can even keep rabbits as pets.
The only good breed of rabbit is an extinct one!
Will keep you posted.

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If its got an avr in it, might as well hook a PIR sensor up to it to trigger the sounds.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I did play around with PIR, but I really want to disturb them at least 50 meters away, with a unit every 100 meters. To far for a PIR.

I did have an idea of having a PIR detector at the warren entry with some lasers illuminating down the warren, but I am told that it's not kosher. I will instead use the PIR for blasting some high level noise down the warren when movement is detected. I have four quite suitable wave files downloaded from the web.

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I have four quite suitable wave files downloaded from the web.
Elmer Fudd's "It's wabbit season" must be one of them. :lol:

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"I wiww kiww the wabbit,
With my speaw and magic hewmet!"

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Lee,
Why not use outdoor bluetooth speakers? YOu could put some simple motion detectors near wabbit howles to trigger the playing of .wav files using an I/O card on your PC. Real simple.

I think I have a few such cards left from a project you can have if you want them....and I can find them :?

Or did this wicked-sick idea of yours come up while talking with the spirits at the local thought provoking centre?

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I will have a look at the outdoor bluetooth speakers Jim. That avoids having to have lots of SD players. However, I did think that random noise from different directions would be more unsettling to those varmints.
I don't think a PC is required just attiny85's

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not that interested in frightening rabbits, but a friend has asked me about an electronic gizmo that he can put a sound, wav or somesuch on and trigger it to play from his train remote.

How 'bout a chip like APR9301? Neither Mouser nor Digikey have them, so I don't know where to get them.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you use cheap, burglar alarm type, horn speakers you are likely to blow the rabbits back to the moon with very little audio power.

hmmm maybe even a 100V distributed system using your current fence wire would work, you only need 2 of them and a stepdown transformer (Jaycar or Alltronics) at each speaker.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jim, You can buy something similar to APR chip on eBay, but they are described as 10 sec message recorder.
John, Good idea on the burglar alarm speaker. They seem to have good high frequency output. I have a few to try already!

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Jim, You can buy something similar to APR chip on eBay, but they are described as 10 sec message recorder.

If you decide to explore that route, we've put Nuvoton (formerly Winbond) message chips in a couple apps. http://www.nuvoton.com/hq/enu/Pr...
US$5-$10 qty. 1.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
Quote:

Jim, You can buy something similar to APR chip on eBay, but they are described as 10 sec message recorder.

If you decide to explore that route, we've put Nuvoton (formerly Winbond) message chips in a couple apps. http://www.nuvoton.com/hq/enu/Pr...
US$5-$10 qty. 1.

And before they were bought by Winbond they were ISD. I have a few of them laying around. THATS a great idea Lee(from the US). Everythng is in there. REcord the sound into the IC, motion, or Timer and you are good to go.

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Those cheap APR chips, use Delta modulation and have a lack of high frequency response and are very noisy. That is why I did not continue down that path. They are barely good enough for greeting cards. The Windbond chips are far superior.

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for letting me know.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The chip USA Lee recommended have a decent high frequency range. LArge selection of type/duration too.

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Um, Where do you find one of these Windbond chips? I find their web site about memories and such...

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
we've put Nuvoton (formerly Winbond) message chips in a couple apps

Could there be a clue in there? ;-)

EDIT: for example:

http://www.nuvoton.com/nuvotonmo...

My memory of the "chipcorder" series from when they were Winbond though is that they store the audio in something called "analogue flash" and unlike SD/MMC or Dataflash or even the flash in an AVR it cannot be loaded digitally in production but you have to actually record the audio (in realtime) into it. Maybe someone who's used these knows more about this? Perhaps there is now a digital programming technique that can be used in manufacturing to load the audio?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

...you have to actually record the audio (in realtime) into it. Maybe someone who's used these knows more about this?

Indeed, recording the messages is the only way I've applied them.

In our apps it wasn't a drawback. These were for "greeting" the customer at e.g. drive-through windows at restaurants, and pick-up stations. Examples of the latter are instructions to delivery truck drivers when stopped at the security gate, parts pickup at industrial supply, order pickup at takeout restaurants.

It is helpful to be able to re-record the greeting. Examples include giving an after-hours phone number for yard entry, or announcing specials at food establishments.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The problem I had was that I need to program something like 50,000 with 2 minutes of sound. As it was going to be realtime that was something like 69 days!! (yeah I know it could be done in parallel but even so). Time on the line costs serious money.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The nuvotone site doesn't respond. I'll try it later. Seems to me I tried it once before.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

The nuvotone site doesn't respond. I'll try it later. Seems to me I tried it once before.

Try just going to the base site and finding the "ISD ChipCorder® " page. I also had to back-track to get something to come up. but the page is there and the link looks the same.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello everybody.

Sorry for bumping this up, but I thought it would be the best thread as LDEVRIES beautifully summed up common issues of elm-chan player here - thanks dude.

Unfortunately mine breadboard circuit is still not working and I truly can't say why is that. After powering it on, I hear noting.

I set fuses manually to those specified for low-res mono setup in main.c file, and then commented out those lines. Compiled it using appropriate Makefile and programmed with avrdude:
(sudo avrdude -p t85 -c avrispmkII -P usb -U sd8p_mo.hex)

For the sd card I did full format on windowsXP, and then (from ubuntu) places two files in root directory:
test.wav (generated with http://www2.research.att.com/~tt...)
and trio.wav converted with sox:
(sox -V3 01.\ Scherzo\ and\ Trio.mp3 trio.wav)

I had a little accident with SD card adapter (forgot to place the 220 Ohm resistor with the battery power supply and it melted the adapter a bit), but I confirmed that sd card (together with the adapter) is perfectly functional, so this shouldn't be a problem.

My weak point is that I'm totally new to electronics, so it's possible that I'm making a very silly mistake.

Having that said, could you please take a peak at a photo(s) of my breadboard, which I tried to describe in details, and tell me if there is any obvious wiring/component setup error?
Having confirmed that the issue here is software not hardware, would help me a great deal.

Thank you for any support.

I'm adding also zipped version of photos as I can see they are not very well visible on thumbnails.

Attachment(s):