Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How To Make A Ttl 5v Signal Out Of Audio Line Out.

Status
Not open for further replies.

junglemike

New Member
Hi guys. Greetings to everyone.
Hope somebody can help me with my project.
My goal - is to create a simple circuit to produce a 5v TTL level signal out of line out of sound card.
This will be the basic clock generator for a motor driver. I have a software on a pc, which can produce any audio signal of arbitrary form (square, sine, etc) and any desired frequency (within limits of course).
I'm almost sure it will be very simple circuit, probably based on a single transistor.
This is a simple drawing:
**broken link removed**
 
Hi guys. Greetings to everyone.
Hope somebody can help me with my project.
My goal - is to create a simple circuit to produce a 5v TTL level signal out of line out of sound card.
This will be the basic clock generator for a motor driver. I have a software on a pc, which can produce any audio signal of arbitrary form (square, sine, etc) and any desired frequency (within limits of course).
I'm almost sure it will be very simple circuit, probably based on a single transistor.
This is a simple drawing:
**broken link removed**

hi,
You require a 'comparator' look at the LM393 datasheet.:)
 
Isn't your motor DC?
But audio is AC and occurs in bursts.

You will need to rectify and filter the audio into fairly smooth DC or the motor will vibrate and start and stop many times until it breaks.
 
Thanks Ericgibbs, I've looked at Lm393 datasheet, and I don't see how this can help me?
I don't have input A and B - I just have a simple sine or square wave coming out of line-out of sound card (mono, i don't need stereo) - I want to convert it to 5v TTL.


audioguru, thanks for trying to help.
My motor is a step motor, and this signal is fed to a motor driver which is uses as clock.
For example. This motors (pulled out of old 5.25 floppies) have a 1.8 " degree step. This way 200 steps is one full revolution (360 degerees) So, if I want it to move with speed ,say 2 revolutions per second - i need to set the frequency 400hz. And so forth.
I have everything connected up, And I tested this in laboratory with special Waveform generator (I simply used TTL output, and set desired frequency). It works perfectly.
But I need to continue working on the project at home. For this I need this kind of circuit.
My knowledge in electronics is pretty weak. but i think it needs to be a simple transistor, which will be "opened" and "closed" depending on the input.
 
Thanks Ericgibbs, I've looked at Lm393 datasheet, and I don't see how this can help me?
I don't have input A and B - I just have a simple sine or square wave coming out of line-out of sound card (mono, i don't need stereo) - I want to convert it to 5v TTL.

hi,
As I said, the LM393 comparator will change the input from a sine/square low level signal into 5Volt levels.

Do you follow.?

EDIT: look at this drawing.
 
Last edited:
@ericgibbs
Ok, I think i understand now thanks to the drawing you provided.
I will try implement it and see how it goes.
Thanks.
 
Hi Eric,
The output of the LM339 (and LM393) goes low to the negative supply voltage.
Your circuit has one input at 0V so the copmarator needs to have a negative supply for its inputs to work.
It might be best to capacitor-couple the input signal to the comparator's input that is biased up to about +0.5V and connect the comparator's negative supply pin to 0V.
 
I recommend an RS-485 receiver.
 
Hi Eric,
The output of the LM339 (and LM393) goes low to the negative supply voltage.
Your circuit has one input at 0V so the copmarator needs to have a negative supply for its inputs to work.
It might be best to capacitor-couple the input signal to the comparator's input that is biased up to about +0.5V and connect the comparator's negative supply pin to 0V.

hi agu,
That would be a better circuit solution.
I am just trying to get the OP to recognise that he can use a comparator for his project.
As you may see in one of his posts, he dismisses the idea of a comp.

So I posted a 'clip' from the LM339 datasheet to get him thinking.:)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top