Pages: [1]   Go Down
Author Topic: Pressing buttons on mp3-player via arduino?  (Read 4071 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello. I have this mp3 player:




More links(if pictures above are not enough):
http://img78.imageshack.us/my.php?image=scan0221ca5.jpg
http://img74.imageshack.us/my.php?image=dsc00011ep4.jpg
http://img411.imageshack.us/my.php?image=dsc00012nb1.jpg

How can I press one of these three buttons shown in the pictures without using a motor, just wires?
Not so important: How can I press the four buttons on the white ground in the first picture?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there noone who can help me?
Basically I have an open circuit. If I press the button the circuit is closed.
So I need something to replace the button. And if I digitalWrite(PinButton,HIGH) to that "something" it has to close the circuit.
Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Maxi,

Try a search for Arduino and optocoupler in google.

Here is one example of how it can be done: http://www.jonasolson.se/content/arduino_tutorial/
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for the link. That's exactly what I was looking for.
But I don't know where to buy the TIL116 opto isolator. So I was searching for a datasheet and found this one: http://focus.ti.com/lit/ds/symlink/til116.pdf

But I don't know what values are important.

Is this one ok?

Code:
construction:        Phototransistor/Single
Isolation-Test-Voltage:       5300 Vrms
Typ:       4 N 35
Quality:       Low cost industry standard
IF:       50 mA
Ordering Code:       Q68000-A7302
Current-Transfer-Rate:       Min. 100 %
UCEO:       70 V
case:       DIP 6
I translated the words into english, I hope you still understand them...
Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have no direct experience with the 4N35 optocoupler but I would think its worth a shot if you can easily get hold of them.

You might also consider a quad package if you are driving four lines, a TLP521-4 from Futurlec costs 60 cents US. http://www.futurlec.com/LEDOpto.shtml
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do I need an analogue or a digital one? The current transfer ratio seems to be very important. In my (not-english) onlineshop this is the only value which is visible in list view. I can see the other values only when I click on an item. But at best I want an opto isolator with the same specs as the til116 so i can use the same resistors with it as in the tutorial.. i think there is not a big difference between these buttons and mine...

Does anyone know where to find a better more detailed datasheet for the til116?
« Last Edit: July 28, 2008, 09:29:58 am by Maxi » Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can find a data sheet for the til116 here: http://www.isocom.com/datasheets/db92125.pdf

You just need a device that can fully turn on the transistor in the coupler when driven by an arduino,  I don't think you need an exact equivalent to the til116.

I have successfully used the TLP521-4 with the arduino in somewhat similar application (switching buttons on a battery operated remote control) using 670 ohm resistors connecting the arduino pins to the TLP inputs.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, but I don't want to damage anything.
For example the til116 has an emitter voltage of 6V, you used an optic isolator with an emitter voltage of 55V: http://www.datasheetcatalog.com/datasheets_pdf/T/L/P/5/TLP521-4.shtml

And there are so many different optic isolators available...
« Last Edit: July 28, 2008, 10:27:11 am by Maxi » Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

6v is the reverse voltage, if you connect it up with the emitter to ground you should have no problem up to 30 volts.
« Last Edit: July 28, 2008, 10:52:27 am by mem » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am really a newbie here. But is even 30 volts not too high to "virtually" press a button on an mp3 player?
Or can I get any optic isolator up to 60-70V for that job?
What transfer data ratio should it have? 50%, 60% or 100%? Or doesn't it matter for that job? Tomorrow I want to go to a store to buy it. But it's a very small store, so the personal won't even know the specs of each optic isolator, because the store doesn't even have a pc.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 229
Intransigent prototyper
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

a couple of my students wrote that a tutorial for bonus credit. I'm glad to see it is  getting used.

As long as you connect things as in their diagram, you need not worry about damaging your MP3 player.

The optoisolator inn this case is working a lot like a relay, in that the transistor side shorts out the switch contacts on the MP3 player. NO current path exists between the Arduino and the MP3 player. The MP3 player switch contacts likely have 2V across them, and the current passed through the transistor is probably under .5MA. this means that any standard transistor-output opto will work, as long as it has a decent CTR (about 50% or more will work easily).

« Last Edit: July 28, 2008, 11:32:59 am by Daniel2 » Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 627
Posts: 34243
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Problem with an opto isolator is that you have to get it the output transistor the right way round and the switch you are trying to spook is a simple pull up or down. If the switch is part of a scanning matrix it is possible you would need a two way current flow. In that case you need to use an analogue switch.
Logged

Vancouver, Canadia
Offline Offline
Newbie
*
Karma: 1
Posts: 1
Solder burn smells like bacon.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you still need to resolve this issue and you don't mind a bit of hacking then using a handful of cheap transistors may be your answer.
By strapping the emitter and collector of a transistor across the button the transistor can be used as a switch by applying a small voltage to the base of the transistor, say from the Arduino.
Using an NPN type transistor
* connect the emitter (the one with the arrow symbol) to the negative rail of the device where the button is soldered and the base to the positive side of the button.
* Connect the Arduino GND to the negative rail of the device.
* Connect the base of the transistor to the pin on the Arduino that will give on/off HIGH LOW cmds.
* Give HIGH & LOW commands from the Arduino which should now trigger your switch.
n.b. allow for device debounce times in between cmds. These will usually require a delay of 20-100 ms.
If you do a google search for 'transistor switch' then a number of useful links should come up as to how this type of switch works. If there are several buttons you need switched then a component such as a Darlington transistor array will give you some finnes.
« Last Edit: August 13, 2008, 01:23:06 pm by Miles » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

wow, that's great miles. I love this transistor solution. can you please suggest to me which rules I have to follow choosing an applicable NPN transistor like this?
Logged

Bristol, UK
Offline Offline
Edison Member
*
Karma: 1
Posts: 1197
Exhibitor at UK Maker Faire
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Pretty much any NPN transistor will do (but that's not much help).  Choose a small-signal NPN transistor, not a power transistor.  Maximum collector current rating in the rang of 100mA is about right.  You'll need medium gain, around 100 to 200 is OK.  Voltage ratings of 20V or so is plenty.

I'm in Europe, so types like BC107, BC548 and the like are common here.

http://en.wikipedia.org/wiki/BC548

Types such as 2N2222 may be more commonly available in other parts of the world:

http://en.wikipedia.org/wiki/2N2222
Logged

Pages: [1]   Go Up
Jump to: