No vref out in arduino nano
Quote from ea2ehc on August 12, 2024, 2:20 pmHello to the simulide team, first of all I would like to thank you enormously for making this wonderful program available to us that help so much. The issue is that the Vref output on the Arduino does not present any value change even when the program selects different internal references 1.1v or 5v in the ADC converter. In the real world, these voltages do appear on the vref pin. If you need more details i can put a code, and circuit to see that.
A big greeting
Pablo
Hello to the simulide team, first of all I would like to thank you enormously for making this wonderful program available to us that help so much. The issue is that the Vref output on the Arduino does not present any value change even when the program selects different internal references 1.1v or 5v in the ADC converter. In the real world, these voltages do appear on the vref pin. If you need more details i can put a code, and circuit to see that.
A big greeting
Pablo
Quote from ea2ehc on August 13, 2024, 8:16 pmHello Mr. Arcachofo, Thank you very much for your quick response. I have the circuit working in the real world, I am going to send you a summary (the real one is more complex) as you can see in the drawing. The operation is as follows:
At the ADC0 input, a voltage divider is established whose reference source is the Vref output, (this is where your fantastic software does not simulate Vref out), which is set by program in ADMUX register to 1.1 volts, this is for digitize the audio signal and set the midpoint at 550 mV, in this way we have a digitized signal that goes from 0 to 1023 with a midpoint at 512 (Approximately). On the other hand, through a digital.Read() on the ADC1 input we know if a button has been pressed, and through a program in the ADMUX register we change to the 5V reference to see which of them has been pressed, since they generate different voltages. When I can I will send you the code with the complete simulation. I did a test with an arduino nano and i can see in the Vref 5v or 1.1v with my voltimeter depends wich vref i choose in the software.
Thank you very much again for your interest.
All the best
Pablo
Hello Mr. Arcachofo, Thank you very much for your quick response. I have the circuit working in the real world, I am going to send you a summary (the real one is more complex) as you can see in the drawing. The operation is as follows:
At the ADC0 input, a voltage divider is established whose reference source is the Vref output, (this is where your fantastic software does not simulate Vref out), which is set by program in ADMUX register to 1.1 volts, this is for digitize the audio signal and set the midpoint at 550 mV, in this way we have a digitized signal that goes from 0 to 1023 with a midpoint at 512 (Approximately). On the other hand, through a digital.Read() on the ADC1 input we know if a button has been pressed, and through a program in the ADMUX register we change to the 5V reference to see which of them has been pressed, since they generate different voltages. When I can I will send you the code with the complete simulation. I did a test with an arduino nano and i can see in the Vref 5v or 1.1v with my voltimeter depends wich vref i choose in the software.
Thank you very much again for your interest.
All the best
Pablo
Quote from arcachofo on August 14, 2024, 6:53 amThanks for the explanations.
You are right, Vref should be in aRef Pin when ADMUX REFS0 = 1.
This will be solved in next tester build: https://simulide.com/p/testers/
Thanks for the explanations.
You are right, Vref should be in aRef Pin when ADMUX REFS0 = 1.
This will be solved in next tester build: https://simulide.com/p/testers/
Quote from ea2ehc on August 14, 2024, 6:50 pmHello again Mr arcachofo, actually according to the atmega328 datasheet diagram, any voltage used as a reference must be available in the vref pin, also if the Avcc pin is used (always less than 5v) that value also appears in vref. On Arduino boards and I think almost generally (unless we need a reference voltages such as 3.3v, 2.1v or any other), the Avcc terminal is usually connected to Vcc.
I would like to make a suggestion, if you allow me, regarding the translation into Spanish (Spain) in the "wave generator" tool, perhaps for "Media Amplitud" is better understood if it is translated as "Voltaje de Pico". And a better translation where it says "Medium Voltage" would be "Nivel de Continua".
I love what you have donePablo.
Hello again Mr arcachofo, actually according to the atmega328 datasheet diagram, any voltage used as a reference must be available in the vref pin, also if the Avcc pin is used (always less than 5v) that value also appears in vref. On Arduino boards and I think almost generally (unless we need a reference voltages such as 3.3v, 2.1v or any other), the Avcc terminal is usually connected to Vcc.
I would like to make a suggestion, if you allow me, regarding the translation into Spanish (Spain) in the "wave generator" tool, perhaps for "Media Amplitud" is better understood if it is translated as "Voltaje de Pico". And a better translation where it says "Medium Voltage" would be "Nivel de Continua".
I love what you have done
Pablo.
Quote from arcachofo on August 15, 2024, 11:08 amHello again Mr arcachofo, actually according to the atmega328 datasheet diagram, any voltage used as a reference must be available in the vref pin, also if the Avcc pin is used (always less than 5v) that value also appears in vref.
Yes, that is basically what I mean.
By Vref I mean Avcc or internal 1.1v.
And I refer to the pin by: aREF Pin.So basically this is how it is working now:
If bit REFS0 in ADMUX = 0, then the pin is "floating" (intended to connect an external voltage source to it)
If bit REFS0 in ADMUX = 1, then Avcc or internal 1.1v is connected to the pin via pullup resistor.
And bit REFS1 in ADMUX selects Avcc or 1.1v.And thank for your suggestions about the translation.
Hello again Mr arcachofo, actually according to the atmega328 datasheet diagram, any voltage used as a reference must be available in the vref pin, also if the Avcc pin is used (always less than 5v) that value also appears in vref.
Yes, that is basically what I mean.
By Vref I mean Avcc or internal 1.1v.
And I refer to the pin by: aREF Pin.
So basically this is how it is working now:
If bit REFS0 in ADMUX = 0, then the pin is "floating" (intended to connect an external voltage source to it)
If bit REFS0 in ADMUX = 1, then Avcc or internal 1.1v is connected to the pin via pullup resistor.
And bit REFS1 in ADMUX selects Avcc or 1.1v.
And thank for your suggestions about the translation.