Pulling a Pin Low

I am using a Arduino to Transmit over radio.

i have completed most parts but this bit confuses me, I know its simple but just confuses me,

The Books says :Put this pin low (less than 0.66 Vdc) to key transmitter and enable external mic audio path. This path is pulled low via a diode when front panel mic PTT is pulled low to allow sensing of mic PTT by accessory. This pin pulled high to 3.3 Vdc via 3.3k ohms

how do I use a Arduino UNO to do this???????

digitalWrite (PTTpin, LOW);?

(Is there something wrong with the auto-repeat on your question-mark key?)

See I knew it was someing easy. lol.

No, just a frustrated key. :)

Nope, it's not as simple as that:

Put this in your "setup()" function:

void setup()
{
  // Pin is floating, external pullup does its job
  pinMode(pin,INPUT);
}

To pull the pin low in your code:

pinMode(pin,OUTPUT);   // Pin connects to GND

To release the pin afterwards:

pinMode(pin,INPUT);     // Pin is floating again

nb. Do not use "digitalWrite()" on the pin, only "pinMode()"

This appears to be getting confusing again. lol.

On the radio there a series of pins which 2 are. PTT (as above) and GND.

How would I physicly connect this to arduino?

If the Ard pin is output, would that not output current to radio?

It depends on whether or not you want manual control as well as Arduino control.

Isn't transmitting data by amateur radio banned except for special licences?

Its a system of 6 radios on a rack.

Which on the hit of a button. All radios PTT and another device transmit voice via the Radio.

The ardunio will receive the button input, activate all 6 inputs then start the other device.

Most is complete apart from the PTT bit.

I have the required licence aswell. :)

As a last note, I looked at a solid state relay between PTT and GND but thought that was over kill.

Do you still require manual control? If you do, use fungus' method, if you don't, mine will do.

You could also use transistors for the Arduino to pull down the PTT line/s to gnd instead of using relays.

KingDing: If the Ard pin is output, would that not output current to radio?

Yes, that's why I never set the pin to OUTPUT + HIGH in my method

(and why I also told you not to use "digitalWrite()"....)

In reality Arduino pins have four states.

1) Not connected to anything at all (..."very very high resistance" to the pedants, aka "high-Z") 2) Connected to GND via a little 40mA MOSFET 3) Connected to Vcc via a resistor 4) Connected to Vcc via a little 40mA MOSFET

My method switches between (1) and (2) using pinMode()

(3) and (4) are bad if your external device is 3.3V - don't do it!

I don't know why, but somehow I read this as being connected to a Due. :(

fungus: In reality Arduino pins have four states.

1) Not connected to anything at all (..."very very high resistance" to the pedants, aka "high-Z") 2) Connected to GND via a little 40mA MOSFET 3) Connected to Vcc via a resistor 4) Connected to Vcc via a little 40mA MOSFET

My method switches between (1) and (2) using pinMode()

(3) and (4) are bad if your external device is 3.3V - don't do it!

Quick question on this, if the pin is set up in the first state, isn't there still a connection there? its not physically disconnected from the chip obviously but then that means the internal gates are in a transitions state right? now according to most sources online, if i left the pin floating and had a circuit hooked up to it with 0.8v - 2.2v it could burn out that pin.

example below;

GPIO pin 4 ------(a)LED(c)------100ohm resistor----- ground | | | ----(c)LED(a)------100ohm resistor------ +5 v

AVR chip with 5v Vcc

with that pin set to pinMode(4, INPUT); would this cause a problem?

i decided to ask here rather then start a new topic. datasheet isn't specific about it.

If the pin is set as INPUT and has anything from GND to Vcc connected to it (or left floating) it's fine. With respect to "most sources online" I have never seen anyone suggest otherwise and such a suggestion seems absurd; where did you read this?

Remember that the default state of a pin is INPUT. If there were any danger in leaving it in that state we'd all be burning out chips left and right.

FYI, a "floating" pin, by definition, has nothing (including the pullup) connected to it.

I guess : If this : and Pin set to INUT: Both LEDs will glow (if they are red) (if blue leds - i guess both dark)

GPIO pin 4 ------(a)LED(c)------100ohm resistor----- ground | | | ----(c)LED(a)------100ohm resistor------ +5 v

Those resistor values are for White leds with a 3.2v drop and 20ma max forward current.
The issue is, from what I read (not saying its a valid source) if the input is tri-stated by calling pinMode(pin, INPUT) the gate could be damaged due to excessive current from the circuit its connected to. I know if the pin isn’t connected to anything and left as an input its fine but I’m more concerned with having it connected to something and left as an input with voltages below 3 volts applied to it for longer then a second.

here is where i originally heard of this in the comment section Driving a Bicolor LED from a Single Output Pin « Keith's Electronics Blog
here is an article someone else brought up to help describe the issue http://www.ti.com/lit/an/scba004c/scba004c.pdf

I’m still trying to make sense of it, basically right now I’m left to set up a test myself and probe the pins.

if the input is tri-stated by calling pinMode(pin, INPUT) the gate could be damaged due to excessive current from the circuit its connected to

if an input is tri-stated its input impedance is high (a lot of megaohms), so no current is flowing in (except some leakage, let say 500nA). Btw, connecting an arduino/mcu to an HF/VHF transceiver is not an easy task usually :) Everything works nice until you key the PTT, or you say something into the mike when doing ssb :)