Skip to main content

Questions tagged [switch]

In electrical engineering, a switch is an electrical component that can break an electrical circuit, interrupting the current or diverting it from one conductor to another

Filter by
Sorted by
Tagged with
1 vote
1 answer
103 views

Please help me with my project of water pump relay switching too fast

I have some problems with my project. I'm using a water level sensor with two outputs, a 5V fan and a water pump. Here's the wiring . What I want to do with this project is: When the water reaches 2 ...
jeonsann's user avatar
0 votes
1 answer
89 views

How can I switch the power on/off to cut BIG currents (200A)? [closed]

Context: I have an off-grid cabin with PV powered 12V DC. I want to cut power to an inverter (12V DC ->220V AC) when I leave by pressing a button as it draws too much in standby. Most relays I have ...
oligofren's user avatar
  • 111
-1 votes
1 answer
43 views

Arduino pin erratic behavior?

I've built a switch key matrix (thus the diode, contextually useful schematics below) and me being me, I realised after that I misunderstood a few things about how button really works, to say the ...
O'Schell's user avatar
4 votes
2 answers
172 views

Arduino resets or stuck during run, only when DC motors are connected

I'm using an arduino connected to 2 DC motors through L298N. the arduino is powered by a 9V battery, and the L298N is powered by 4 AA batteries. there's also a switch that starts the movement. I've ...
young marx's user avatar
-1 votes
3 answers
747 views

Correctly connecting a four-pin tilt sensor to a breadboard before going live

I'm working on Arduino Kit book's Project 8: the digital hourglass. I've got the picture and the circuit diagram below. My question is a fundamental one, and I really don't know how others figured it ...
AndrewGreen's user avatar
1 vote
0 answers
32 views

Poor Contact and Low Current Issues with Microswitches in Arduino USB Game Controller

I have made a USB game controller using the Arduino Micro and Omron microswitches (VX-01-1A3) for the buttons. The switch is wired with one end connected to a digital pin and the other end connected ...
gon weigang's user avatar
1 vote
0 answers
83 views

Pushbutton firing somewhat randomly

I have a circuit which consists of a pushbutton and 2 relays. The power supply is driven either over USB, where the circuit seems to work fine, or powered by a linear regulator board I've knocked ...
XtrmJosh's user avatar
  • 119
3 votes
1 answer
586 views

Input Oscillating Wildly

I'm trying to read an input from a switch but instead of getting 0 and 1 for closed/open, I'm getting 0 and a rapid series of 1s and 0s. Originally I tried (and failed) to simply read a rotary encoder ...
WillM's user avatar
  • 39
2 votes
1 answer
136 views

Safe to solder a slide switch to unused GPIO pins?

I have a Digispark Rev.3 Kickstarter with ATTiny85 (see pinout below) and a three pin slide switch (see example below). I want to use the slide switch to control a task running on the Digispark, with ...
emma.makes's user avatar
6 votes
2 answers
192 views

Do you actually NEED external resistors for switch connecting IO pin to ground?

Years ago, I encountered a fairly long debate at AVRfreaks.net about whether or not it's OK to directly connect AVR pins that are configured as inputs with internal pullup enabled directly to ground ...
Bitbang3r's user avatar
  • 541
0 votes
2 answers
361 views

Switching fan on with transistor, fan running very slowly

I want to control a fan with an arduino from 0 rpm to full rpm. Using a (modified) pwm signal from the arduino I can control the speed w/ the pwm signal, but it cannot go all the way to 0 rpm. So I ...
user1908460's user avatar
1 vote
1 answer
1k views

Is it possible to use a slide switch without a resistor?

I understand how pullup and pulldown resistors work with push buttons and I also understand that an analogous idea can be applied to slide switches. Furthermore, I know that some versions of Arduino ...
user3347814's user avatar
-1 votes
1 answer
335 views

Driving higher loads with PWM

My Arduino Pro Micro can source 500mA from 3.3V VCC, when it is USB powered. The chip itself, is rated for 200mA, though, and its output pins for 20mA recommended, 40mA max. I am looking to have 3 PWM ...
Bram's user avatar
  • 199
4 votes
2 answers
3k views

How to switch 12V with esp32?

Hello i want to switch electric door lock (12V, 170mA) with esp32(3.3V). If is it possible I want use tranzistor. I tried to use IRF520, but it only worked with 5V. My sugestion is use 2 tranzistors ...
Noobie's user avatar
  • 43
2 votes
2 answers
153 views

Stuck In While Loop

So I'm a beginner at Arduino and I have to light up an LED grid to show digits from 0-9. I wrote a bit of code (with the help of some people) and it's like 90% done but there's this ONE problem. I ...
BertjeDP2000's user avatar
3 votes
1 answer
116 views

Water level switches / reed switches and Arduino Uno

How could I estimate the max number of switches that I could connect to an Arduino Uno? I am questioning if Arduino has enough power to simultaneously operate an X number of switches with no issues. I ...
Investigator's user avatar
2 votes
1 answer
43 views

