Questions tagged [digital-analog-conversion]

Digital-to-analog conversion is a process in which signals having a few (usually two) defined levels or states (digital) are converted into signals having a theoretically infinite number of states (analog).

Filter by
Sorted by
Tagged with
14 votes
6 answers
83k views

Is there a way to play sounds from an Arduino without using a sound shield?

I would like to play a wav file (spoken words) from my Arduino. I do not want to add a sound shield. Is there a way to play a sound through an output pin? The quality does not have to be great.
Hoytman's user avatar
  • 747
3 votes
0 answers
371 views

Connecting Arduino Due's DAC output to pc sound card with protection

I would like to connect the DAC outputs of my arduino board to my pc sound card input so that I can use my sounds card as an osciloscope. I have two questions: 1- if I don't use an amplifier, how ...
Aaron Azhari's user avatar
2 votes
2 answers
7k views

How do you send data via I2C without the wire library?

I have the following digital potentiometer: DS1803-100 which, according to the datasheet, can be controlled using a two-wire serial interface. I have managed to get it working using Wire, however I ...
Calin's user avatar
  • 243
2 votes
2 answers
79 views

Dealing with a Signal Source

The following circuit is a simplified version of a more complex system. For testing purposes, the 555 Timer was added to serve as a test signal source with frequencies set by the resistors in series. ...
David Wisniewski's user avatar
2 votes
1 answer
514 views

SPI Connections to DAC [closed]

I'm hoping to construct a feedback loop for a laser using an Chipkit UC32 and an analog-digitial converter ( the one of I have is an AD5780 evaluation board). I've been reading through Digilint's SPI ...
Andrew Hardy's user avatar
2 votes
4 answers
3k views

PWM on non PWM pins

Why does this code not function in a similar way to the example fade sketch? I have had to resort to using bit-banging as a way to implement PWM onto non PWM pins due to a lack of available free pins ...
KHS's user avatar
  • 41
2 votes
1 answer
189 views

Mildly accurate oscilloscope using Arduino Uno R3

I'm trying to make a mildly accurate oscilloscope using Arduino Uno R3 and I've done some research on the best method to do so. First of all I need to measure the voltage with a rather high sampling ...
infinite's user avatar
2 votes
1 answer
169 views

Controlling op amps amplification ratio by arduino

Is there any option how to control amplification ratio of operational amplifier by some logic signal which can be produced by arduino? I am talking about some clasic op amp like lm356 or ui741 in ...
FoksaK's user avatar
  • 65
2 votes
4 answers
599 views

Issue with incrementing PWM over time

First post here. So I have an issue, which I have identified, but I'm not quite sure how to fix it. I'd really appreciate some input and suggestions. I realize that my "pwmDelta" is the problem, but I ...
gfritz25's user avatar
2 votes
3 answers
7k views

Use photocell as digital input

I need to use multiple photocells as input, but its more than the amount of analog pins that my arduino has. I'm wondering if theres any way to use a photocell as a digital input, with the photocell ...
B L's user avatar
  • 21
2 votes
0 answers
82 views

I have a cash counter with RS232 in the back of it, I want to read the data that supposed displayed on the projector

I have cash counter with RS232 in the back of it. I want to read the data that supposed displayed on the projector with RS232 to TTL convertor and arduino. Here is all my setup Now I Connect the ...
Mohammed A. AL-Dainee's user avatar
2 votes
3 answers
378 views

Arduino 3.3V Conversion

I am fairly new to Arduino. As far I know all official Arduinos run on 5 volts. Or there is Arduino versions that run from 3.3V? I need use Arduino with devices which chipsets all use 3.3V logic level....
minto's user avatar
  • 221
2 votes
2 answers
3k views

Arduino Uno Digital to Analog Converter

I'm trying to read in an analog signal (a heartbeat) to pin A0 on the Arduino Uno and then convert it to digital. I'm hoping to use the digital signal to make an LED light up every time the voltage of ...
EmilyF's user avatar
  • 121
1 vote
2 answers
1k views

Is it possible to make a mathematical function generator using Arduino?

I want to build a function generator but not the ones which outputs square wave or sawtooth ect. I will input a discrete function lets say f(n) = e^n for n=0 to n=100 and the output array will be ...
user16307's user avatar
  • 237
1 vote
1 answer
739 views

How to convert digital signal to analog value

I have spwm output from arduino, and when i read on analogread it shows only 1023 and 0, because it is digital signal. Is there any way to convert these spwm value into analog value reading
rahul's user avatar
  • 11
1 vote
2 answers
192 views

PWM and Analog Signal Quality

I'm converting a 0-5v PWM signal to an analog signal using an LM358D. I've connected the output to an oscilloscope to look at the signal but I'm not really sure what I'm looking at. The PWM looks ok ...
tryingHard's user avatar
1 vote
1 answer
2k views

