I need more groudns than the arduino have, can i use outputs as grounds? and if it possible, how can i control it via internet whit an arduino yun, which is the command?
aqn1:
I need more groudns than the arduino have, can i use outputs as grounds? and if it possible, how can i control it via internet whit an arduino yun, which is the command?
I believe you can (via using digitalWrite (, LOW), depending on how much current you need to sync. As groundfungus said after my original post, you need to be careful that you don't ruin your microprocessor by having too much current go through it.
However, it is generally simpler to get something that provides more ground pins, such as a prototype shield with a small breadboard (http://yourduino.com/sunshop2/index.php?l=product_detail&p=93) or a Schmartboard power/ground strip: (http://www.radioshack.com/product/index.jsp?productId=12825865).
If you build your components on a standard breadboard, these usually have two power rails on each side, and you connect ground to the black rail, power to the red rail, and you need to interconnect the two ground rails to each other, and the two power rails to each other (unless you are dealing with multiple power levels).
If you are using a mini breadboard without power rails, you can connect the ground to one column of pins on your breadboard, and then connect four more pins to that column to give a common ground. For example, this is a variant of my telegraph shutter release, on this picture, you can see the black wires (ground) being chained together:
You can also make a Y-cable, with one end in the ground pin, and multiple cables to each place needing a ground.
If you do use an output pin as a ground, be aware that it can handle 40mA absolute maximum (20mA to be safe).
That digitalWrite pin low must be an input pin or an output pin?
Why don't you make a Ground bus?
(Please don't answer the question.)
The better way to solve this is to connect several leads together, with 1 lead coming out that connects to a ground pin.
If you have an output that you want to switch high & low, then that pin must use pinMode to declare that pin as an output.
The thing is that im controlling a microwave whit an arduino yun, the pcb of the microway have 4 common points to make combinations whit other four, for example the first common point make combinatio whit 4 points, the second common point make combinations whit the same four point that make combinations ehit the firs common point, so i need something like that
Oh, so you need to control 4 IO pins then.
What is the high voltage on the microwave? More than 5V will damage the arduino.
Is like 1 or 2 volts, how can i do it?
So having 5V output from arduino could damage the other device.
Best would be a simple relay so there is not voltage drop across the switch, next would be a really low Rds logic level n-channel mostfet.
Relay:
Connect + of coil to 5V, connect - to arduino output. Low out closes the relay contacts.
Add a diode from coil - (anode) to coil + (cathode) so current spikes generated when the coil switches get dissipated back into 5V.
Mosfet:
The problem for me is not controlling the output is the common points problem, cuz i need to make combinations between the common points and the outputs and the common points cant be the same cuz it makes combinatios whit the same outputs
Don't do that.
If you can't solder then buy a terminal block and screw together as many GND leads as you need.
So you're after some kind of switch matrix then.
Draw up a table or chart or something showing the combinations needed.
Ok i need something like this, the common point 1 make combinations with the points 5,6,7,8. The common point 2 make combinations with points 5,6,7,8. The common points 3 and 4 make the same combinations whit the same points that the 1 and 2 make.
aqn1:
I need more groudns than the arduino have, can i use outputs as grounds? and if it possible, how can i control it via internet whit an arduino yun, which is the command?
I do it all the time. I supply devices with both VCC and GND by setting digital pins HIGH or LOW respectively. It works great, as long as the device only draws 20 mA or less.
Because the Arduino pins are not as "solid" (i.e. output impedance) as the actual power supply, the VCC may be slightly less than 5 volts and the GND may be slightly more than 0 volts. Also, if your device produces switching current spikes (like CMOS gates, for example), their power and ground pins need to be bypassed with a good 0.1uF ceramic capacitor with low ESR.
aqn1:
That digitalWrite pin low must be an input pin or an output pin?
Output, of course. The same is true if you use another pin for VCC.
Example: You connected a small breakout board to your Arduino. The VCC pin is connected to Arduino pin 2 and the GND is connected to Arduino pin 6:
#define _VCC 2
#define _GND 6
digitalWrite (_VCC, HIGH); // output 5V for VCC
digitalWrite (_GND, LOW); // ground set to 0V
pinMode (_GND, OUTPUT); // turn on GND pin first (important!)
pinMode (_VCC, OUTPUT); // turn on VCC power
delay (100); // short delay to let chip power up
.......
....... // your main code goes here
.......
mmm so for example if i want to make other pin ground i just set the pin 6 high and then set the pin that i want to be a gnd low?
aqn1:
mmm so for example if i want to make other pin ground i just set the pin 6 high and then set the pin that i want to be a gnd low?
For every pin you want to be a ground, use digitalWrite (pin, LOW) and pinMode (pin, OUTPUT);