Connecting LEDs and push buttons 12 feet away from Arduino UNO

I have a PCB (let's call it remote PCB) on which I have 4 LEDs and 4 buttons mounted. The remote PCB is far away from my desk (about 12 feet away). The LEDs are used to indicate the status and the ...
Sonder's user avatar
  • 191
0 votes
2 answers
697 views

2 way switch with Arduino?

Hey I'm working on a home automation system where I can replace one of my 2 way switches to an Arduino Or node MCU controlled one but I want to avoid normal relays because as of what I know they can ...
rohithrathod banoth's user avatar
4 votes
1 answer
162 views

Turning off a LED

I am trying to make 2 alarms for 2 different times using 2 LED's which should turn on when the time corresponds to the set time and then if a pushbutton is pressed, the LED should turn off. For the ...
Biancaaa's user avatar
0 votes
1 answer
132 views

Switching 4.2V circuit with 3.3V Arduino GPIO

I am trying to learn about MOSFETs and see this p channel MOSFET and this tutorial. I am trying to use a 3.3V arduino GPIO pin to control a load that is powered from a 4.2V battery in much the same ...
rfii's user avatar
  • 170
1 vote
1 answer
198 views

Arduino UNO With On / Off Module Switch + Battery Advice

So I have the following connected and the programming works fine when connect by USB The Parts 1 Arduino UNO 1 Laser Module (KEYS) 1 Rocker Switch Module (Standard 3 PIN) 2 Variation Motors (KEYS) 1 ...
Davinco's user avatar
  • 21
1 vote
1 answer
141 views

Float switch is not detected

Good day everyone, forgive me for the shabby drawing I am just panicking, why my float switches are suddenly undetected by my Arduino mega. I've tested all the float switches one by one to confirm if ...
princessbubbles15's user avatar
2 votes
0 answers
160 views

Single LED controlled by two pushbuttons - one of which acts like a toggle switch

Trying to control this LED with those 2 pushbuttons - one button that starts a short flashing sequence, another pushbutton acts like a toggle switch, one press bulb is on, another press bulb is off. ...
Varonne's user avatar
  • 89
2 votes
1 answer
74 views

Arduino changing output based on wire voltage

I’m new to arduino and I want to build myself smart switch that can be turned of both manualy and via wifi, is there any way to change position of relay based on if another wire is live or not? Im ...
krystof18's user avatar
  • 315
1 vote
0 answers
123 views

how to control switch (proteus) using bluetooth card (HC-05) and arduino?

This is the first time I use the Internet with the Arduino in the proteus , What are the stages that I must follow in order to be able to control the switch via Bluetooth? If it was possible to ...
shiro343223's user avatar
0 votes
2 answers
69 views

Switching time of a multiple input switch

I basically have two switches Both switches will be pressed simultaneously in different order I want to know which switch was pressed first
Obed's user avatar
  • 9
-1 votes
1 answer
70 views

Recommend an Arduino Uno shield to monitor the state of 5 DPDT electrical switches

I have a project where I need to monitor the state of 5 DPDT electrical switches with Arduino Uno. Also, the Arduino board will be measuring the output from 3 thermocouples on 3 of the analogue pins ...
user avatar
0 votes
1 answer
81 views

Switch loops with SPDT switch

I have made a drone/car quadruped robot thing and I need help with the code. I have found two codes to use to control each aspect of it but I need help to connect them. I have made a radio controller ...
Terrel Ross's user avatar
2 votes
1 answer
101 views

status whether the switch is connected to arduino or not?

I made a small circuit in which a push-button is connected to Arduino via a pulldown resistor. So, whenever it is pressed it connects to 5V otherwise pulled down to the ground. this is working fine ...
N L's user avatar
  • 21
3 votes
3 answers
4k views

How to wire a three-pin on-off-on switch for reading input?

I would like to read the output of an on-off-on switch with my Leonardo board, but I have very little knowledge of electronics and don't know how to wire it up. This is the switch in question: E-...
Boonswaddle's user avatar
1 vote
3 answers
1k views

using a switch case with a 5-position switch and serial output

I'm trying to get started on developing a menu system for my LCD1602. I have a Parallax 5-position switch (up,down,left,right,center) and I would like to interface the two. I've been trying to get ...
Au42's user avatar
  • 19
0 votes
1 answer
125 views

Trying to switch a 5v fan with a LiPo and can't figure our what's wrong at full duty cycle

I have a simple project where I want to turn a 5v fan on/off and both the MCU and fan will powered by a LiPo battery. I'm powering the ESP and fan directly from the battery in the attached circuit. ...
farzadb's user avatar
1 vote
0 answers
511 views

multiple button switch case how to add counter [duplicate]

I want to add counter in multiple-buttons-to-control-relays: int relay1 = 23; int relay2 = 25; int relay3 = 27; int relay4 = 29; int relay5 = 31; int relay6 = 33; int relay7 = 35; int relay8 = 37; ///...
Muhammad Kamran's user avatar
3 votes
3 answers
25k views

How to use this 3-pin slide-switch?

I purchased these slide switches recently because I want to use them in my project: But I don't know what to connect up the three pins to and I can't find any information about them online. Nor can ...
Saqib Ali's user avatar
0 votes
1 answer
133 views

How to use this Toggle Switch?

I purchased this toggle switch recently because I want to use it in my project: But I don't know what to connect up the three pins to and I can't find any information about it online. Nor can I find ...
Saqib Ali's user avatar
0 votes
1 answer
34 views

Correct position for buttonState in my FSM

I wrote a FSM with the help of some tutorials through out the world wide web and so far it does what I want to do with it. But one thing that is not the way I want to be, is to exit the state ...
Marvin's user avatar
  • 3
0 votes
1 answer
328 views

How to code an arduino to execute a particular code using a slide switch

I’m pretty new to arduino. I need help concerning a project I’m making. I’m using a SPDT slide switch to switch between what code(method) should be executed.i.e when I shift the switch to the left, ...
Brandy's user avatar
  • 33
-1 votes
1 answer
79 views

How can I make my Arduino Esplora program start on the press of a button and then continue to run without me having to hold the button down? [closed]

I am trying to create a program where the main code starts on the press of a button. I am using an Arduino Esplora, and I want to have the built-in LED be blue when I plug in the power until I press ...
LainaS's user avatar
  • 3
1 vote
0 answers
94 views

What is the best way to replace the buttons inside a car remote chip so that it can be controlled via Arduino?

I have a car remote that looks like the following I would like to replace the buttons with some sort of switch or relay that can be programmatically controlled via an arduino unit. Would a simple ...
user321627's user avatar
0 votes
1 answer
162 views

Running in loop or once according to a slide switch position

I have a question. I made a system which includes a servo, a stepper and a wiper motor :) All these parts has one job to do and I can code it. But, I want to make 2 modes in this system Single ...
can's user avatar
  • 1
1 vote
0 answers
58 views

default in switch doesn't appear to execute

I have a situation where the default case in my switch statement doesn't appear to execute as expected. I wonder if there is some subtlety I'm missing here? Given the following enum: enum ...
Tim Long's user avatar
  • 305
1 vote
2 answers
450 views

How to toggle LED and motor on button press?

we want to have a LED turn on with the press of a button, and become brigther and brighter as times go by (whithin a defined time frame), and when it reaches maximum brightness to turn off for a ...
Iulia Popescu's user avatar
1 vote
0 answers
56 views

ESP8266 connected to a HIGH pin and DPDT only works sometimes. Works everytime if connected to 3V3 pin

I have a Wemos D1 Mini hooked up to a DS2Y-S-DC3V DPDT switch. When I have the coil ends are hooked up to a pin (D2) and ground, it will click when I set the pin HIGH. It should click again when it ...
justin's user avatar
  • 111
-1 votes
1 answer
74 views

Control 4 digital outputs with one switch

I want to control 4 digital outputs (d0, d1, d2, d3) with one switch. When the Arduino starts, they should all be in state LOW. Now, after pressing the button once, d0 should get HIGH. Another push ...
pfra's user avatar
  • 1
1 vote
0 answers
146 views

Made a light controller for the holidays

I am a new the world of Arduino. I found on YouTube, how to build a light controller (https://www.youtube.com/watch?v=WvG9c84ApFA&t=39s). I follow every step but it doesn't work. Here are some ...
Jason McDonough's user avatar
1 vote
2 answers
875 views

LCD screen won't stop printing the same characters twice

I'm hoping that someone might be able to help me figure out how to prevent my LCD from giving me double digits (i.e. 55, 66, 77 - instead of 5,6,7); I have 2 functions that are printing, so I'm ...
zRockafellow's user avatar
0 votes
2 answers
106 views

Cycling through switch states

I'm making a desk lamp out of 2x WS2811 strips (attached to the triple ports at top right of board below). The brightness of the strips is controlled by a potentiometer, and the colour by a switch. ...
Jim421616's user avatar
  • 188
2 votes
0 answers
120 views

Turning on controller with button and turning off with a timeout

I am making a device controlled by an ESP 8266 and am wanting to save power by having it power down when not in use. The desired behavior is for a momentary button press or vibration sensor activation ...
Rian Simpson's user avatar
-1 votes
1 answer
3k views

Using an NPN transistor as a switch to turn on/off a DC Motor

I am trying to control a 3V DC motor (FA-130) with my Arduino Uno, and am trying to do that using an NPN transistor (2N3904) as a switch, as shown in this diagram. I used the Blink example and ...
user453441's user avatar
0 votes
1 answer
92 views

New to arduino, help wiring relay

I am new to arduino and need some help. I just baught light bars for my jeep and wiring harnesses with them, the harnesses come with buttons and I wanted to replace the button and have them controlled ...
JamminGinger's user avatar