Timer circuit request

Nissanman

Member
Hi I am building a message unit for a charity, the aim is for a button to be pressed and a short speech played and reset. I have the MP3 player and box ready but I need a timer circuit so when the button is pressed 5v is supplied to to the MP3 player for about 120 secs fitted then goes back to 0V ready for the next press/ play.
I have two proto boards with F122 BR TL071CP chip not sure what type of chips.

It is has been a long time since I looked at picaxe and as such I need to learn again so the request for such a small circuit is to allow me to finish the project and give it to the charity and then start learning. This includes the forum and rules, I do hope this correct section for this request.
Thanks for any help the forum members may be able to offer
Jim
 

Tvmender

Active member
Hi Nissanman

The PICAXE MP3 player kit SPE035 may do this without any external hardware. It has a series of pushbuttons which could do what you describe.
 

erco

Senior Member
That's a perfect job for a $2 DY-SV17F MP3 Player Module. It has many modes, including pushbutton trigger, built-in storage for 3-5 minutes of MP3 audio and a built-in amplifier. No need for a picaxe or any micro, no need to switch anything on/off .

 

Flenser

Senior Member
Nissanman,
If you are planning to use battery power then you can buy these Sound Buttons ready built on ebay.
Whether or not they work out more expensive than building the message units yourself will depend on how much you have to pay for all the parts.
 

Nissanman

Member
Hi,
A picaxe 0M82 might be overkill. Maybe a 555 would do the job?
TL071CP Datasheet(PDF) - Texas Instruments (alldatasheet.com)
Have you got a link to your: proto boards with F122 BR TL071CP ?
Good luck...........
Hi

Thanks for your reply, I tried a 555 timer but it produced interference on the sound output. When I was working with the Picaxe a number of years ago I seemed to recall that you could write the program and run it and if you wanted to change it, you could just change the values, reload and run the changes. So my thinking is that if I had a program with a time of say 140 secs and I needed 160 secs, a few strokes of the keypad would give me the change required

jim
 

Nissanman

Member
That's a perfect job for a $2 DY-SV17F MP3 Player Module. It has many modes, including pushbutton trigger, built-in storage for 3-5 minutes of MP3 audio and a built-in amplifier. No need for a picaxe or any micro, no need to switch anything on/off .

Hi

Thanks for your reply the reason for the request was that I have some Picaxe chips and boards in the workshop and hoped to complete the project with these. Given this I could move on with the Picaxe. I looked at the video and it seemed ok but I am not sure where the serial input comes from and in any case four weeks from China is a long wait.

Regards

Jim
 

The bear

Senior Member
Hi,
I'm not a huge fan of 555's myself. Just though I would mention it before someone else did.
The picaxe would be fine, the beauty of it is that it can be tailored to your requirements exactly.
I'm sure someone will put you on the path to success .
I'm OK struggling with code for myself.
Good luck......
 

erco

Senior Member
Any micro (Picaxe, BASIC Stamp, etc) can drive a mosfet switch or low-current (~20mA) relay directly from a pin. This includes 5V SPST reed relays and my favorite Aromat DPDT TF2-5V with a polarized coil. Those just switch power when activated. Then your code is as simple as:

main: if pinc.3=1 then main ' wait for button press to switch pin c.3 low
high b.1 ' switch on mosfet/relay on pin b.1
pause 60000 ' pause 1 minute
pause 60000 ' pause 1 minute
low b.1 ' switch off mosfet/relay on pin b.1
goto main ' loop back
 

kfjl

Member
With a DFPlayer mini you wouldn't need a timer. Just check the BUSY pin to see if the message has finished playing.
 

erco

Senior Member
Thanks for your reply, I tried a 555 timer but it produced interference on the sound output.
You could stick a 5V reed relay between the 555 and your circuit to isolate and eliminate noise. Personally I like the venerable 51-year 555 and use it at every opportunity. Before Covid, I bought a 50-pack from China and IIRC they were 4 cents apiece. I spend more than that on solder!
 

