All About Circuits Forum  

Go Back   All About Circuits Forum > Electronics Forums > General Electronics Chat

Notices

General Electronics Chat Discussion forum for general chat about anything electronics related, including asking questions about material in the All About Circuits E-book, Worksheets, and Videos.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 03-24-2008, 12:58 AM
SpeedEuphoria SpeedEuphoria is offline
Junior Member
 
Join Date: Mar 2008
Posts: 11
Default AC sine wave to DC square wave, newb, saw a similar thread

OK I'm new, I'm not really up on electronics, I learn fast and can build things. Anyway i read a similar thread on here about converting an AC sine wave to DC square wave http://forum.allaboutcircuits.com/showthread.php?t=5007

I'm looking to convert a signal from an automotive ABS sensor which should be AC sine wave, to a DC square wave similar to a tach input, specifically switching between 0V and 3.5-12V. I have found this which shows basically the differences(Fig 1.4 shows what I believe to be the output and Fig 1.5 shows what i need) http://www.picotech.com/auto/tutoria...actuators.html

Someone told me that I could use a diode to get the result, I'm not so sure after reading the 1st linked thread. Basically I built a highly modified FWD turbo car as seen here http://www.cardomain.com/ride/2641801

I have an EBoost2 electronic boost controller which can schedule boost by RPM. I have found that the factory speed sensor output(basically Fig 1.5 in the 2nd link) is similar to a 4cylinder tach signal and can be used for speed based boost. The only problem with this is that is is located on the front drive wheels, so using in using it, wheel spin will make the MPH go up and keep ramping boost up(which is a huge negative for me as it will make the wheels spin worse). So I would like to have a speed sensor on one rear wheel so this will virtually eliminate this issue and be better all around. While my car does not have ABS, it is an option so I was thinking to grab a rear ABS setup(sensor and hub) and use the signal to hook to the tach input on the boost controller. Then I found the signals were different so i was looking for an easy/cheap way to make it work/convert the signal.

If this is not a good idea i also was thinking of just retrofitting a proxy sensor and possibly a magnet to the hub if needed.

Any and all discussion is appreciated, just remember I'm not informed on these subjects so i would appreciate a dumbed down version. Sorry for the long rant and thanks in advance Matt

Last edited by SpeedEuphoria; 03-24-2008 at 07:18 AM.
Reply With Quote
  #2  
Old 03-24-2008, 03:52 AM
SgtWookie's Avatar
SgtWookie SgtWookie is offline
Expert Member
 
Join Date: Jul 2007
Location: In the vast midwest of the USA; CST
Posts: 22,031
Default

See the attached circuit.
You should also add a 0.1uF cap across the supply pins (not shown)

C1 blocks any DC level on the input signal. The network of R1, R2 and R3 establish a DC level for an inverting input of the LM339 comparator. It will be necessary to "tweak" R2 to set the DC level of the noninverting input to be within 34mV of the inverting input. If the output of the LM339 is high, set the noninverting input level to 33.5mV below the noninverting input, and vice versa. It's necessary to use a trimmer pot due to the tolerance of resistors - that is, unless you want to buy 0.1% tolerance metal-film resistors.

R4 and R5 establish the DC level for the noninverting input.

R6 establishes a feedback from the output to the reference noninverting input to effect hysterisis of about 67mV, which will probably be necessary in the electrically noisy environment under the hood. The hysterisis is displayed by the green (C) trace on the simulated O-scope display.

The inverting input is compared to the noninverting input. If their voltage levels cross, the output toggles from 0v to the available voltage, depending upon the load. As wired, the output goes high when the noninverting input is below the inverting input, and vice versa.

There are three more comparator circuits in an LM339 IC. The unused inputs should be tied to ground.

