Go Down

Topic: [SOLVED] Activating a Button outside of Arduino (Read 3664 times) previous topic - next topic

Vini

May 19, 2011, 12:35 am Last Edit: May 23, 2011, 10:00 pm by Vini Reason: 1
Hey guys, how are you? Hope fine.

I'm trying to activate a button of a mp3 player with Arduino. Well, the main idea is very simple, just make a short with 2 wires in a tiny period of time to "simulate" a button pressed (the mp3 player has a smd pushbutton where I soldered 2 wires to make the short). Anyone have a idea how can I do that? I know I can use a relay, but I don't want to make a large final solution so, I was thinking in something smaller.

Well, thanks for your help anyway.
Bye (:

rbtying

A transistor would work, and they can be very small.  Also, if you can figure out what the voltage going through the switch is, it may be possible to hook it up to a digital output and just use digitalWrite.

zoomkat

I've used transistors to simulate button pushes on a tv remote and it worked well. An optical isolator chip might also be a good option (but the local radio shack does not carry them).
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

Vini

Hey,

The idea with transistor is what this picture shows?


Vini

Can you post a circuit please?
Thank you :)

zoomkat

Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

Grumpy_Mike

Quote
The idea with transistor is what this picture shows?

It would do if it were right, but its wired up all wrong.

While a transistor can work, much better is an FET as this actually changes resistance. I have had situations where a transistor would not trigger something but an FET would. Remember you also need to connect the ground of your device and the arduino ground together.

Vini

Grumpy_Mike, what is the right way to wire this?
Thanks for your help!

And thanks zoomkat for the website!

Vini

My old image is wrong, I mean this:


What is the right way to hook that wires?

Grumpy_Mike

That is right, I was referring to the first image you posted.

Vini

Hey Grumpy_Mike,

I'm sorry for inconvenience but, can you send to me the circuit that works with FET? I'm having a lot of trouble with this circuit.

Thank you very much.

Grumpy_Mike

Just replace the transistor with a logic level FET and make the base resistor (which is now a gate resistor) 100R.
Do not connect the drain (was the collector) to +12V or a resistor but common up the grounds between your device and the arduino.

biocow

I tried a transistor and it wasn't working, but only cause n00b me forgot to connect the grounds together. So I went with a relay instead.

http://arduino.cc/forum/index.php/topic,49979.0.html

Vini

I'll try with the FET tomorrow. I used a 12V relay and it worked but when the pushbutton was pressed by the relay, I heard a loud noise on the speaker - don't know why..

Vini

Problem Solved!

Here is the final circuit working!

Thanks for everybody!

Go Up