Show Posts
Pages: [1] 2
1  Products / Arduino Due / Re: DAC and analog pins floating problem (at HIGH and LOW state) on: July 02, 2014, 03:30:50 pm
I'm sure to affirm that's DAC0-11 output is correct.
2  Products / Arduino Due / Re: Using the DAC outputs on an Arduino Due on: April 25, 2014, 06:38:33 pm
It's possible but you need to use an interface with Opertional Amplifiers (for example  the 741).
3  Products / Arduino Due / Re: Reading analogical input and output it as analogical on: November 08, 2013, 06:12:45 pm
I discovered why, it doesn´t work ; the board is burned...
4  Products / Arduino Due / Re: Analog-to-digital converter in Due on: November 07, 2013, 03:20:56 pm
I've already experimented it.  I supose the ADC is not fast enough to do it because  it´s a hardware problem. In order to solve it you problaby should select a faster microcontroler family. 
5  Products / Arduino Due / Re: Reading analogical input and output it as analogical on: November 07, 2013, 12:13:30 pm
First of all I use a delay because the writers of books use.
Second, If I inject 0.5V at A0 (r1) input, I expect to have at r2=0.5*2.5 = 1.25 so DAC0 would be 2.2*1.25/3.3+0.55 = 1.38V and it doesn´t happen!
 
6  Products / Arduino Due / Re: Reading analogical input and output it as analogical on: November 06, 2013, 07:49:18 pm
I tried to send the sketch but I failed so I wrote the sketch I made:

float r1,r2;
void setup( )
{
analogReadResolution(12);
analogWriteResolution(12).
}
void loop ( )
{
r1 = analogiRead(0);
r2= 2.5*r1;
analogWrite (DAC0,r2);
delay(300);
}
7  Products / Arduino Due / Reading analogical input and output it as analogical on: November 06, 2013, 07:33:44 pm
I am trying to read an analogical input at A0, multiplying it for 2.5 and output it at DAC0, but the program doesn´t work, can someone help me, please?
8  Products / Arduino Due / Re: PID library on: June 29, 2013, 05:39:21 pm
My friend, I saw the PID Library but in my opinion it has poor resources.  If you wanted to make a diferent transference function, you could not.   The steps are as I have already described.
9  Products / Arduino Due / Re: PID library on: June 26, 2013, 10:22:32 am
My friend I am projecting a digital controler with Arduino.   It will be a PI contoler.  I will emulate an analogical controler.   As a matter of fact I didn't know there would be a PID library for the Arduino.  What I am doing is to convert a Laplace Transform transference function to a Z transference function and after that to a difference equation.  So with that I can programme Arduino.  If there is a shorter step, please anwer me. Thank you.
10  Products / Arduino Due / Re: Problems reading an analog input and output with 12 bits resolution on: March 04, 2013, 09:52:13 pm
In fact I made a mistake when I wrote, the output of the DAC will be among 0.55V and 2.75V.
11  Products / Arduino Due / Re: Problems reading an analog input and output with 12 bits resolution on: March 01, 2013, 08:01:17 pm
       I wanted to know exactly the relation among the ADC (input) and the output (DAC) so I modify the sketch and multiply by 1.000.   This way with 0V at the input, it outputs to 0.55V (1/6) of 3.3V; 3.3V in the input, it outputs with 2.75V (5/6) of 3.3V.    So if the input is among 0 to 3.3V the output is among 0 to 2.75V linearly.   I think if someone wants a relation 1 to 1, between the input and the output, he needs to use operational amplifiers.  It follows my sketch.

Code:
/*
Read the value of the potentiometer (1.000V) at A0 and multiply
for 1.652 and output it at DAC1 both with 12 bits resolution
*/
float val = 0; // variable to store the value coming from A0
float val2 = 0;
int analogInPin = 0; // Analog input pin connected to the variable resistor
void setup()
{
analogReadResolution(12);
analogWriteResolution(12);
}
void loop() {
 
 val = analogRead(analogInPin); // read the voltage on the pot
val2=val*1.000;
analogWrite(DAC0,val2);
delay(5);
}
12  Products / Arduino Due / Re: Problems reading an analog input and output with 12 bits resolution on: February 24, 2013, 05:27:04 pm
    The problem is: I have is to emulate an analogical function control with amplifications, derivators, integrators, etc  So I need to perform mathemathicals operations, that is why I use float in my sketch.   I do believe that the DACs are linear between 0 to 3.3VDC i.e. the first grade 0 the next 0.00081VDC and so on.  That´s why I'm using the Due. I think my multimeter is not exact enough to mesure that.   Could someone elucidate that? 
13  Products / Arduino Due / Re: Problems reading an analog input and output with 12 bits resolution on: February 22, 2013, 09:19:38 pm
You don1t have to use map.   As you can see in the code.   Thank´s.
14  Products / Arduino Due / Re: Problems reading an analog input and output with 12 bits resolution on: February 19, 2013, 08:38:14 pm
I'll write again the code. It's just necessary to write this


Quote
/*
Read the value of the potentiometer (1.000V) at A0 and multiply
for 1.652 and output it at DAC1 both with 12 bits resolution
*/
float val = 0; // variable to store the value coming from A0
float val2 = 0;
int analogInPin = 0; // Analog input pin connected to the variable resistor
void setup()
{
analogReadResolution(12);
analogWriteResolution(12);
}
void loop() {
 
 val = analogRead(analogInPin); // read the voltage on the pot
val2=val*1.625;
analogWrite(DAC0,val2);
delay(5);
}
15  Products / Arduino Due / Re: Problems reading an analog input and output with 12 bits resolution on: February 19, 2013, 08:33:14 pm
It´s just necessary to write the followig code
[quote/*
Read the value of the potentiometer (1.000V) at A0 and multiply
for 1.652 and output it at DAC1 both with 12 bits resolution
*/
float val = 0; // variable to store the value coming from A0
float val2 = 0;
int analogInPin = 0; // Analog input pin connected to the variable resistor
void setup()
{
analogReadResolution(12);
analogWriteResolution(12);
}
void loop() {
 
 val = analogRead(analogInPin); // read the voltage on the pot
val2=val*1.625;
analogWrite(DAC0,val2);
delay(5);
}][/quote]
Pages: [1] 2