# Ideas about PC operated circuit

Discussion in 'The Projects Forum' started by imperatormk, Sep 22, 2012.

1. ### imperatormk Thread Starter Member

Mar 1, 2011
96
2
I want to build a circuit (may I say, larger circuit) that will have some interaction with the PC. What comes to my mind is some kind of 'meter, but I need some interesting project to keep me busy for some time.

Any suggestions appreciated!

2. ### ScottWang Moderator

Aug 23, 2012
4,785
762
>some kind of meter with PC.

What kind of meter?
What for, measure V,I,R Or testing IC, transistor?

3. ### wayneh Expert

Sep 9, 2010
11,934
2,862
Build yourself a software-based oscilloscope. It's pretty easy, and gives you a very handy tool.

You'll need to make an interface box that connects your sound card inputs to test leads, in a way that protects the sound card. (Be extremely cautious when connecting one power source to another. If they're not isolated, you can pass current over just a single ground wire.) I've posted a picture of my interface box here somewhere - I'll see if I can find it if you're interested.

4. ### imperatormk Thread Starter Member

Mar 1, 2011
96
2
That was just an idea, nothing specific. I just might go for the o'scope mentioned below. But if not, I`ll let you know so you might suggest me something of the above..

Why not? One thing though - I read somewhere that it is unable to measure digital signals.. However.., please post the pic if you can find it.

Last edited: Sep 22, 2012
5. ### wayneh Expert

Sep 9, 2010
11,934
2,862
If instead of "digital" you mean "fast", then yes, it cannot do that. I'm sure sound cards differ but my old Mac starts to show not-so-smooth curves when fed a sine wave over 5kHz or so. It also fails on the low end when the signal is nearly DC. At, say, 5Hz and below, a square wave will visibly tail off as the charge on the coupling capacitor (on the sound card's input) fades. Still very useful but you have to not get excited about the apparent odd shape.

I posted a picture of my Altoids tin oscilloscope-computer interface box here.

6. ### Dyslexicbloke Active Member

Sep 4, 2010
420
19
I think you will find it cant measure 'DC', not digital, signals because a sound card will be AC coupled, IE its inputs have a series capacitor.
(Sorry didnt read the whole post above - Not DC, you said that)

I would suggest that you get hold of an external or PCI sound card so that you can take the capacitors out and build a new input stage to the ADC circuits.
If you google sound card oscilliscope you will find quite a bit of info.

Bear in mind you will need to write software that directly reads the ADC's and the ability to do this may vary from card to card.

The easiest interface to manipulate on a modern PC is the parallel port, there are free controls / library's for most languages.

There is enough accessible IO on a parallel port in EPC mode to control a small robot arm.

You could also look at serial IO, RS232 is speciffied as +/-12 volts but many PC's implement the same protocol using 0-5 volts. 232 is also a point to point interface but again with a little ingenuity, working in 3 wire asynch mode you can make it work as a multy-drop network much like RS485.

Have a look at Modbus IO circuits, they will give you an idea of what can be done relatively easily.

Last edited: Sep 23, 2012
7. ### wayneh Expert

Sep 9, 2010
11,934
2,862
+1 A daunting amount, in fact.

There are a LOT of existing solutions and unless you specifically WANT a programming project, you could avoid it entirely if your goal is an oscilloscope. If you want to build a robot girlfriend, well, that's a bit more complicated.

imperatormk likes this.
8. ### Dyslexicbloke Active Member

Sep 4, 2010
420
19
I am pretty sure that a parallel port would only support the most superficial of girlfriend's

9. ### imperatormk Thread Starter Member

Mar 1, 2011
96
2
Well, thanks a lot! The emphasis here should be on the electronics, so concerning the software, I guess I`ll use some finished project.

Might consider the gf project, though.. lol

Last edited: Sep 24, 2012
10. ### imperatormk Thread Starter Member

Mar 1, 2011
96
2
Hi again.. while I'll keep the o'scope idea in mind, I think I found something interesting to make. I want to have a computer operated timer, (i.e., the countdown interval is set by the PC,) and when the countdown comes to 0, to have a output signal (0 to 1 change maybe). Something else shall be surely added later, but this is the basic idea.

Any suggestions?

11. ### wayneh Expert

Sep 9, 2010
11,934
2,862
You could accomplish this 99% in software on the PC, and then filter an alarm tone on the audio output into a steady DC voltage, perhaps powered by the USB port.

12. ### ScottWang Moderator

Aug 23, 2012
4,785
762
• ###### CountDownTimer_ScottWang.gif
File size:
43 KB
Views:
37
Last edited: Sep 27, 2012
13. ### imperatormk Thread Starter Member

Mar 1, 2011
96
2
Yes, but I forgot to mention that I want to output the time left to a 7-segment screen.

Aug 23, 2012
4,785
762
File size:
15.2 KB
Views:
39
15. ### imperatormk Thread Starter Member

Mar 1, 2011
96
2
I meant, a literal 7 segment display. Sorry for the bad explanation.

I managed to simulate a circuit using 74192 Up/Down counter, which works fine, but I need to find a way to control the four inputs on the chip through a PC, and I have no idea how that can be done.

16. ### wayneh Expert

Sep 9, 2010
11,934
2,862
Depending on your future plans, you might like to look into a LabJack data acquisition device. I have a U3-HV and love it. It gives you a USB interface to ...the world. It's got all sorts of inputs and outputs and is easy to control with almost any language. It can even be controlled over the internet (hosted by a computer, of course).

It would be easy to do what you want with such a thing.

I say "future plans" because it's about \$120, which is likely overkill for this particular project. But you'll get value out of it for years.

17. ### imperatormk Thread Starter Member

Mar 1, 2011
96
2
Well, that would drain the whole fun of the project (kinda changed my mind about using finished software). I actually thought using parallel port to communicate with the counters, which IMO is not very hard to perform, and would be quite interesting. I have some doubts about this, though, but I might open a new topic about it, unless, you are interested to help me.

18. ### ScottWang Moderator

Aug 23, 2012
4,785
762
imperatormk likes this.

Mar 1, 2011
96
2
20. ### ScottWang Moderator

Aug 23, 2012
4,785
762
I wrote a printer port control software with VB6 before, but I can't find it now, it seems used the same dll as your linked.