Output frequency from an SPI DAC (MCP4922) is lower than expected

I'm using a 2-channel, 12-bit DAC (MCP4922, datasheet) with an Arduino Uno, using the library written for it here. With the clock divider set to 2, I should have the SPI clock frequency at 8MHz. If ...
janizer's user avatar
  • 49
1 vote
2 answers
6k views

Arduino with 12 bit DAC (MCP4725) Not Working

I have an Arduino Mega AT2560 and need to have real DAC. I purchased the Sparkfun 12 bit DAC, however I don't think it is working properly. I am using the Arduino wire library to communicate with the ...
user avatar
1 vote
2 answers
207 views

Creating and Arduino synthesizer without the tone library

I am thinking about trying to make an Arduino synthesizer using the true analog output on the Due. However I would like to be able to play multiple notes at the same time on a single buzzer. Is this ...
Someone's user avatar
  • 113
1 vote
1 answer
1k views

Using an esp8266, how can I create a circuit to measure 2 different analog inputs (not simultaneously) with only one ADC pin available (A0)

I'm currently using a circuit with 2 separate transistors that can be switched on or off to measure 2 separate voltage inputs. The reason for this is because I'm using an esp8266 which has only one ...
TheFreddyKilo's user avatar
1 vote
1 answer
329 views

It seems as if there is a 220K pull-down resistor on analog pin 0

So I am building a project that uses the analog pins for precise measurements of resistance through a voltage divider and I have been having some seemingly unsolvable problems with nonlinear response ...
3871968's user avatar
  • 308
1 vote
1 answer
1k views

Using Analog Comparator on ATmega32u4

I am (currently) parsing a PPM analog signal using an Arduino Uno R3 using the analog comparator ASCR and analog hardware interrupts using AIN0 and AIN1. I am applying a specific negative comparison ...
Jason's user avatar
  • 88
1 vote
1 answer
429 views

Arduino Uno ADCH register stuck at 255 when read from ISR

I'm working on a project that will essentially become an oscilloscope in the long run. I am following this guide. My code is uploaded here for more reference. In my .ino file I have called functions ...
CookieMonster317's user avatar
1 vote
1 answer
746 views

Communicating with I2C DAC (LTC2631)

Firstly, let me say that I'm new to using I2C devices, especially with Arduino. I have an 8-bit DAC (LTC2631) that I'm trying to control with an Arduino Uno. I thought I would be able to use the ...
janizer's user avatar
  • 49
0 votes
2 answers
2k views

Are DAC pins useful for anything besides working with audio?

Whenever I run into information about DAC, it seems to be related to audio processing. Are there any other use cases where DAC might be useful, or have any advantages over regular ADC PWM output on an ...
Jerry's user avatar
  • 533
0 votes
1 answer
459 views

Arduino as analog to digital converter for temperature sensor

I have an ESP8266 module that must receive some data and send it to a server, my problem is that this data is given by a temperature sensore and a light sensor which must be connected to analog pins ...
ScazzoMatto's user avatar
0 votes
1 answer
81 views

Digital to Analog converter with DAC5311, Any suggestion?

I made my DAC code with DAC5311 and Arduino Uno. I think it has no problem, but it doesn't work well. Just print 0.(I use an oscilloscope.) I don't know where has the problem. Please give me any ...
임석빈's user avatar
0 votes
2 answers
544 views

RMS Voltage Value

it has been a week that I'm struggling with the arduino to measure the RMS Voltage value. By OSC I can see that the RMS voltage value changes around 3V. But I can't see it by serial port. I think my ...
Farzaneh's user avatar
0 votes
2 answers
5k views

Analog pins for 4x4 matrix keypad

I am working on a project on nano and want to use analog pins for 4x4 matrix keypad input. My connections are for keypad are as follows: Digital pins are D10-D13 and Analog pins are A0-A3. A0->14, ...
Tanmay Yerunkar's user avatar
0 votes
1 answer
50 views

Trouble reading analog (PWM)

I'm trying to test my analog signal before I send it to an actual analog device. I've written some code and considering the analog square I have expected to see a digital ON or OFF during a single ...
Jacksonkr's user avatar
  • 327
0 votes
1 answer
2k views

Producing a sine wave with the DAC?

Its being a few days i am trying to achieve something that I dont really know if possible. Using the Samd21 chip(Arduino Zero), I am using a timer and a DAC to produce a sine wave. The required ...
Curnelious's user avatar
0 votes
1 answer
623 views

Arduino to DAC to ADC back to Arduino?

My question is simple. Is the following possible? I am using one Arduino Mega 2560 board and its SPI functionality to adjust voltages (0-4.096V) through a 12-bit DAC (MCP4822). I would like to ...
user3720702's user avatar
0 votes
1 answer
666 views

