Close
0%
0%

small-scope

An arduino based oscilloscope capable of ~150kS/s

Similar projects worth following
This is an arduino based oscilloscope that should be capable of ~150k samples per second capture. It consists of three parts, the arduino firmware, a shield and PC software written in c++ to display the signal.

small-scope is composed of three components:

The shield shapes the signal. The arduino itself captures the data and sends it to PC, which then displays the data in software.

To test the firmware and software, the shield can be replaced with a few wires and a pot (or even nothing at all).

  • 1 × Arduino UNO r3
  • 1 × PCB ~60x50mm
  • 1 × LM324N Amplifier and Linear ICs / Operational Amplifiers
  • 2 × LED, 3mm
  • 25 × pin header, male

View all 23 components

  • New board on test

    marvin11/06/2015 at 09:31 0 comments

    I've built the new board and tested some features. Have to visit local hackerspace to do more tests.

    Conclusions:

    • DC works
    • attenuator works
    • attenuator values are really impractical (not very standard) and I'll probably have to buy them online

    To do:

    • test AC (need AC source)
    • test DC offset (need 10k or similar pot)
    • test overvoltage protection (need 9V source for arduino)

    I've compiled the scope in windows 7 virtual machine as well and that went without any problems, so after I test the board I'll probably add windows executable to github.

  • New PCB design finished

    marvin07/13/2015 at 14:56 0 comments

    Today the new PCB design is finished. I'm quite satisfied. It's probably not my finest work and the PCB area is larger than necessary, but it's single sided with only two short leads on top layer of the board.

    I haven't made and tested the board yet, and that will probably have to wait at least until next week.

    For the moment, this is it, and if the board works as intended, I'll probably call this project finished and start something new.

  • Current status 2015-07-11

    marvin07/11/2015 at 14:05 0 comments

    So today the schematics got an update. This should be more or less final form for the moment, no more feature creep.

    Next thing on the schedule is designing PCB which will take a bit of time since I want to stick with single layer design friendly to home PCB manufacture.

    The features now include attenuator, AC coupling with offset, DC offset, some safety, two LEDs for status...

    As before, this is still in development and hasn't been tested, so I don't know whether it actually works, but to best of my knowledge, it should.

  • Not dead yet

    marvin07/07/2015 at 12:46 0 comments

    I had to move to a different apartment and was lacking internet access so all the projects took a hit.

    Progress should continue soon.

  • PCB design done

    marvin05/21/2015 at 17:53 0 comments

    The PCB design is done. It has attenuator and some protection so my goals are met. Added the option to run the scope from external power supply as well, and fixed the missing Vref cap on current version.

    Haven't had opportunity to make the board yet, so i have no idea whether it actually works (to best of my theoretical knowledge it should).

  • Current status 2015-05-20

    marvin05/20/2015 at 07:47 0 comments

    Most of the software is done(ish).

    The firmware works decently, I'll probably rearange it at some point (put different pieces in different places). Just ironed out a bug/feature today.

    The software is never done, but it's in good enough state, it works and it looks fine. It lacks some features I'd like to add.

    The hardware is the main issue at the moment.

    I have a "working" version based on girino, but that has some problems (well, mine has). First, I'd like an attenuator on input and some protection for arduino. I've modified some of the OP amp parts as well.

    Currently I'm unable to make PCBs so the work si purely theoretical, but that should be resolved soon.

View all 6 project logs

Enjoy this project?

Share

Discussions

Kwdaily wrote 01/08/2016 at 22:03 point

I looked everywhere for a 800k resistor in 1% that didnt require me to buy 5000 milspec units from digikey, so I am using a 330k and a 470k in series for a measured resistance of 799k, so within 1%. but the 130pf caps have been a problem, as I can't seem to locate one that isn't smd or $3.00 a piece from a radio-repair site. I hav etched the board and am building, will post pictures when finished. Awesome Design! I can't wait to finish it and test it out!

edit- I also changed the layout a bit, as I didn't have a pcb-mount BNC so I am using an RCA jack to test.

  Are you sure? yes | no

marvin wrote 01/12/2016 at 22:32 point

Yeah, the resistor and capacitor values, while well calculated are really unfortunate, even I haven't found the values in schematics.

Basically any values would work, but might change input resistance (which is 800k+100k+50k+50k for 1M) as well as attenuation amount.

It's not like you can't get those resistor values, but they are far from standard and easy to buy.

