0
\$\begingroup\$

I don't have a proper oscilloscope. I don't have the budget to buy one, even a used one. I have to roll my own. :(

The plan is to use an Arduino Leonardo or Due as a combined A/D and USB interface and write an app on my Mac to display the waveform. Now the problem is how should I give it V/div options without losing resolution?

I am wondering whether this will work:

schematic

simulate this circuit – Schematic created using CircuitLab

By changing the AREF voltage I can change the full range voltage of the DAC. Will this produce the effect of giving me lower V/div without losing resulotion?

For higher V/div, would a simple single digital pot work?

\$\endgroup\$
  • \$\begingroup\$ Take a close look at the AREF specification for the chip you're using (page 365). There are limits on the allowable values. For higher V/div, you'd have to find a digital pot that could handle the voltage being measured. Most are limited to voltages within their own supply rails. \$\endgroup\$ – Dave Tweed Jan 15 '15 at 15:51
  • 1
    \$\begingroup\$ The best prices for a DSO nano costs within 10% of a genuine Arduino Due. \$\endgroup\$ – Pete Kirkham Jan 15 '15 at 15:58
  • \$\begingroup\$ @PeteKirkham I have a Arduino Due clone. Those are cheap if ordered from Shenzhen. DSO Nano is, however, not quite cheap even from Shenzhen. \$\endgroup\$ – Maxthon Chan Jan 15 '15 at 15:59
  • \$\begingroup\$ Yet, I doubt it's worthwhile when you can get a ready-made device with equal or better performance for less than US$50. \$\endgroup\$ – JimmyB Jan 15 '15 at 16:06
  • \$\begingroup\$ However, instead of adjusting V(AREF) you would probably be better off using an op-amp with a resistor network to select the prescaling of the input signal. This would also allow you to switch between prescaling factors above and below 1, and is probably a lot cheaper than a digital potentiometer. \$\endgroup\$ – JimmyB Jan 15 '15 at 16:09
2
\$\begingroup\$

I was thinking of this kind of op-amp input stage:

schematic

simulate this circuit – Schematic created using CircuitLab

SW1-3 here represent three GPIO pins of the µC which are then used to set the feedback voltage divisor.

To answer your question:

By changing the AREF voltage I can change the full range voltage of the DAC. Will this produce the effect of giving me lower V/div without losing resulotion?

Yes, this will actually work as desired. But you'll have to be careful because the ADC may be destroyed if it sees an input voltage that's higher than V(AREF), even if it's still far below Vcc.

For higher V/div, would a simple single digital pot work?

Not sure about that. Depending on the signal's source impedance the additional load of the voltage divider may degrade/distort the signal. Also, check the potentiometer's transfer characteristics for different frequencies; and have you thought about AC signals which may go below GND?

\$\endgroup\$
  • \$\begingroup\$ Actually I got a few d-pot chips as a parts swap with my friend. He got several extra d-pots and I swapped my MCUs (I stock ATtiny85 and ATmega328P for their being cheap from Shenzhen and Arduino compatibility.) with those. \$\endgroup\$ – Maxthon Chan Jan 15 '15 at 16:39
  • \$\begingroup\$ About that AC going below GND issue, can it be fixed using the differential ADC feature of the MCU, and raise both inputs to 1/2Vcc? \$\endgroup\$ – Maxthon Chan Jan 15 '15 at 17:02
  • \$\begingroup\$ I used a d-pot instead of the switched resistors but anyhow it worked. \$\endgroup\$ – Maxthon Chan Feb 6 '15 at 14:30
0
\$\begingroup\$

The resolution will be Vref/1024 if it is a 10 bit ADC. If Vref = 5V, resolution is about 4.88mV. If Vref = 2.5V resolution is 2.44mV. The bigger the scale the lower the resolution. On the other hand, you can buy an old oscilloscope for $25.

\$\endgroup\$
  • \$\begingroup\$ Well here in a fantastic country called China even an old scope would cost me more than US$100. With my $120/month budget cap I have to work around it. Here I meant digital resolution not analog. \$\endgroup\$ – Maxthon Chan Jan 15 '15 at 16:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.