How to properly read ADC on an ATtiny85? [closed]

What I want to do: attach six buttons to a single input. Each button triggers a different action. How I want to do it: Use an AD conversion and add a resistor with different values to each button so ...
boop's user avatar
  • 191
0 votes
1 answer
391 views

How to turn the digital pin to analog pin?

I am using a 10 IR sensor array and they use analog pins. I am using a motor shield for the Uno. So I cannot use the Mega. I have only five analog pins I need 8. How can I do it?
Sawban118's user avatar
0 votes
1 answer
2k views

How can I scan for a HIGH signal on digitalRead during the main loop, while running other things?

I'm working on a program which listens for certain bytes on serial through an if/then/elseif ladder. I want to also check if a pin (say, A15) has been given a HIGH state, by another Arduino with ...
SYGMAH's user avatar
  • 29
0 votes
1 answer
124 views

Attaching Microcontroller to DAC evaluation board

For an independent undergraduate research project I'm trying to construct a digital feedback loop. I have never used an Arduino, or done much electrical/computer engineering, so I'm just taking things ...
Andrew Hardy's user avatar
0 votes
2 answers
178 views

Stacking adc's when making an midi controller ( lots of potmeters)

I'm making a midi controller with the Arduino uno. It contains approximately 50 analog inputs with potentiometers. I have enough MCP3008 adc's here but I have no idea how I connect 2 or more adc's to ...
codGmer's user avatar
0 votes
2 answers
337 views

How to Read Voltage Level? [closed]

I want to read voltage level by my Arduino board please help in this regard. I am using this syntax. volts = analogRead(A3); // read the input pin Serial.println(volts)
user avatar
0 votes
1 answer
175 views

Trying to read analog signal with digital pin using outside ADC

Is there a way to route an analog signal from a simple temperature sensor through an ADC, MCP3008, into a digital pin. I have used all the analog pins on my Arduino Mega 2560 and am trying to utilize ...
Bennis's user avatar
  • 11
0 votes
1 answer
508 views

PWM-FILTERS -DAC

I want to implement a digital controller C(z) on an Arduino Uno (transfer function in the z domain) in order to control a plant G(s) = 3750/[(s+10)(s+30)(s+100)]. I have implemented G(s) with ...
Νίκος-Μάριος Κοκολάκης's user avatar
0 votes
1 answer
380 views

How to Read ADC value without Common GND ? (Possible or not !)

I want to Read external signal with the microcontroller. But the problem is that ADC does not work because the signal GND and the microcontroller are not Common, My question is, have you ...
navid's user avatar
  • 25
0 votes
1 answer
205 views

Connecting DAC output from Arduino Due to another arduino

I have an Arduino Due and I want to connect the output from the DAC as an input to an Arduino Uno's analog input pin. From this link http://forum.arduino.cc/index.php?topic=164763.0, user DuaneB ...
Paddy's user avatar
  • 105
-1 votes
1 answer
90 views

Vary the Speed of Motor

I am trying to control the speed of motor through VFD using 4-20mA signal. I generate the 4-20mA signal using Arduino.I use low pas filter to obtain the voltages from Arduino PWM pins as shown in the ...
user avatar
-1 votes
1 answer
84 views

Distorted audio from mcp3002

I have setup a MCP3002 to convert an analog signal to digital signal. When I read it directly through serial and convert it to a wav file, it sounds relative clear. Serial is limited for samples per ...
Revils's user avatar
  • 161
-1 votes
1 answer
159 views

Operating AD5780 EVAL Board Via MicroController

OK, so thanks in advance because I am new here. I am reading the AD57XX drivers here https://wiki.analog.com/resources/tools-software/uc-drivers/renesas/ad5780 and am struggling to understand how to ...
Andrew Hardy's user avatar
-1 votes
1 answer
2k views

analogWrite(DAC0, X), Analog voltage on DAC0 pin is higher for lower X value - is this normal?

I am using an Arduino DUE. Using the analogWrite(DAC0, X) command I am writing an analog value to this pin. X = 0 - 255 as I understand it. I am observing that when X is lower, the voltage on DAC0 ...
user avatar
-2 votes
1 answer
1k views

Arduino Due DAC pins with 0V

I know the DACs on the Arduino Due only allow for a range of output voltages from 1/6*Vdd to 5/6*Vdd (see here). This suits my needs, for the most part. My question is if it is possible to have 0V on ...
Alex's user avatar
  • 129
-3 votes
1 answer
187 views

Reading constant battery voltage and using the obtained value in sensor formula

there i am working on a project in which my system is connected to 3.7v~4.2V lithium battery, I have to read constant battery voltage irrespective of the current battery voltage and to do that I am ...
electro_nooobbbb's user avatar