Go Down

Topic: i want to use arduino as a automatic switch (Read 3830 times) previous topic - next topic

thollu

Oct 27, 2013, 09:49 am Last Edit: Oct 27, 2013, 10:17 am by thollu Reason: 1
i want to use arduino as a automatic switch that that short circuit two pins after a time (eg: 15 seconds )    :)

i have 2 wires that are connected to 2 different pins on the arduino board and I need to short circuit them for 1 sec but it has to short circuit after 15 seconds when arduino is turned on , and i want to loop this

i need the code  ;)
ASAP , i need the code for my project by tuesday
. :smiley-roll:

another way without the relay,
by using a transistor or something that gets on after 15 seconds? and the transistor as a switch,,
the transistor has to be turned on after 15 seconds
all i need is the code

need the coding,

Help appreciated


arduinodlb

#1
Oct 27, 2013, 09:52 am Last Edit: Oct 27, 2013, 09:58 am by arduinodlb Reason: 1
You cannot use the arduino to connect wires together. It is not a switch.

You will need to connect a controllable switch (relay) to a single wire of the Arduino. When the Arduino pin is high (5V), it would close the switch, and when the Arduino pin is low, the switch would be open.

It terms of code, the millis() command tells you how many milliseconds have occurred since the Arduino has started. Also, the delay() command allows to to wait a certain number of seconds. You could use these commands to time things.

ps: You will not get this done by tomorrow. If this is an assignment for University, you should have started before today.
Do not IM me. I will not respond. Ask questions in the forum.

thollu

is there another way without the relay,
by using a transistor or something that gets on after 15 seconds? and the transistor as a switch,,

reply
thollu

arduinodlb

Sure. You may be able to use a transistor, but if you just need to connect two wires together, that's a more complicated way to go.
Do not IM me. I will not respond. Ask questions in the forum.

thollu


arduinodlb

Sorry, no.

I have given you hints about what you need to look into. Assignments are given so that you learn. It would be unfair to others to post the answers for you.
Do not IM me. I will not respond. Ask questions in the forum.

thollu

it is not an assignment or a test, just a simple project ,i only need the coding,
please can u help :(


arduinodlb

#7
Oct 27, 2013, 10:13 am Last Edit: Oct 27, 2013, 10:19 am by arduinodlb Reason: 1
Look at the functions I mentioned earlier. They are the functions you will need to do the timing.

The forum is here for people to help and guide you, not do your work for you, whether it's for University or not.
Do not IM me. I will not respond. Ask questions in the forum.

fungus


can u help? :smiley-roll:

can u post the code ?  ;)


Do I get the diploma if I do the work?

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

fungus


Sure. You may be able to use a transistor, but if you just need to connect two wires together, that's a more complicated way to go.


Maybe not, it might be an AC signal.

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

arduinodlb

FWIW, your "project" sounds very suspicious.
Do not IM me. I will not respond. Ask questions in the forum.

fungus


FWIW, your "project" sounds very suspicious.


Why?

To me it sounds like he's hacking a remote control, which has been asked a million times here.
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Paul__B


To me it sounds like he's hacking a remote control, which has been asked a million times here.


He is however, as is so common, failing the comprehension test which is - explain what you really want to do, rather than how you imagine you want to do it, but wouldn't be asking if you actually knew.

Hacking a remote control requires a transistor and a multimeter to figure out which way to connect it.  Actually, much simpler - a 74HC4016 in which case you can do up to 4 buttons and don't care which way round to connect the terminals.

fungus


He is however, as is so common, failing the comprehension test...


No argument there. This forum needs a great big sticky saying:

"Please tell us what you want to achieve, not what you're doing".

(Actually this applies to every tech forum on the entire Internet)
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

cjdelphi


You cannot use the arduino to connect wires together. It is not a switch


Why not?..

The current should be limited via a resistor (or the button would short it out too)  if so the arduino could indeed be used as a switch.

Go Up