The big problem with being a maker newbie, is that you have to have equipment.

When I started, I bought soldering kit and a multimerter - things that don't cost allot and are very needful to start your first steps.

But I believe the most important test equipment one need is oscilloscope, but it also very expensive.

So there is a conflict...

Many times you need to debug a circuits because things can go wrong (we all know that...) and you need a scope to figure out what's the problem.

Consider you still in the noob phase, you don't want to spend hundreds of $$$'s just for buying a simple scope

 

If you could just have a simple cheap one that is good enough for very simple circuits you wouldn't think twice

 

Now, let's define what is a simple circuit.

For me it has two major parameters

1. Low bandwidth

2. Low voltage, let's say 0-5Volt and if you insist 0-15Volt

 

I have searched the internet and found many of them, some are better then others, some are complicated to build than others.

I put my eyes on Girinoscope www.instructables.com/id/Girino-Fast-Arduino-Oscilloscope/

This scope is using aruino uno (I built my with arduino nano) and reaching 150Ksps with 5V voltage swing.

The problems with the tutorial are:

  1. Its explaining allot of the software and a general knowledge on how a scope trigger works, but:
    1. The info not that well explained to a noob that just want to build it.
    2. There isn't even a simple connections diagram.
    3. You need to deep dive the Atmel documentation to really understand what the tutorial explains.
  2. The provided code needs to have patches to work in max BW (Currently 150kbps).
  3. The GUI provided by 3rd party only visualizing the sample but can't save it for future use.
    1. GUI link: https://github.com/Chatanga/Girinoscope

The Software

The instructables describes how to configure arduino's CSR and you get a pretty good feeling what is happening, but only if you have some knowledge in VLSI and logic design (Muxes, Flipflops, PADs, etc...)

I have tweaked the SW a little bit to support higher sampling rates (code improvements to save MIPS)

I also put the GUI in the same github for ease of access, Also with script to run it from arm CPU (RPI, db410c)

https://github.com/idanre1/Girinoscope2_0

  • main path contains the arduino code
  • capture_exe - perl program to acquire samples that can be saved to a disk (not just watching on the screen)
    • excel can be used to manipulate data and show graphs
  • scope
    • contains the GUI
  • db_src
    • source code for test suites in db410c.
    • RPI can be also used with minor changes.

 

The Hardware

All you need is an arduino + some resisters and capacitors.

For simple testing purposes I used 555 timer with output swing from 0-5v, calculated the expected frequency and tried to match expectations with result samples.

 

{gallery} My Gallery Title

Full circuit: Arduino ADC connected to LM358N as input probe. ne555 as the test circuit. ne555 is supplied with 7v rail to rail so the output will be about 5v.

DB410c as tester: I use the 1.8v digital GPIOs on the dragonboard to the arduino ADC. I sometimes using level shifer txs0108e to provide arduino with 5v from DB410c

Girinoscope schematic: From girinoscope intructables it is very hard to tell what to connect where. You need to deep dive the arduino code to understand what to do. This simple schematic can help allot

555 Timer: I use this circuit to see if the calculated frequency of the 555 timer will match what I sample using arduino.

GUI: Acquiring sample from the girinoscope GUI

 

The probe - Try 1 (not that good, please review try 2)

If I want to cross more than 5 volts I actually need to create a probe.

Special thanks to jc2048 and DAB for helping me navigating the world of opamps (there are thousand of them, and you gotta choose )

I have tried a simple simulation with the MCP6024

Basically I made a 1/4 voltage divider for being able to insert arduino more than 5V.

This is the simulation results:

WAY BETTER THAN LM358N! (See photo gallery for old opamp result)

Vin is square wave 20V@15KHz

You can see output is 4.98V (fair enough for basic scope)

Only thing that worries me is rise and fall time on the max acquired BW (15KHz)

 

Questions:

  1. Maybe I need a higher BW op-amp?
    1. Does adding some passive component to the feedback loop will help?
  2. Do I need to add to Vout of the opamp some reverse protection diode to save arduino from human fault?
  3. Why V_rise is slower than V_fall?

 

The probe - Try 2

  • Red circuit is is Differential amplifier
  • Orange Circuit is voltage offset
    • Since the opamp is 5V we need to offset for half meaning 2.5v
    • By adding 2.5V to to red circuit V+ we get -2.5v:2.5v input only by supplying 5v and GND to the opamp supply.
      • That I understood but could find proper analysis why??? (TODO - find a link to article)
  • Power supply
    • C2,C3 are for noise cancellation of the power supply (power supply decoupling)
  • U2,U3 are only 1:10 multiplier to work on low voltages.
  • C1 - power supply filtering
    • Remove some of the noise coming from the 5V and give a cleaner pseudo ground to work with.
  • R11
    • Isolates any capacitance on the output a little from the op-amp
  • R14
    • Input pit of GND that is connected to GND of the circut
    • Resistor is there to prevent high current from flowing when grounds are uneaven.

 

Probe schematic

Simulation result

I put square wave of 20v out of 25v.

You can see the output is from 0.5v-4.5v.

T_fall is about 4u_sec which is pretty reasonable. less than 1/7 of the square wave low voltage time...

 

Pad schematic from atmel datasheet:

 

 

I think the next step is to order this opamp

This would probably not happen during this competition period (shipping takes a while where I live)

 

Summary

Hope every noob will find this article:

  1. with full details how to built it
  2. Step by step explainable
  3. Have enough analysis details for understanding without inner assumptions not said.

 

I want to have a special thanks to jc2048 for helping me allot trying to build the probe.

 

Proof of work

The following video shows db410c (similar to RPI) generating square wave using one of its GPIOs in 1.8v

Then a level shifter which is design to between-chips communication is used to amplify the signal to 5v www.ti.com/lit/ds/symlink/txs0108e.pdf

The signal is captured by girinoscope and BitScope Micro Oscilloscope & Analyzer for a reference.

I demonstrates trigger modes and sampling of the square wave by both scopes using girinoscope GUI.

 

The following video shows the probe detailed in this thread with 1:10 attenuation

Currently the opamp is the only one I have got LM358n which is manufactured around 30 years old, I have extracted it from an old circuit I have.

The opamp output is very noizy, I hope a newer opamp will do a better job (I put this video for proof of work of the probe)

Again caputes of both scopes are provided for a reference.

 

 

 

Regards

Idan