Same applies to capacitors.

  Are you sure? yes | no

Kwdaily wrote 01/13/2016 at 11:36 point

Yeah I managed to get within a few k and about 10pf but I'm sticking to 1x attenuation for now until I figure out what I'm doing, as I've never used an oscilloscope. But I'm having trouble Getting a signal to display after building the GUI using windows, So now I'm troubleshooting at the moment. Is there any sort of guide to selecting jumpers and adjusting both pots and whatnot?

Also, any advice on probe construction, any parts needed? I had to replace the BNC with an RCA connector in the PCB, because that's what I had haha.

  Are you sure? yes | no

ruslan.mazavin wrote 08/13/2015 at 23:23 point

Hello and thanks for a great project! Could you please export the schematic into pdf/image format?

  Are you sure? yes | no

marvin wrote 11/05/2015 at 14:36 point

I added the pdf schematics to github. It took me a while but I didn't want to put it on before testing. DC works, haven't had opportunity to test AC yet. Also not tested: bias and analog threshold.

  Are you sure? yes | no

Izzudin Hafiz wrote 08/11/2015 at 15:01 point

Hi marvin!

I'm in the process of building the hardware you designed on a protoboard. Will get back to you about it once i've finished it.

Software wise, im not sure how to compile it on a windows. You said it should be able to compile on other platforms. Could you help me out with it? Just some rough guide would help. Im not too good on software (PC side) interface.

  Are you sure? yes | no

Bruce Land wrote 07/07/2015 at 15:30 point

I have never been able to get a AVR ADC to work above 1 MHz ADC clock rate, which converts to a 13 microsec acqusition time, or around 70 kHz.

  Are you sure? yes | no

marvin wrote 07/07/2015 at 16:44 point

Well, as stated, it's not perfect, but it's good enough to see the signal shape. With prescaler set to 8 I get about 6.5ms in 1024 byte buffer. The source signal is generated with another arduino doing the blink with 1ms delay (no idea how precise that is). Now unless my math is wrong, that's ~150kHz (unless 1ms delay actually takes about 2ms). Another thing to consider is that although arduino has 10bit ADC, this uses only lower 8 bits.

Here is an image:

Keep in mind that this is a decent screenshot, because there is no vsync it's not that easy to get a good one, and the signal jumps around as (I guess) arduino struggles with ADC (with vsync there would still be signal jumping but i guess the screenshots would generally be fine).

Now, if I'm wrong please correct me. And thank You for taking interest in my project.

  Are you sure? yes | no

Bruce Land wrote 07/07/2015 at 17:25 point

You math sounds right. It might be better to use the ADLAR mode and read the upper 8 bits.

  Are you sure? yes | no

marvin wrote 07/07/2015 at 18:04 point

Oh, the ADLAR bit is set and upper 8 bits are red, You are correct :)

I shouldn't write such details without checking code after a month of not working on it.

I couldn't find anything else obvious to optimize (short of not writing it in arduino), but even then, I'm not sure that it isn't just limits of arduino ADC. Most sources agree that 1MHz is what you should use at most, and any more than that results with errors.

Now that I think of it, the best improvement might be (a bit counter-intuitive) actually reducing clock to 12MHz. That way ADC might be stable at 8 prescaler, and yet would still result with more than 70kHz you can get with 16MHz clock at 16 prescaler (which would beat a 20MHz ATmega at 16 prescaler).

  Are you sure? yes | no

Thijs De Paepe wrote 05/27/2015 at 21:50 point

Hi Marvin, love your project. Do you have a parts list? I would like to try your shield board layout on a breadboard but I'm not sure it will work. I might also add a blue-tooth module to make it more an independent tool. Anyway great work, I'm learning a lot and it's super fun.

  Are you sure? yes | no

marvin wrote 05/28/2015 at 05:21 point

Hello Thijs. Here is part list for current schematics: http://pastebin.com/FK3c4PuF. This is still in development, and I have to do some work on signal shaping part of the schematics (only DC will work in current version). Thank you for your interest, I hope you will enjoy the project.

  Are you sure? yes | no

Thijs De Paepe wrote 05/28/2015 at 17:46 point

Thank you for the quick response Marvin.

I'll keep following your improvements and will try to contribute if I can.

My skills on electronics are limited atm but I'll try to pick up the pace.

For now I'm going to order the parts and try to build it on a breadboard.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates