Quick and simple oscilloscope camera - Page 1
Forum section: electronics / projects

author: c4757p
author_rank: Super Contributor
timestamp: September 28, 2013, 07:28:47 pm
content: Just thought I'd share this. I'm going to need to produce lots of decent-looking oscilloscope captures soon, and I want to use my analog scope for that. I quickly threw together this oscilloscope camera adapter, compatible with the mounting slot on the top of the Tek 2445A display and with my phone (only camera I have). Yes, I really did make it from Popsicle sticks, hot glue and thick paper.Once I have a photograph, I manually rotate it if necessary, then run this script to produce the final output (requires ImageMagick):Code:#!/bin/bash# Produce the first color-adjusted copyconvert ${1} -brightness-contrast 0x40 ${1%.jpg}-color.jpg# Get image size for croppingwidth=$(convert ${1} -format "%w" info:)height=$(convert ${1} -format "%h" info:)# Crop to 70%crop_w=$((7 * $width / 10))crop_h=$((7 * $height / 10))crop_x=$(( ($width - $crop_w) / 2 ))crop_y=$(( ($height - $crop_h) / 2 ))mogrify -crop ${crop_w}x${crop_h}+${crop_x}+${crop_y} ${1%.jpg}-color.jpg# Autocrop moremogrify -fuzz 30% -trim ${1%.jpg}-color.jpg# Fit to standard sizemogrify -background black -resize 640x512\! ${1%.jpg}-color.jpg# Greyscale output for printconvert ${1%.jpg}-color.jpg -colorspace Gray -negate ${1%.jpg}-grey.jpgmogrify -level 25%,100% ${1%.jpg}-grey.jpg

author: elgonzo
author_rank: Unknown
timestamp: September 28, 2013, 07:36:21 pm
content: Interesting... how do you trigger the camera in the phone? Or do you just let the camera shoot an image series for an amount of time?And i hope you enjoyed the Popsicles...

author: Fraser
author_rank: Super Contributor
timestamp: September 28, 2013, 07:38:40 pm
content: Love your ingenuityWell done

author: c4757p
author_rank: Super Contributor
timestamp: September 28, 2013, 07:38:56 pm
content: I just push the button. This isn't for single shot captures - I have a DSO for that, it's just a massive pain in the ass to get a screenshot out of. It's just for producing documentation-quality images.Sadly, the Popsicle sticks never had any Popsicles attached.They're from a craft store.If only there were a way to get an extended-length photo capture from an Android phone - is this possible? Because if I seal it up a bit more so it's very, very dark, this scope does have a single-shot mode specifically designed for cameras.Maybe I'll see if I can find a cheapo digital camera somewhere.

author: SeanB
author_rank: Super Contributor
timestamp: September 28, 2013, 07:43:49 pm
content: That is a very nice idea. If I want to photograph a scope screen I will use this and a fixed focus old camera ( or a cheap 3Mp webcam) to do it.

author: TerminalJack505
author_rank: Super Contributor
timestamp: September 28, 2013, 11:54:28 pm
content: Quote from: c4757p on September 28, 2013, 07:38:56 pmIt looks like you cantweak the exposuretime so long as you're running Froyo (2.2.x) or laterandyour hardware supports exposure compensation. I don't know how far you can stretch it out though. And of course you'll need a app that supports changing that setting.There are also apps (for example) that take multiple pictures and blend them into one.

author: c4757p
author_rank: Super Contributor
timestamp: September 29, 2013, 12:16:16 am
content: I suppose I could always grab video, then select out what I want. Probably apply a filter per-frame first so that light leaking in doesn't get summed with the real signal, then just sum together the frames with content. That's a project for another day, though. I'm usually happy with the almost two-minute () floppy disk write time of my TDS-380 for the rare occasion I want to save a single shot.Maybe I'd have a better time with this automated image processing stuff if I'd quit dicking around with ImageMagick and just use MATLAB like I always used toIt can transfer image data over RS-232 as well, but the Wun Hung Low USB-232 adapters I have are actually so phenomenally shitty that they lose about one byte in 1KB, which is fine for command line stuff, but tends to F up binary transfers.... (And yep, it's the adapter, not the cable, I've verified.) And I'm too cheap to get a good one.

author: BravoV
author_rank: Super Contributor
timestamp: September 29, 2013, 08:02:00 am
content: Since my room can be turned into total darkness by a single power switch within my reach at my bench table while I'm working, I use this below method.I like the idea of automation using script + ImageMagick, thanks.The setup, once the camera's settings like position, zoom, exposure and etc are set perfectly, all I need is just to turn off the light with the remote at the other hand, and then push the camera IR remote to initiate the shot while in total darkness, and turn the light back. Btw, that remote is cheap Chinese clone that cost me just $2.The result example, cropped, resized and mildly processed to increase the contrast level.These photos are originated from my previous post ->HERE

author: VintageTekFan
author_rank: Regular Contributor
timestamp: October 31, 2013, 08:44:13 pm
content: I'm really loving these scope pictures. Anyone try interfacing to a digital camera for a single sweep capture?

author: mazurov
author_rank: Frequent Contributor
timestamp: October 31, 2013, 10:45:59 pm
content: Single sweeps are easy. You set your cam to say 1sec exp.time, press shutter release and then press the sweep button on the scope. I was about to make a synchronizer then dropped the idea since fingers work just as well.I made my scope camera for 7000-series from real C53 camera. Gutted it and mounted 4x close-up lens inside. The Arduino on the left side is a leftover from aforementioned abandoned synchronizer circuit.

author: Whales
author_rank: Super Contributor
timestamp: November 01, 2013, 12:37:36 am
content: These shots are beautiful!@c4757pYou will probably find that your images store better as PNGs due to the large areas of constant colour. The quality will also be nicer too, but that does not seem to be a problem with the shots you have shown us. *starts drewling again*Also, by memory ImageMagick allows you to chain various transformations into one line:Code:mogrify -crop ${crop_w}x${crop_h}+${crop_x}+${crop_y} -fuzz 30% -trim -background black -resize 640x512\! ${1%.jpg}-color.jpg

author: vlady_2009
author_rank: Newbie
timestamp: April 22, 2019, 04:18:57 am
content: I know long dead thread, but for what's it worth, took the idea of webcam + analog scope a step further:demonstration is here:https://youtu.be/Df9Vid53Hg8and copy of the software/instructions here:http://www.fadstoobsessions.com/Downloads-Products/Webcam-Oscilloscope.php