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
149 questions
1
vote
0
answers
65
views
Stepper Motor Direction Not Changing with Toggle Switch - Need Help
I’m trying to control the direction of a stepper motor using a toggle switch with my Arduino. While the LED indicates that the switch is working correctly (i.e., it changes state as expected), the ...
1
vote
1
answer
176
views
Water pump relay switching too fast
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 cm, then the water pump is on while ...
0
votes
1
answer
146
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 ...
-1
votes
1
answer
86
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 ...
4
votes
2
answers
547
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 ...
0
votes
3
answers
2k
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 ...
1
vote
0
answers
42
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 ...
0
votes
1
answer
143
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 ...
3
votes
1
answer
714
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 ...
2
votes
1
answer
185
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 ...
6
votes
2
answers
289
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 ...
0
votes
2
answers
539
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 ...
1
vote
1
answer
2k
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 ...
0
votes
1
answer
505
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 ...
4
votes
2
answers
5k
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 ...
2
votes
2
answers
201
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 ...
3
votes
1
answer
136
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 ...
2
votes
1
answer
63
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 ...
0
votes
2
answers
902
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 ...
4
votes
1
answer
191
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 ...
0
votes
1
answer
175
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 ...
1
vote
1
answer
263
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 ...
1
vote
1
answer
180
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 ...
2
votes
0
answers
195
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.
...
2
votes
1
answer
95
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 ...
1
vote
0
answers
216
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 ...
0
votes
2
answers
82
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
-1
votes
1
answer
98
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 ...
0
votes
1
answer
121
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 ...
2
votes
1
answer
144
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 ...
3
votes
3
answers
7k
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-...
1
vote
3
answers
2k
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 ...
0
votes
1
answer
156
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. ...
1
vote
0
answers
561
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;
///...
3
votes
3
answers
38k
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 I ...
0
votes
1
answer
170
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 ...
0
votes
1
answer
56
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 ...
0
votes
1
answer
408
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, ...
-1
votes
1
answer
85
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 ...
1
vote
0
answers
110
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 ...
0
votes
1
answer
182
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 ...
1
vote
0
answers
84
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 ...
1
vote
2
answers
545
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 ...
1
vote
0
answers
68
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 ...
-1
votes
1
answer
85
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 ...
1
vote
0
answers
163
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 ...
1
vote
2
answers
1k
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 ...
0
votes
2
answers
127
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. ...
2
votes
0
answers
143
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 ...
-1
votes
1
answer
5k
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 ...