Skip to main content
24 votes

Why am I receiving random input values in my Arduino?

You're getting noise pickup on the input pin when the button is not pressed. You need a pull-down resistor, about 10 kΩ to ground, to quiet the noise when the switch is open. Or even easier, use the ...
JRobert's user avatar
  • 15.3k
12 votes
Accepted

Resistor pull-ups for ESP8266

In general it makes little or no difference what the value of resistor you use is. The only things it can affect are: The current consumption while a button is pressed - a lower value resistor will ...
Majenko's user avatar
  • 105k
7 votes
Accepted

What is micro C in a circuit diagram?

It means "Micro Controller" - you know it as "Arduino".
Majenko's user avatar
  • 105k
6 votes

Newbie Arduino DC motor problem

I see a couple of issues here, which are related to your questions. I will use numbers here, but these do not necessarily correspond to the numbers you have used when asking. The first thing you need ...
nbloqs's user avatar
  • 161
5 votes

Unexpected Delay Between For Loops

The claim “The cause it that your 3rd led (2nd element in the array) is reapeted twice” is wrong. Apparently that sentence is supposed to mean that the long delay is due to i being one too large, ...
James Waldby - jwpat7's user avatar
5 votes

How to select which resistor is required for my curcuit to reduce voltage

A resistor can only drop a certain voltage when there is a certain current - as you know from Ohm's Law. If you have resistance R and current I the voltage dropped is R×I. So if the current changes ...
Majenko's user avatar
  • 105k
5 votes

Why does a pull down resistor configuration not destroy the pin it's connected to?

When you have a pin in INPUT mode it is high impedance. That means that to all intents and purposes, to the outside world, the pin is not connected to anything internally. In reality it is, but that ...
Majenko's user avatar
  • 105k
5 votes

Push button issues

You've got the button wired wrong. Your resistor is inline with the signal going to the pin. It should be going from the pin to 5V. The button should be wired directly to the pin and ground. Or ...
Delta_G's user avatar
  • 3,366
4 votes
Accepted

Getting the DS18B20 detected and temperature read

Vdd on the DS18B20 is not connected to anything. According to the datasheet: When the DS18B20 is used in parasite power mode, the VDD pin must be connected to ground Connect 5V from the Arduino ...
Nick Gammon's user avatar
  • 38.4k
4 votes

Why have resistor at end of circuit cycle if GND dissipates final energy?

Roman, As I understand your question you have a resistor, an LED and a switch in "series". It makes no difference in which order these are connected. It may help to think like water flowing through a ...
Milliways's user avatar
  • 1,645
4 votes

What difference makes resistance of thermistors?

Skip to the end to get the easy answer! Your choice of thermistor and bias resistor values depends on the following: 1. How much current do you want to spend? 2. How do you want the thermistor ...
John Taylor's user avatar
4 votes
Accepted

Reading 4 to 20ma pressure sensor using uno

To read a current with the Arduino you first have to convert that current to a voltage - and you do that by passing it through a resistance. The voltage dropped across that resistance as the current ...
Majenko's user avatar
  • 105k
4 votes
Accepted

Resistors on LCD - does a small difference matter?

No, it doesn't matter. That resistor is just for the backlight LEDs. The larger the resistor the dimmer the backlight will be. As @VE7JRO suggests, you can always put two 330Ω resistors in parallel, ...
Majenko's user avatar
  • 105k
4 votes
Accepted

How do I know if I need to use a resistor in a circuit?

From the specifications of the sensor, you know the maximum current the sensor should be allowed to draw. Suppose you need to put 5v across the sensor. Then write down Ohm's law: E = IR (the voltage ...
JRobert's user avatar
  • 15.3k
4 votes
Accepted

Why is it I need transistors and resistors to turn a DC motor with an Arduino but I can connect it directly to a battery?

If you want the motor to rotate continuously, without using PWM, and without switching the motor on and off from the Arduino, you can connect the motor straight to 5 V and ground. If you then add a ...
ocrdu's user avatar
  • 1,795
