Using pin as ground ground

Hi, I have a camera from my old drone with a spi sd card module attached. I have to connect the green wire to the ground for less than 1 second to take a picture, and more than 1 second to start and stop the video. Is it possible to connect the green wire for example to pin 7 on the uno and use digitalWrite(7, LOW) to control the camera? But what state should I put pin 7 in after connecting to ground? Wouldn't digitalWrite(7, HIGH) damage the camera module?


What's the camera's power supply voltage?

What type of signal is on the green wire ?

Or, you could use a simple relay, possibly even a reed relay. Much easier, less 'connected'.

Use a transistor/FET to pull the wire low.

Make it an input pin, and it won't act as GND. It will act as an open circuit instead.

1 Like

I'm not sure, because there is a step up converter and a transistor on the board, but I power the whole board with 5v.

How would I control the timing then?

Great idea, but I'd like to do it without using other components.

What is your current plan for controlling the timing?

For informed help, please read and follow the instructions in the "How to get the best out of this forum" post.

I was thinking about something like this.

#define cam 7

void setup() {
  pinMode(cam, OUTPUT);
  digitalWrite(cam, LOW);
  delay(500); // to take a picture
  digitalWrite(cam, HIGH);
}
void loop() {
}

Safer:

#define cam 7

void setup() {
  pinMode(cam, OUTPUT);
  digitalWrite(cam, LOW);
  delay(500); // to take a picture
  pinMode(cam,INPUT);
}
void loop() {
}

For this to work, the camera power supply voltage must not exceed the Arduino Vcc, and the camera current draw should not exceed about 20 mA.

It works fine, thanks.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.