Shop OBEX P1 Docs P2 Docs Learn Events
Simple Oscilloscope — Parallax Forums

Simple Oscilloscope

TechnoRobboTechnoRobbo Posts: 323
edited 2010-02-16 16:15 in Robotics
Here's a cheap and easy way to check and measure wave forms coming from your·Basic Stamp projects.
See Post below for realtime software. You can time your code's instructions and loops by setting a pin high then low and measuring it in cool edit with the selection tool.
It's primarily designed to work with 5V but you can use resistors to divide higher voltages. The Optocouple protects your computer.

All sorts of possibilities.

Parts:
· A Computer with sound card
· 1/8" mono audio cable
· a 4N35 Optocoupler
··miscellaneous parts from Radio Shack
· a copy of Cool Edit 96 or similar (See post below realtime Oscilloscope software)



Assemble the diagram below - connect the output of the adapter to the mic input of the sound card.
Set the recording properties in windows for the mic and adjust the levels.·

See Post below for realtime Oscilloscope software(shareware)

Cool Edit Instructions:
Cool Edit has a level meter to help you with this.

Set the timeline in cooledit to Custom - 1000/frames per second

Attach wires from your project to the terminal - polarity's important.

Start recording at 48,000 Hz 16 Bit Mono and you'll have a resolution down to 0.0000208 of a second.

·

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Have Fun


TR

Post Edited (TechnoRobbo) : 1/21/2007 5:59:54 AM GMT
1024 x 768 - 87K
931 x 539 - 50K

Comments

  • TechnoRobboTechnoRobbo Posts: 323
    edited 2007-01-14 19:25
    Here's an amazing realtime oscilloscope software·that works with the circuit. It's shareware and it works at 44.1 khz

    http://www.zeitnitz.de/Christian/Scope/Scope_en.html

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR

    Post Edited (TechnoRobbo) : 1/14/2007 7:31:31 PM GMT
    839 x 596 - 105K
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2007-01-21 05:52
    uploaded and updated Schematic

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR
  • PLJackPLJack Posts: 398
    edited 2007-01-22 23:41
    Thanks for that.
    This question comes up often. Its nice to see all the necessary information on one page.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - PLJack - - -



    Perfection in design is not achieved when there is nothing left to add.
    It is achieved when there is nothing left to take away.
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-01-23 14:47
    I have downloaded a few of these freeware O-Scopes that use the PC's sound card... they are not very good... well that was my thought until your post!·

    http://www.zeitnitz.de/Christian/Scope/Scope_en.html·is AMAZING!!!! Very easy to use and very good!

    I have been worried about using my·laptop as I did not want to blow my sound card... Your schematic (especially the revised one) is the perfect solution to protect my computer!

    Very much appreciated post!!!!!!!!
  • WhelzornWhelzorn Posts: 256
    edited 2007-02-03 04:36
    wouldn't the opto-isolator limit the output to either 0 or 1 (logic)? I know it's a terrible idea to not use one, but I can't see how this would let you see a sine/triangle/sawtooth/whatever wave, it seems you could only see square waves, unless the program is sophisticated enough to analyze the bounce of the opto-isolator's output or something....

    Post Edited (Whelzorn) : 2/3/2007 4:49:16 AM GMT
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-02-03 15:07
    The electronics projects I work on are mostly stamp based so nothing is over 5v... I have been using a direct connection between my laptop mic input and what ever I am testing using http://www.zeitnitz.de/Christian/Scope/Scope_en.html and have had no probs...
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2007-02-04 00:11
    Whelzorn,

    Simply put - no. it captures sine waves just fine.·It's an analog circuit not a logic circuit

    Steve Joblin,
    I'm using the scope to read outputs from analog circuits. Yes, I too have connected direct without the circuit, but I don't while I'm prototyping. My worst fear is dead shorting my laptop while working on my prototype board(which I have done and hung it up and probably experienced data loss).





    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR

    Post Edited (TechnoRobbo) : 2/4/2007 12:29:07 AM GMT
  • computer guycomputer guy Posts: 1,113
    edited 2007-06-10 23:06
    TechnoRobbo

    Are you planing on adding a second input.
    After looking at SoundCardScope I noticed it has 2 inputs, left and right.
    It would be cool to utilize this and add an extra input to your Oscilloscope.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Check out my robot using the propeller robot.tmcp.com.au
    If you offer cheap PCB fabrication, perl programming or any other helpful services please email me at.
    anthonybmyatt@yahoo.com.au
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2007-06-24 03:27
    No because my laptop's mic input is monophonic.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-07-06 14:22
    The opto-isolators are a very significant improvement - very cool.

    Inherently being a klutz, I have avoided using the sound card for a scope because of the lack of isolation.
    While the range may be limited to 20Khz-30Khz, it is great place to get started at a low budget.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • IbsenIbsen Posts: 68
    edited 2007-07-06 18:28
    Could the circuit be powered from the USB port ???

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    *.*

    Ibsen

    " It's nice to be important, but
    ·· more important to be nice... "
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2007-07-06 23:09
    I wouldn't try it - my laptop would over heat from too much load on the usb

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-07-08 06:59
    It don't think this would cause your laptop to overheat [noparse][[/noparse]just of few milliamps], but the laptops certainly do get warm at times.

    Since I had all the parts at home, it took about 3 hours for me to build a 2 channel version of the opto-isolation that plugs into audio line in.

    Initially, I am going to try to use it to monitor my TV's IR remote control output. After that, I hope to use a BasicStamp or SX as a decoder and have the unused feature buttons on the remote used to control lighting or other devices via SSRs.

    I suppose you could have the USB power output provide the 5volts, but it seems to me that the additional cord with plug would just be another hassle and cost more than using a 9volt battery. Using the 9volt battery eliminates the possible entry of noise via the power supply and batteries are inherently quiet.

    And, the regulation is important for a stable reading. I used a tiny 100ma regulator, a 78L05.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • pwillardpwillard Posts: 321
    edited 2007-07-08 22:34
    Keep in mind, that the USB standard limits the amount of current that USB devices can draw from a single port. Draw to much... and it shuts the port. The MAXIMUM current that a USB port can typically supply is 500MA. Under certain conditions... this can drop down to 100MA, but the Standard specifies that Bus powered devices not exceed 500MA. This should have no noticible effect on the battery if the circuit actually draws less than 500MA.
  • HandtoolHandtool Posts: 17
    edited 2007-07-09 20:50
    Kramer,

    Any chance you can post a schematic of your 2 channel isolator?
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2007-07-11 00:56
    I have a Dynex (Best Buy) PCMCIA USB 2.0 card it requires an auxillary power supply to provide power to accessories. Best Buy doesnt sell the adapter so I made my own - but it's a pain having it connected so I don't use it. The card gets really hot with out it and my laptop shuts down.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-07-11 07:07
    Handtool,
    I haven't drawn anything - just visualized a parallel set of 4n35s.
    In other words, I used the single channel schematics with one 7805 as shown, but doubled up on the 4n35 chips.

    The input side is quite easy due to the isolation, just a duplicate.

    The output side requires a little more thought as you have to be sure to connect to the 7805 voltage divider at the right locations. Still you have only one output that is ground. Each pair of 4n35s have to have the right 'high side' and the right 'low side' orientation. And you have to add an extra set of 10K resistors.

    TechnoRobbo,
    I have never bought a laptop and until very recently I didn't have any real experience with them. But when i recently visited a friend, the heat during operation was quite noticeable and I really didn't like it. If I ever get a laptop, I certainly won't depend on the USB port for auxilary power beyond conventional USB interfacing. Hopefully, I won't have to depend on PCMCIA to get USB2.0

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • vickvick Posts: 2
    edited 2007-08-28 15:11
    Hi am new as you can see by my post.
    I would like to know what i must get if i measure 5v.
    I·get a funny looking sinewave with a lot of spikes all over.
    Could it be that i used·pc817 optocoupler in stead of the 4n35 opto!
    before i made the circuit a tested the software and i notice when i touch the input that i get a sqaure wave.
    With the circuit i get nothing when i touch the input.
    I am still a bit of a noob please help.

    greetings
    Vick
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2007-08-29 10:24
    If you can promise your computer you will only inject 5 volts into the D/A you could connect it direct without the opto. It wouldn't hurt to try differen resistor (1k,10k) values in series just to protect your computer. Make sure you attentuate with the recording input mixer on the extras tab of the scope program.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR

    Post Edited (TechnoRobbo) : 8/29/2007 10:31:15 AM GMT
  • vickvick Posts: 2
    edited 2007-08-29 17:13
    Thanks TecknoRobbo!

    What about a capasitor if i slip.It will block the AC wont it?
  • skylightskylight Posts: 1,915
    edited 2007-08-29 20:57
    Capacitors block DC and pass AC
  • VaatiVaati Posts: 712
    edited 2010-02-16 16:15
    I know this thread is ancient, but I think it deserves to be dusted off and observed. smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    (no longer new) SD Card Adapter·Now available!· Add extra memory to your next Propeller project with ease!
Sign In or Register to comment.