Note that the output of the comparator is open-collector, and cannot "source" current, only sink it; up to 20mA. R7 is a pullup resistor; at 14V it will cause the LM339 to sink 11.6mA current. This leaves you about 8.4mA max for sinking external current. You may need to use an amplifier stage, depending upon your load. You could also increase the value of R7 slightly (to 1.4K) if you need to sink 10mA. I suggest that you don't go above 1.7k. Making significant changes in R7 will change the hysterisis of the circuit.
Attached Images
File Type: png SineToSquareWave.PNG (65.0 KB, 225 views)
__________________
General info:
If you have a question, please start a thread/topic. I do not provide gratis assistance via PM nor E-mail, as that would violate the intent of this Board, which is sharing knowledge ... and deprives you of other knowledgeable input.
Reply With Quote
The Following User Says Thank You to SgtWookie For This Useful Post:
tejasdj12 (02-09-2013)
  #3  
Old 03-24-2008, 07:17 AM
SpeedEuphoria SpeedEuphoria is offline
Junior Member
 
Join Date: Mar 2008
Posts: 11
Default

Thanks for the reply, now does this alter the frequency at all? Basically thats what both the abs ECU(If I had one or was going to use one) and the Tach read is just the frequency. I have some play in the reading of the frequency, so I think it should be OK.

Does RadioShack have all of these mentioned parts? or can anyone point me to a good place online. I know theres one place that gives free samples and almost ordered from them before. Like I said I'm not up to speed on building small electrical things like this or diagrams, so how much would this cost? how big would this device be(need its own board)?

Sorry for all the noob questions

Last edited by SpeedEuphoria; 03-24-2008 at 07:29 AM.
Reply With Quote
  #4  
Old 03-24-2008, 11:55 AM
SgtWookie's Avatar
SgtWookie SgtWookie is offline
Expert Member
 
Join Date: Jul 2007
Location: In the vast midwest of the USA; CST
Posts: 22,031
Default

Quote:
Originally Posted by SpeedEuphoria View Post
does this alter the frequency at all?
No, unless you have an excessive amount of noise on the input signal. That's what the hysterisis is for.
You didn't mention what the amplitude of the incoming signal was. As you can see, the input to this example is +-100mV @ 1kHz.

Quote:
Does RadioShack have all of these mentioned parts?
Yes.

Quote:
or can anyone point me to a good place online.
There are lots of good places online. Mouser, Digikey, Jameco, Electronic Goldmine, the list is rather long.

You pay a premium for buying at your local RS store. But then you don't have to pay shipping, or wait for delivery.

Quote:
how much would this cost?
Depends upon where you buy the parts. You can go on Radio Shack's site and price the components there and elsewhere. Don't forget to get a quote on shipping costs.

Quote:
how big would this device be(need its own board)?
Small. Radio Shack carries PC "project boards" that are just under 2"x3" in a couple of styles that would work well for this project.
__________________
General info:
If you have a question, please start a thread/topic. I do not provide gratis assistance via PM nor E-mail, as that would violate the intent of this Board, which is sharing knowledge ... and deprives you of other knowledgeable input.
Reply With Quote
  #5  
Old 03-24-2008, 01:03 PM
Søren Søren is offline
Senior Member
 
Join Date: Sep 2006
Location: Denmark
Posts: 273
Default

Quote:
Originally Posted by SpeedEuphoria View Post
I have found this which shows basically the differences(Fig 1.4 shows what I believe to be the output and Fig 1.5 shows what i need) http://www.picotech.com/auto/tutoria...actuators.html
According to those graphs, the ABS signal is close to 16V_pp.
This is a cat that can be skinned in so many ways, but here is a simple circuit that will work, with a PCB just measuring 1-3/4" x 1".

Actually, it could be made with just one of the four gates, but since they're there allready...
__________________
Regards,
Soeren

>>> Whatever works... Works <<<
Reply With Quote
  #6  
Old 03-24-2008, 01:08 PM
Søren Søren is offline
Senior Member
 
Join Date: Sep 2006
Location: Denmark
Posts: 273
Default

Perhaps I should explain how it works:
R3 and C1 is supply transient protection.
R1, R2, D1 and D2 is input protection.
IC1 is the schmitt trigger itself, shifting cleanly.

This circuit inverts the pulses. I got the impression that it doesn't matter. If it does, gates B, C and D can all be paralleled.
__________________
Regards,
Soeren

