Donation Box-Heart Beat Sounder

Discussion in 'The Projects Forum' started by assuc, Jan 23, 2015.

  1. assuc

    Thread Starter Member

    Mar 23, 2012
    77
    1
    Greetings,
    I want to make an interactive donations to collect donations for the heart patients.
    It will be like a "sound" like that of straight line on the ECG comes when the person is dead will always be coming out of the speaker and when a person insert a coin or a note in the box. The Heart Beat Sound should come for 1-2 seconds and then again the ECG sound continues.
    It is to give message that your donation just saved a Heart Beat.

    I have selected the sensor that would detect the coin. I wan to use normal pc speaker which a person can hear for around 5 ft. connected with 3.5 mm jack. Now what I want to know is how to store the two sounds of heart beat and straight line on PIC 16f877A controller? I have heard that one can store the sound in the form of .bin file instead of .mp3 and can use it as an output.

    Hints and suggestions are required.
     
  2. pwdixon

    Member

    Oct 11, 2012
    488
    56
    If you use a wav file format you can play the output via a ladder network into an amplifier to your speaker with simple digital to analogue output. As you have a short output sequence you wouldn't need an SD card just store everything in program memory.
     
  3. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,793
    829
    Suggestion or observation: Having the flat line sound on all the time would be incredibly annoying if I had to work near it. I'd be as likely to smash the box instead of donating.

    Perhaps you could use an IR motion detector to trigger the flat line sound?
     
  4. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,771
    1,103
    Agreed. Perhaps just do away with the flat-line sound?
     
  5. wayneh

    Expert

    Sep 9, 2010
    12,090
    3,027
    You could just hack the heartbeat module out of a stuffed toy. I think you can buy them in bulk.

    One more vote for dropping the flat line sound. Annoying and creepy.
     
  6. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,793
    829
    We have a retail store in the local mall that sells plush toys that you stuff yourselves. "Build-A-Bear", I think. They sell the heartbeat modules there and you can probably pick one up. Oh, and ...
    flatline.png
     
  7. assuc

    Thread Starter Member

    Mar 23, 2012
    77
    1
    I agree that flat line would be annoying to ears, and could damage them, so I should just drop the idea of it, while just do the coin part where an isertion of coin gives out heart beat.
     
  8. assuc

    Thread Starter Member

    Mar 23, 2012
    77
    1
    Could you be more specific about the ladder network.
    Also will the wav file can be directly played via PIC Controller, no need to change the format? (P.S never played with extensions before)
     
  9. pwdixon

    Member

    Oct 11, 2012
    488
    56
    Look up resistor ladder network to do A/D from parallel digital outputs from PIC.
    A wav file is just a series of bytes representing output voltages, ie feed data bytes directly to the output port connected to the resistor ladder network, add an output amplifier and send it to a speaker.
     
  10. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,771
    1,103
    Heart-beat sounds are low frequency, so you will probably need a fairly beefy amp and a decent-size speaker for good sound.
     
  11. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,793
    829
    This is not helpful if you want to make the heartbeat sound from a wav file, but just throwing it out there as another option.

    Just to elaborate on the Build-A-Bear idea, their heart module is a mechanical vibrator and not appropriate. But they have a Personalized Build-A-Sound module for 8.00 USD. I would think you should be able to modify it to be driven from your PIC. As is, it plays when squeezed; likely a NO switch built into the casing.
    image.jpg
     
  12. GopherT

    AAC Fanatic!

    Nov 23, 2012
    5,984
    3,725
  13. RichardO

    Well-Known Member

    May 4, 2013
    1,230
    382
    This is trickier than it sounds!

    I was involved in a unit that did something similar to what you are doing -- When a coin was inserted a sound was made. I chose an inexpensive coin acceptor. It was the kind that has a button to return the coin. So far so good...

    The problem was that if a coin jammed and no sound was made, the person would not push the button. They did not want their money back; they wanted to hear the sound. So, they would just put in another coin. The coin reject channel in the coin acceptor got jammed with coins so tight that it was almost impossible to clear the jam!

    Our problem was made worse by the fact that the unit was in a family area with unsupervised children. We found sticks, gum wrappers and other non-coins blocking the coin slot. The solution was to make our own custom coin acceptor.

    We chose to accept any coin that would fit into a slot sized for a US quarter. Any coin that fit in the slot would roll down a steep channel and through an optical slot detector. A coin smaller than a quarter would not make a sound. A panel on one side of the channel was made removable, without tools, to allow cleaning out the sticks and gum wrappers.
     
Loading...