neiltechspec

Senior Member
I've used a few 555's in the past, main advantage has to be max VCC of 16v and the ability to drive
higher current relays directly.

But for 3.3-5v, a picaxe wins for me with a lower component count, even if driving higher current relay,
much simpler to work out timings in S/W rather than H/W with the 555.
 

hippy

Technical Support
Staff member
The project sounds entirely perfect for a PICAXE, a typical "power it up, let it run, and turn it off again" project where it may be an MP3 player, a digital picture frame, or anything else really.

Post #3 from 'erco' is typical program code for such a project.

The advantage of using a PICAXE over a 555 is often in being able to trigger other things, such as activating a 'play' function after powering up., if something doesn't auto-start. The extra capability might not be needed but won't be stuck in a hole if it turns out it is. And, if you've got a box of PICAXE, haven't got a box of 555's, nothing wrong in using a PICAXE as a 555.

Likewise, while there may be alternative or better solutions, there's an appeal in using what one has.

So the main issue is how to power-up the external device, the MP3 Player here, and activate it if it needs that. Any high-side switch or relay should do the job of providing power.

I couldn't determine what a "122 BR TL071CP" was so can't say if that would do the job.

It might be that no power switching is needed. It might be possible to fake a button push or hold it, which powers it down, another which powers it up and starts playing. It all depends on what one is controlling.

Some of the MP3 players I have had would allow a repeatable 'play the message then stop' without anything else.
 

erco

Senior Member
I've used a few 555's in the past, main advantage has to be max VCC of 16v and the ability to drive
higher current relays directly.
Yep, a 555 is rated for 200mA output current, that comes in handy sometimes to reduce parts count. I was on a line follower quest a few years ago and came up with this ultra-simple circuit using a 555 timer. Alternately directly driving two motors is surely pushing that 200mA limit a bit but it works!

 

Nissanman

Member
Any micro (Picaxe, BASIC Stamp, etc) can drive a mosfet switch or low-current (~20mA) relay directly from a pin. This includes 5V SPST reed relays and my favorite Aromat DPDT TF2-5V with a polarized coil. Those just switch power when activated. Then your code is as simple as:

main: if pinc.3=1 then main ' wait for button press to switch pin c.3 low
high b.1 ' switch on mosfet/relay on pin b.1
pause 60000 ' pause 1 minute
pause 60000 ' pause 1 minute
low b.1 ' switch off mosfet/relay on pin b.1
goto main ' loop back
Hi

Thanks for the info. It been some time since I used the Picaxe so am I correct in thinking the code above is for the Picaxe.

Jim
 

Nissanman

Member
The project sounds entirely perfect for a PICAXE, a typical "power it up, let it run, and turn it off again" project where it may be an MP3 player, a digital picture frame, or anything else really.

Post #3 from 'erco' is typical program code for such a project.

The advantage of using a PICAXE over a 555 is often in being able to trigger other things, such as activating a 'play' function after powering up., if something doesn't auto-start. The extra capability might not be needed but won't be stuck in a hole if it turns out it is. And, if you've got a box of PICAXE, haven't got a box of 555's, nothing wrong in using a PICAXE as a 555.

Likewise, while there may be alternative or better solutions, there's an appeal in using what one has.

So the main issue is how to power-up the external device, the MP3 Player here, and activate it if it needs that. Any high-side switch or relay should do the job of providing power.

I couldn't determine what a "122 BR TL071CP" was so can't say if that would do the job.

It might be that no power switching is needed. It might be possible to fake a button push or hold it, which powers it down, another which powers it up and starts playing. It all depends on what one is controlling.

Some of the MP3 players I have had would allow a repeatable 'play the message then stop' without anything else.
Hi
Thanks for your reply, I think the the 122BR TL071 CP is a really old Picaxe Chip and as such I should update my stock.
As for the MP3 players, I have tried some and if you have only one track then all want to repeat. So rather than have a permanent supply I would probably use the circuit to switch the supply on /off.

Regards


Jim
 
Top