>>> Whatever works... Works <<<
Reply With Quote
  #7  
Old 03-24-2008, 01:09 PM
SpeedEuphoria SpeedEuphoria is offline
Junior Member
 
Join Date: Mar 2008
Posts: 11
Default

EDIT: Thanks for all of the help guys, I'm just going to look into a proxy or halleffect and fabricate the mounting instead of using the ABS sensor. Can anyone point me in a direction where i could find a sensor that will output square wave switching from 0V to 3.5-12VDC that can read high frequency(similar to rpms or the abs sensor would). It needs to have input voltage of 5VDC or for automotive up to 14.4VDC and simple hook up into an automotive application.

I was looking at some online and looking for a simple cheap sensor that will work, I can do magnet or just reads steel(hopefully)

Last edited by SpeedEuphoria; 03-24-2008 at 04:10 PM.
Reply With Quote
  #8  
Old 03-24-2008, 07:14 PM
SgtWookie's Avatar
SgtWookie SgtWookie is offline
Expert Member
 
Join Date: Jul 2007
Location: In the vast midwest of the USA; CST
Posts: 22,031
Default

Have a look at Allegro's line of Hall-effect sensors:
http://www.allegromicro.com/en/Produ...ensors/ats.asp

I haven't delved into their documentation.
I have some older UGN3130's kicking around; they're bipolar Hall-effect sensor. Connecting them up couldn't be a whole lot easier; power, ground, and signal out. Signal out for this particular device is either ON (nearly Vcc) or OFF (nearly ground.) You usually put a small magnet on the back side of it, and the passing of gear teeth or reluctor on the front side causes a change in the magnetic field, triggering the device.
__________________
General info:
If you have a question, please start a thread/topic. I do not provide gratis assistance via PM nor E-mail, as that would violate the intent of this Board, which is sharing knowledge ... and deprives you of other knowledgeable input.
Reply With Quote
  #9  
Old 06-02-2008, 07:55 AM
SpeedEuphoria SpeedEuphoria is offline
Junior Member
 
Join Date: Mar 2008
Posts: 11
Default

I know its been awhile, but as far as the conversion would this work?

Its a GM HEI ignition module, AFAIk this is used for a similar type setup to make it squarevwave from a sine wave source

Last edited by SpeedEuphoria; 06-02-2008 at 07:20 PM.
Reply With Quote
  #10  
Old 04-29-2010, 10:25 AM
MangoMan MangoMan is offline
New Member
 
Join Date: Mar 2009
Posts: 6
Default Soren your link does not work

Hi Soren, any chance you are still watching this topic....?
The PDF you posted here:
http://that.homepage.dk/Img/ABS_to_Tacho_Pulse.pdf
Is no longer there. Can you re-post it?
Thanks!
Reply With Quote
Reply   Post New Thread

Tags
, , , , ,


Related Site Pages
Section Title
Worksheet Signal modulation
Worksheet Power conversion circuits
Textbook Synchronous Motors : Ac Motors
Textbook AC voltmeters and ammeters : Ac Metering Circuits
Textbook Square wave signals : Mixed-frequency Ac Signals
Video Lecture Generation of Alternating Voltage - Alternating Current
Textbook Electrical signal types : Digital Communication
Textbook Biasing techniques : Bipolar Junction Transistors
Textbook Measurements of AC magnitude : Basic Ac Theory
Textbook Automotive alternator : Ac Circuits


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion of low amplitude sine wave to square wave for PLC piashaw The Projects Forum 17 01-24-2014 04:07 AM
AC and DC definitions gootee General Electronics Chat 7 01-22-2013 06:57 PM
Convert 120 DC to 120 AC Question Artronix The Projects Forum 3 11-06-2012 08:44 AM
how to make a TTL Square wave from a sine wave source whywhy68 General Electronics Chat 3 08-24-2009 01:37 PM
convert sin wave (withe dc level) to square wave ? pro111 General Electronics Chat 6 03-04-2007 10:21 AM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:40 AM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin
Copyright ©2000 - 2014, vBulletin Solutions, Inc.