5
votes
Accepted
ADC register always returning high
First, let me give a couple of suggestions on the programming style.
There is no point in defining your own variables for accessing the
hardware registers: the avr-libc does that for you, you just ...
5
votes
Per-Arduino calibration files?
As Edgar Bonet already mentioned, the embedded EEPROM is good to try. I give some options below though:
In case the configuration file (data) is max. 1 KB, you can use the embedded/internal EEPROM of ...
4
votes
Accepted
Multiple Push buttons to one input
Michel Keijzers pointed out the issues you have in your code. But then
there is also an issue with your circuit: if you press any of the push
buttons, the analog input pin gets connected to one of the ...
4
votes
Arduino measuring high-voltage electric fence
You are talking about measuring 2 to 10 kV pulses, with about 1 to 5 J of energy per pulse.
The maximum current may be very low, but the voltages you want to measure are very high, and will very ...
4
votes
Generate a true analog signal using Arduino
I see that MCP4725 uses Wire library with the default clock of 100,000 kb/sec.
At a rough estimation each call to MCP.writeDAC or MCP.getValue will be at least 32 bits long and you use three of them ...
4
votes
Plug in analog sensor into digital pin
Yes. If you read the datasheet you will find a set of voltage specifications. The ones you are interested in are VIH and VIL.
Most MCUs use a "Schmitt Trigger" for the inputs. This means ...
4
votes
Accepted
Plug in analog sensor into digital pin
According to SAMD21 the digital input pin detects HIGH if the voltage on pin is higher than 0.55 of supply voltage. So at 3.3 V it is 1.8 V.
The input pin detects LOW if the voltage is lower than 0.3 ...
3
votes
Accepted
How to transmit DTMF signal to Arduino
Your problem is that you think there's a "positive" signal. In audio there isn't a "positive" signal, there is just a signal that swings around 0V.
You have to convert said signal ...
3
votes
Accepted
How to connect an lcd i2c using only pins A0 and A1 (SDA, SCL, GND, and VCC are given)
You may be finding Connect to LCD via I2C, default address 0x27 (A0-A2 not jumpered) confusing. These refer to the I2C address selection lines of the IO expander (the PCF8574T) used on the I2C LCD ...
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 – ...
3
votes
Multiple Push buttons to one input
You made a few mistakes with the three lines, first one being:
if (temp = 340)
First, the single '=' is an assignment operator instead of a comparing operator. You want to use '=='.
However, you ...
2
votes
Accepted
DHT11 analog or digital?
The DHT11 is a digital component with its own digital communication protocol.
Analog pins can be used for either analog input or digital input and output.
You can use a digital device like the DHT11 ...
2
votes
ADC register always returning high
What are the resistance values for R1 and LDR1? Their ratio will determine the voltage at A0. If the ratio of their resistances is too high (for example, 100:1) then any light measured by LDR1 would ...
2
votes
Continuous voltage on IO Pins while 5V is not Connected?
For this I would recommend isolating the power from the batteries with P-channel MOSFETs and only switching them on when you want to sample the voltage. This means that there is no power consumption ...
2
votes
Is AREF a stable output Ref voltage with analogReference(INTERNAL)
No, it is not acceptable.
The datasheet states:
AVCC is connected to the ADC through a passive switch. The internal 1.1V reference is generated from the internal bandgap reference (VBG) through an ...
2
votes
Accepted
Stable amplitude of amplified signal
Just a word of advice about AGC in general. There is almost always an issue of attack (how fast the AGC reacts to a sudden increase in signal) and release (how fast it reacts to a decrease). In most ...
2
votes
analogRead() doesn't read more than 500Hz
You have 4 calls to analogRead() in your loop. At about 112 µs per
call, that's already taking 448 µs. Add to that the time taken by the
floating point calculations, and you are likely to end up with ...
2
votes
Accepted
Controlling op amps amplification ratio by arduino
The basic principle is easy to implement. A non-inverting configuration has a resistor Ri from the inverting input to ground, and a feedback resistor Rf from the same input to the output. The signal ...
2
votes
Generate a true analog signal using Arduino
If you want something simpler than the transistor version you can use the following as well, for the other options skip to the --here-- mark
Oldstyle analog out. this works like a vacuum tube and ...
2
votes
Using Analog Pins for Power
The analog pins are only analog inputs but digital outputs (and inputs too). You use digitalWrite() to control a pin's HIGH or LOW state.
ànalogWrite() is for use with the PWM pins (I hate the name ...
2
votes
Accepted
Why use multiple filters output thousands value, use one or two filter can output normal value?
This is a bug in the filter library you are using. It has already been
reported (by you, maybe?).
As Majenko and chrisl suggested in comments, the crux of the problem is
that you need one filter per ...
2
votes
AD8232 - Measuring heart rate only if USB connector is touched. Grounding issue?
One of your three ECG leads is equivalent to (human)body ground, and it's not making contact. I spent too long making this image to explain it, which should help you a lot more than it will me. I ...
2
votes
Accepted
How does actually arduino measure voltage?
The ATmega328P features a 10-bit successive approximation ADC. The ADC is connected to an 8-channel Analog Multiplexer.
First, an input is selected from the multiplexer on the left. This allows any ...
2
votes
Confusing Pinouts on MH-ET ATTiny88
I need to use the pins A7, A0, A1, A2, A3, and A4 - in that order
If you want to read the ADC from the channels in the order you want, all you need to do is to create an array that has the pins in ...
2
votes
Confusing Pinouts on MH-ET ATTiny88
Expectations
First of all, am I correct in thinking the functions analogRead() and analogWrite() can use either the string A0 - A7 or a decimal number as inputs?
This requires dissection to explain ...
2
votes
Arduino DUE - I Have enabled A14, will this break anything?
PB21 is just a GPIO pin, GPIO means General Purpose IO so it can be configured as ADC channel 14 (as shown in section 43.5.5 of datasheet), or as Wake-up pin, or as a digital pin.
However, Arduino ...
2
votes
What does VRx stand for in the KY-023?
VR could easily mean Voltage Ratio, but it probably means Variable Resistor
It is a misnomer though, because the resistor is connected as a potentiometer, not a variable resistor.
So, in the end VR ...
1
vote
how to config the Arduino ADC'S input on A0 instead of use default?
The input to the ADC is selected by the four least-significant bits of
the “ADC Multiplexer Selection Register”, aka ADMUX. It is set to
analog input 3 by this line of code:
ADMUX = 0x03;
Change ...
1
vote
send and recieve analog data from one arduino to another arduino via web/ethernet
ADC input has 100Mohm impedance. By placing C4 the signal at the ADC input has no DC path, is just floating between -0.7v and 5.7v , limited only by the input clamping diodes.
ADC can convert only ...
1
vote
Generate a true analog signal using Arduino
for your case(audio) there also is https://github.com/connornishijima/arduino-volume1
or the volume library
to install it you can use the git to get the files, or if you use the arduino ide, you can ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
analog × 46arduino-uno × 17
analogread × 10
sensors × 6
esp32 × 5
adc × 4
voltage × 4
input × 4
arduino-ide × 3
audio × 3
potentiometer × 3
digital × 3
op-amp × 3
programming × 2
arduino-nano × 2
led × 2
lcd × 2
pins × 2
arduino-pro-micro × 2
code-optimization × 2
joystick × 2
esp8266 × 1
c++ × 1
power × 1
motor × 1