Hot answers tagged

25 votes
Accepted

NodeMCU - Vin pin as 5V output?

There is confusion about what is and what isn't possible with this board. This is because there are different versions with different power arrangements. NodeMCU 0.9 In this board the USB's 5V and the ...
user avatar
  • 101k
10 votes
Accepted

How to know positive and negative in breadboard

You decide which rails are positive and which are negative when you connect them to the + an - from your power supply or battery. A breadboard isn't polarised per se. It's just a bunch of cross-...
user avatar
  • 2,092
10 votes
Accepted

Why is my transistor switched output so low?

The problem is that you are using an NPN transistor as a high side switch. The voltage at the emitter of the transistor will always be about 0.7V below the voltage at the base. The "high" ...
user avatar
  • 352
6 votes

Logic level converter not working?

Based on your schematic, you need to provide a 3.3v power source to the 3.3v side of the logic level converter. You can use the 3.3v pin on the Arduino. Also, it's really hard to evaluate your ...
user avatar
  • 1,091
6 votes

NodeMCU - Vin pin as 5V output?

my 2 cents: A LoLin NodeMCU V3 when powered via USB in the Vin pin reads 2.2 V (don't know why) but... in the VV pin you can get the 5V coming from the USB; so if you need 5V use that pin. The board ...
user avatar
6 votes
Accepted

Measure Vcc on ATtiny13a?

The code you linked to measures the 1.1 V internal reference using Vcc as a reference. The ATtiny13A cannot do that. It does have a 1.1 V internal reference, but it can only use it as a reference for ...
user avatar
  • 35.5k
6 votes
Accepted

Measuring li-ion that arduino is running from

Using the 1.1V internal analog reference to measure a draining VCC source by using a voltage divider on it You could indeed use a voltage divider, and measure a scaled-down Vcc against the internal 1....
user avatar
  • 35.5k
5 votes
Accepted

Controlling voltage and current from chip?

You're misunderstanding what you need to drive a transistor. A transistor will allow up to a specific amount of current through the collector depending on the current that flows through the base. If ...
user avatar
  • 101k
5 votes
Accepted

Digital I/O threshold voltages for ATmega32u4

LVTTL is Low Voltage Transistor-Transistor Logic. In general, the term "TTL" is used for a digital signal. The "Low Voltage" part is special, the ATmega32U4 switches from low to high (and vice versa) ...
user avatar
  • 3,077
5 votes

Dimming this ~30V led with PWM, what do I need?

It will not be possible for you to PWM dim your LED with that LED driver (power supply). That is a constant current driver with under/over-voltage protection. It delivers a specific amount of current (...
user avatar
  • 101k
5 votes

Do the I/O pins on Arduino read current or voltage?

They read voltage. When you close the pushbutton switch the input should have a 0V or digital "0" on it. When you open the pushbutton the resistor should pull the input to 5V or digital &...
user avatar
  • 1,016
4 votes
Accepted

Can the Arduino be hurt by connecting too many LEDs in serial?

The forward voltage of an LED or diode is the applied voltage of the "knee" in the exponential characteristic at which it starts to substantially conduct, and in the case of an LED, produce light. ...
user avatar
4 votes

NodeMCU - Vin pin as 5V output?

No you cannot use a Vin or VU pin as a GPIO pin which can be controlled by a program. Vin can be used as an input for 5V battery or as a 5V output when NodeMCU is powered by USB (except on NodeMCU v3 ...
user avatar
4 votes
Accepted

How to produce multiple DC voltages for a single project

First you want to take a regulated 24V supply. To that you want to add a switch-mode ("Buck") regulator to drop you down to 5V. You don't want to try using an LDO for this unless you are happy to ...
user avatar
  • 101k
4 votes

Measuring li-ion that arduino is running from

If anyone else is confused by this: Will it hurt your Arduino? No, this is a internal voltage reference between VCC & the 1.1v internal analog reference. Is a voltage divider necessary? Not ...
user avatar
4 votes
Accepted

Inaccurate and non-precise voltage reading from Arduino Analog pin

This should be a lot of fun but you might consider doing some research on analog circuits and A/D circuits. You have way too many digits to the right of the decimal, the accuracy is not there. The ...
user avatar
  • 1,416
4 votes

Arduino measuring high-voltage electric fence

You are talking about measuring 2kV to 10kV pulses, with about 1J to 5J of energy per pulse. The maximum current may be very low, but the voltages you want to measure are very high, and will very ...
user avatar
  • 1,575
4 votes
Accepted

How to calculate required amperage of multiple motors?

I don't know if the amperage is additive with each additional motor Yes, amperage is additive. the Arduino cannot handle over one amp but 0.24*5>1 That is correct. But the stepper motors should ...
user avatar
  • 13.7k
3 votes

Arduino controlled light dimmer software

-10uS because of the 10uS delay at the end of the loop, and /128 because he has decided there will be 128 possible dimming levels.
user avatar
  • 101k
3 votes
Accepted

How to understand the "power economy" of a voltage up-converter (boost converter)?

He is describing a boost converter which steps up voltage at the expense of current. To quote from the Wikipedia page on that subject: A boost converter (step-up converter) is a DC-to-DC power ...
user avatar
  • 35k
3 votes
Accepted

How does Arduino digital input pin measure its input voltage?

Assuming you are asking about digital input pins on an Arduino: Digital logic operates at the saturation and cut off regions of the transistor logic used. Most modern day processors use CMOS ...
user avatar
  • 6,441
3 votes
Accepted

Measuring voltage from -12 to +12 VDC

Measuring voltage Use the following interfacing circuit for measuring voltage: Resistors R1, R2, R3 (1% tolerance or better recommended) will map the voltage input range (-12 to +12V DC) to an ...
user avatar
  • 2,092
3 votes

How to know positive and negative in breadboard

As gre_gor said. A simple breadboard contains of rows and columns of connections but sometimes for convenience manufacturer marks or prints Positive and Negative symbol along the row as they are ...
user avatar
3 votes

PWM water pump flow control - in percent

Expanding on dannyf's answer, if the pump datasheet does not feature a graph, then you will have to experiment. If a flowmeter is not readily available, an excellent approximation can be calculated by ...
user avatar
3 votes

Convert from 3 V to 5 V

You may want to use a boost converter which is a device that can step up voltage. You can get them from eBay for around $US 2. As Chris Stratton pointed out in a comment, the boost converter may run ...
user avatar
  • 35k
3 votes

How can I make an AC analog voltage with Arduino?

You have a few options: Use a low-pass filter to round the square wave's edges some so they look more AC-ish. Use a low-pass filter and have your code create steps of voltage that look AC-ish by ...
user avatar
  • 2,340
3 votes
Accepted

Different voltage sources across Vin and DC jack

wouldnt that then send current through the Vin pin and back to the coin cell battery? Is that what would happen in this instance? Yep, that's right. shouldn't there be a design feature to prevent ...
user avatar
  • 101k
3 votes

How to build an µC controlled power regulator?

It's actually very simple, and it indeed does involve using PWM. PWM is just a signal being on for a percentage of a predefined period. That percentage is also, when the PWM signal is averaged out, ...
user avatar
  • 101k
3 votes

How do I supply either (1) dual voltage or (2) negative voltage?

You can make -5 V if you use an external power source, like in the circuit below (untested). Connect the GND (-) from the Arduino to the +5V from the External (5V) source, than 0V will be the GND (...
user avatar
3 votes
Accepted

How to connect L298N motor driver to 5v input supply?

Note: Since all vendors (checked Mouser, Octopart, and Sparkfun) link to the L298 datasheet when listing the L298N I will assume they are reasonably equivalent. I will assume that the "12V-35V input ...
user avatar
  • 449

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