3 votes

What difference makes resistance of thermistors?

The standard way to measure a resistive sensor is to make a voltage divider with the sensor and a fixed resistance between Vcc and GND, like this: Vcc │ Rb │ ├─── analog input │ Rx │ GND ...
Edgar Bonet's user avatar
  • 43.3k
3 votes
Accepted

Stop Led's from blinking

It makes sense to make switch-testing fairly independent of blink-control. That's done in the following code, which turns blinking on or off each time a button is pressed. With this code, between ...
James Waldby - jwpat7's user avatar
3 votes

Stop Led's from blinking

As the OP explained in a comment, what he is trying to achieve is to have a button alternate between blink and off, not having the button to be pressed to shut down the led. This can be done in this ...
frarugi87's user avatar
  • 2,721
3 votes

Stop Led's from blinking

EDITED The Arduino loop() function makes the use of a while loop redundant in this case. Even worse: the way you've implemented that while loop prevents buttonState from being updated, thus getting ...
Enric Blanco's user avatar
  • 2,114
3 votes

Purpose of this resistor in Arduino Nano schematic

The resistor is one of 4 resistors that make up an SMD resistor array, RP2. It is seen on the board here: The resistor array works like this: The resistor on this array is spare, so both ...
sa_leinad's user avatar
  • 3,188
3 votes
Accepted

Powering arduino sensors - what resistor should I use?

You should have NO resistor. The datasheet states the current values the device will pull from the supply. Supplies DO NOT PUSH CURRENT. Remove all resistors. As long as the voltage is correct and ...
Majenko's user avatar
  • 105k
3 votes
Accepted

Why does current flow along a wire instead of a resistor right next to it?

So, the part that I don’t understand is, how come when the button is clicked and the current can pass through, the current doesn’t go through the pull down resistor and instead goes along the input ...
Majenko's user avatar
  • 105k
3 votes
Accepted

measure +3V and -3V through resistor divider and switch on/off by digital pins

When measuring a voltage that is higher than the maximum rating, the voltage of interest is tied to ground with a voltage divider. When measuring a negative voltage, you instead have to tie the ...
Sim Son's user avatar
  • 1,869
3 votes

Why does the transistor burn out

TinkerCAD may have mislead you on the pinout for the transistor TinkerCAD PN2222A
markshancock's user avatar
3 votes

Why does the transistor burn out

By this, does it mean that you still have a problem turning the pump on? Because a PN2222A should handle up to 1A through its collector, as the datasheet states http://www.mouser.com/ds/2/149/PN2222A-...
jDAQ's user avatar
  • 193
3 votes
Accepted

i2c high speed and pull-up resistors

i need to speed up the comm to fast mode how to make this Wire.setClock(400000); and the line of code where to put it in the code Just after Wire.begin() in setup(). Wire.begin() sets the speed to ...
Majenko's user avatar
  • 105k
3 votes

Can I control LED brightness with potentiometer without any code, as well as reading the potentiometer value?

You need to "buffer" the potentiometer to separate it from the LED and resistor. The simplest circuit for that is a unity-gain voltage follower with an op-amp: simulate this circuit – ...
Majenko's user avatar
  • 105k
3 votes
Accepted

Are these GND connected resistors on the Arduino Due redundant?

Yes, they are redundant. They are elements of resistor arrays (multiple resistors in one package) that aren't used. They have just connected all unused pins of those packages to ground. If you want to ...
Majenko's user avatar
  • 105k
3 votes

Why am I receiving random input values in my Arduino?

Your code mentions pin 3 while you describe using pin 2. Perhaps that has to do with your error. Otherwise, check the following things: do you use long cables or is it near strong magnetic or static ...
TeD van Loon's user avatar
3 votes

Why am I receiving random input values in my Arduino?

Here is what you can do Check if the switch is connected to the defined input pin. The Arduino starts form pin 0 and sometimes we can misread while connecting. Check if the serial monitor has same ...
eToll Systems's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible