Author Topic: Quick and simple oscilloscope camera  (Read 7257 times)

0 Members and 1 Guest are viewing this topic.

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Quick and simple oscilloscope camera
« on: September 28, 2013, 07:28:47 pm »
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. ;D

Once I have a photograph, I manually rotate it if necessary, then run this script to produce the final output (requires ImageMagick):

Code: [Select]
#!/bin/bash

# Produce the first color-adjusted copy
convert ${1} -brightness-contrast 0x40 ${1%.jpg}-color.jpg

# Get image size for cropping
width=$(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 more
mogrify -fuzz 30% -trim ${1%.jpg}-color.jpg

# Fit to standard size
mogrify -background black -resize 640x512\! ${1%.jpg}-color.jpg

# Greyscale output for print
convert ${1%.jpg}-color.jpg -colorspace Gray -negate ${1%.jpg}-grey.jpg
mogrify -level 25%,100% ${1%.jpg}-grey.jpg
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline elgonzo

  • Supporter
  • ****
  • Posts: 688
  • Country: 00
Re: Quick and simple oscilloscope camera
« Reply #1 on: September 28, 2013, 07:36:21 pm »
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... :)
 

Offline Fraser

  • Super Contributor
  • ***
  • Posts: 13169
  • Country: gb
Re: Quick and simple oscilloscope camera
« Reply #2 on: September 28, 2013, 07:38:40 pm »
Love your ingenuity  :)  Well done  :-+
If I have helped you please consider a donation : https://gofund.me/c86b0a2c
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Quick and simple oscilloscope camera
« Reply #3 on: September 28, 2013, 07:38:56 pm »
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.
« Last Edit: September 28, 2013, 07:43:24 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16284
  • Country: za
Re: Quick and simple oscilloscope camera
« Reply #4 on: September 28, 2013, 07:43:49 pm »
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.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Quick and simple oscilloscope camera
« Reply #5 on: September 28, 2013, 11:54:28 pm »
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.

It looks like you can tweak the exposure time so long as you're running Froyo (2.2.x) or later and your 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.
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Quick and simple oscilloscope camera
« Reply #6 on: September 29, 2013, 12:16:16 am »
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 (:wtf:) 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 to ::)

It 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.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Quick and simple oscilloscope camera
« Reply #7 on: September 29, 2013, 08:02:00 am »
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  :P, and turn the light back. Btw, that remote is cheap Chinese clone that cost me just $2.  >:D




The result example, cropped, resized and mildly processed to increase the contrast level.




These photos are originated from my previous post -> HERE
« Last Edit: September 29, 2013, 08:05:20 am by BravoV »
 

Offline VintageTekFan

  • Regular Contributor
  • *
  • Posts: 82
  • Country: us
Re: Quick and simple oscilloscope camera
« Reply #8 on: October 31, 2013, 08:44:13 pm »
I'm really loving these scope pictures.  Anyone try interfacing to a digital camera for a single sweep capture?
The three laws of thermodynamics:
1. You can't win.
2. You can't even break even.
3. You can't get out of the game.
 

Offline mazurov

  • Frequent Contributor
  • **
  • Posts: 524
  • Country: us
Re: Quick and simple oscilloscope camera
« Reply #9 on: October 31, 2013, 10:45:59 pm »
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.
With sufficient thrust, pigs fly just fine - RFC1925
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1899
  • Country: au
    • Halestrom
Re: Quick and simple oscilloscope camera
« Reply #10 on: November 01, 2013, 12:37:36 am »
These shots are beautiful!

@c4757p

You 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: [Select]
mogrify -crop ${crop_w}x${crop_h}+${crop_x}+${crop_y} -fuzz 30% -trim -background black -resize 640x512\! ${1%.jpg}-color.jpg

Offline vlady_2009

  • Newbie
  • Posts: 2
  • Country: au
Re: Quick and simple oscilloscope camera
« Reply #11 on: April 22, 2019, 04:18:57 am »
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/Df9Vid53Hg8

and copy of the software/instructions here:
http://www.fadstoobsessions.com/Downloads-Products/Webcam-Oscilloscope.php

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf