Let's Make Robots!

You may not need an oscilloscope!

Want to see what's going on? Even with "history" and zoom? Make a simple cable, download a free program and..

Aparently there are some problems with the images in this one. Since the images are not THAT important for you to get the point, I take the liberty to just direct you to the albom they are in, in case some are missing on your monitor:

http://picasaweb.google.dk/fritslyneborg/SoundrecordingAsDebugging#

Sorry & thanks for understanding ;)


 

Step 1:
Localize your computers audio in. If it has both Mic and Line in, use the Line.

Step 2:
Find a jack or whatever fits into the port, and in the other end find3-4 wires. If you have 4, 2 of them are ground, if you have 3, one is ground, and you need to split that in 2. The other 2 are Left & Right:

IMG_6174.JPG

 

STEP 3:
At the other end of the wires, make whatever you like; Point is that you will have to be able to hook this up to anything, if you do not want to solder every time you use this tool. I mae up some multi-thingeys that can be plugged / unplugged, and hooked up to anything:

IMG_6175.JPG

 

Step 4:
Download a soundrecording tool that can show the 2 channels next to each other.

 

That's it!

To use this, plug in the cable to your computer, turn down recording level / put it on Aux / Line, not Mic, no pre-amp.

You can now measure 2 Logic Level signals at once (or just one) and compare them.

 

EXAMPLE ONE

As you may know, it is possible to buy extremely cheap radio recievers and transmitters. Theory is, that you can send serial signals from one Microcontroller to the other, wireless.

i reality, it has often proved very hard to get a steady signal going. Now check this:

On Picaxe, here is first this code used on the sending part:

Billede_2_0.png

I hooked up the cable made as shown above like this: Ground to ground on both units. Data in on reciever, Data out on sender. And this is what I got:

Billede%201.png

Oops - something is wrong!

Signal is send, but nothing is recieved!

Now without the debugging-tool, it could have taken me a long time to find out what was going on. I hate serial for the fact that it is so hard to debug.. well untill now ;)

Ok, I hook up again, fixin all loose connections, recieving is shown on top, sending is shown at the bottom:

Billede%203.png 

Oh, the reciever is sending a lot of noise to the Microcontroller at first, so the Microcontroller cannot tell when the serial signal is starting!

Well then, let's modify the code:

Billede%207.png

- And see:

Billede%202.png

Well, from a distance, we can see that the sender is generating noise if left to hang high! Will fix that later, by using other combinations of T/N of the serout.

But first, let's zoom in, and see how the signal on the reciever is now first made steady, so the MCU can understand when to start listening:

Billede%208.png

- and even closer:

Billede%209.png

 Bingo!

 


OTHER EXAMPLES:

Now, what I'd like to see is your examples, please send them in below if you have any.

 

If nobody sends in anything, when time, I will try to have a look at:

A: LED shining on..
B: LDR

A: PWM out of an EZ ultrasound
B: Analoge out of an EZ ultrasound

.. and more to come :)

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

How high is the voltage that is maximum allowed in a soundcard input(mic.)?

 

Thanks

Hi,

I am new to this forum and also quite new to robotics and electronics.

My question is a bit off-topic , but I wondered wether it is possible to build RF-transmitters / receivers yourself  ?

 And just like rippa911 i would like to know which software you used.

Thanks

Questions not related to the topic should be written in a new topic with a self-explaining name, thanks.

I do not know what SW I used, yesterday I did almost the same as above, and dowloaded another SW, there are a million free SW samplers out there, pick one :)

So which software are you guys using for recording?
Not only can you use the mic input as an ADC, but you can also use teh speaker output as a DAC as illustrated here.

Wow, I've thought that something like this might work. It would do well in  a pinch definitely!

Now to find a set of headphones the hub won't cry about if I cut the end off. :P

Ok, techie impersonator, what have you done with the real arty Frits???

I understood all of that which has never happened before with post from artsy Frits :p

 

This is great work Frits, both with the transmitters and the audio oscilloscope. Probably the only real problem with the sound card as an oscilloscope is that the sample rate is usually limited to 40KHz which means a maximum input frequency of 20KHz. I only mention this as a caution to others. 

right you can use audio in for periodic (oscilloscope flavour) or non periodic (data logger flavour) signals ....

anyway the fun think is to record and HEAR electic signals in your circuits... 

when i was addicted to audio-in data-logging i have recorded many  sounds and saved in mp3....

try to hear a I2C bus.. it seems a machine-gun conflict :D 

the best for me is a mechanical switch that open and close CC motor.. it sounds loke a ZOOAP... a sort of UFO engine when it enter in a light-speed jump :D:D 

I know - before I got this idea, I was only debugging by adding speakers! But even at 600 BAUD it is hard to hear if a bit is missing ;)