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.

Quadrature signals help

Status
Not open for further replies.

birdleg

New Member
Good day People
I was wondering if any of you guys could help me out with a problem i am having trying to generate a quadrature signal for a simulator project I have undertaken. We are basically trying to duplicate the various functions of an underground haultruck and loader for use as a training tool.
These units use microprocessor controls for transmission control and engine protection.
We have so far had some success using basic 555 timer circuits as frequency generators to give CPU information on engine speed torque convertor speed etc.
the signal we are now finding it hard to duplicate is a quadrature signal pick up from the ground speed sensors on the drive shaft.
What we are hoping to achieve is to generate two signals at 90 deg phase difference through a frequency range of 0-1000Hz. Both signals need to be adjusted via a single potentiometer while still maintaing the phase shift.

I have just spent the whole day on the Web looking for something to suit and my head is currently close to critical meltdown stage.
If you are reading this then you can probably guess that I am a bit of a novice. We were hoping to maybe to use two 555 timer circuits and somehow hold one of the signals back maybe, somehow, who knows, Help
any advice would be much appreciated.
Happy Christmas :cry:
 
Is this what you want?

CLK can be from a 555 or ? Should work from >0 to 100k no problem. (remember output frequency will be 1/2 of clk in)
 

Attachments

  • phase_90.gif
    phase_90.gif
    14.3 KB · Views: 1,753
birdleg said:
Good day People
I was wondering if any of you guys could help me out with a problem i am having trying to generate a quadrature signal for a simulator project I have undertaken. We are basically trying to duplicate the various functions of an underground haultruck and loader for use as a training tool.
These units use microprocessor controls for transmission control and engine protection.
We have so far had some success using basic 555 timer circuits as frequency generators to give CPU information on engine speed torque convertor speed etc.
the signal we are now finding it hard to duplicate is a quadrature signal pick up from the ground speed sensors on the drive shaft.
What we are hoping to achieve is to generate two signals at 90 deg phase difference through a frequency range of 0-1000Hz. Both signals need to be adjusted via a single potentiometer while still maintaing the phase shift.

I have just spent the whole day on the Web looking for something to suit and my head is currently close to critical meltdown stage.
If you are reading this then you can probably guess that I am a bit of a novice. We were hoping to maybe to use two 555 timer circuits and somehow hold one of the signals back maybe, somehow, who knows, Help
any advice would be much appreciated.
Happy Christmas :cry:


Jeesh... now I'm depressed...

Ok, well you say 0-1000Hz well, phase doesnt make sense down at 0Hz.


Are these digital signals? You need 90 phase shift on digital pulse train from original signal? And both the freq can be 0-1000Hz? Do I understand this correctly?

If so:

1) create a circuit with 2 555's that with one pot you generate frequency F on one and 2F on the other. Maybe pot can generate 2F and make a divide by 2. lots of examples on the web....

2) Take 2F signal and XOR it with F. The output will be at frequency F but phase shifted by 90 degrees from the one input that is at frequency F.

3) this thing will maintain that phase shift while you adjust base frequency.

Do you follow? I'm too tired to draw a ckt.. but lemme know if this sounds like what you need........
 
Optikon's method may seem to be an easy (text book) way to do it, but due to the "race problem" you may have unwanted glitches on the output like is shown in the simulation. Happens when the 2 inputs are changing state at the same time.

Race conditions should be avoided in circuit design primarily for the unpredictability that will be created. One way to avoid such a condition is to insert a time-delay into the circuit


https://www.electro-tech-online.com/custompdfs/2004/12/EXPT170.pdf

You need to fix that with a few extra buffers or delays. Where as clocked sequential logic is clean.
 

Attachments

  • optikon_90_219.gif
    optikon_90_219.gif
    26.9 KB · Views: 1,640
A 2 stage Johnson counter is a little simpler. Outputs "a" and "b" will be in quadrature.
 

Attachments

  • johnson_cntr2.gif
    johnson_cntr2.gif
    4.9 KB · Views: 1,729
That is pretty neat Ron!
 
TheOne said:
That is pretty neat Ron!
I take no credit for it, but it reminds me of a funny story (funny to me, anyway). I'm an old fart (63), and I've seen and used a lot of circuits. A colleague recently showed me the neat counter he had "invented". I said, "Joe, that's a 5 stage Johnson counter". This guy is a brilliant logic designer, but much younger than me, and he had never seen one. The funny part is - his last name is Johnson.
 
That is funny! :D I must admit my "logic" is rusty these days (used to know most of the logic functions by chip number and configurations of counter chains etc. in my younger days) but with the availability of cheap micro's today, who bothers to work out karnaugh maps and truth tables, except if you are still a student and have to do it for homework. Even then there are programs that will do it for you as well.
 
I should have mentioned that the ubiquitous CD4017 is a 5 stage Johnson counter, with internal decoding to bring out the (2*5=) 10 output states.
 
Ron H wrote
I'm an old fart (63),
I don't feel so bad now, I thought I was the only old fart using this forum. I am a year older than you Ron.
Back in the days of RTL logic(circa 70's) I built my first digital clock with johnson counters as they are easy to decode, only takes a 2 input gate for each digit. As I recall it took a couple of amps at 3.6 volts to run the thing.
Anybody want some RTL IC's? I may have a few left hanging around.
 
k7elp60 said:
Anybody want some RTL IC's? I may have a few left hanging around.

Now you are telling me! I eventually had to scrap my old trustful Racal Dana 2MHz counter timer a year ago, cause one of the counter RTL chips went bad :( . Saved the nixie tubes though. Maybe I will make a clock with them.

Hey, here is a idea :idea: maybe we can have an "old fart" section since it seems there are quite a few of us. Maybe an age-poll would be interesting as well.
 
k7elp60 said:
Ron H wrote
I'm an old fart (63),
I don't feel so bad now, I thought I was the only old fart using this forum. I am a year older than you Ron.
Back in the days of RTL logic(circa 70's) I built my first digital clock with johnson counters as they are easy to decode, only takes a 2 input gate for each digit. As I recall it took a couple of amps at 3.6 volts to run the thing.
Anybody want some RTL IC's? I may have a few left hanging around.
K7elp60, I feel like a child again! :D
On my first job after I got out of college in 1966, I designed a phone number decoder for a portable phone(!) using RTL. The phone never was produced, but it was planned to fit into a big briefcase.
As I recall, it was the only integrated logic family available at the time. I believe the most complex function was a half "D" flipflop (it took two to make a full master-slave "D"). DTL came out shortly later, then came SUHL, which was a TTL family. My memory is probably faulty, so feel free to correct me with your faulty memory. :)
 
Wow, what can I say thanks, guys
Reading the initial post I can see where there is a little bit of information missing, so just to clarify things.
what we are trying to achieve is to duplicate the signals from two 24V proximity switches mounted on a drive line striking off a circular plate with 16 holes. They are mounted in such a way as to input a quadrature signal into a pair of inputs to a CPU.
We have managed to get the CPU to recognise a frequency input from basic 555 timer circuit run off a 12V supply. The CPU I believe will recognise any signal over 6V.
Now "the One" the square wave signal at the bottom of your diagram looks to be exactly what we are trying to achieve, some questions are however; where are our pick up points for the two signals ??
Where is the voltage supply and zero reference points ??

[/quote]Ok, well you say 0-1000Hz well, phase doesnt make sense down at 0Hz
Yes Optikon I would like to say I threw that in in order to make sure you guys were paying attention but the truth of the matter is that is the level we are currently at I am afraid. The journey has only just begun so to speak.

Now Ron that looks like somwthing even we could build but my questions would be the same as those to the One (great name by the way).
So all in all thanks for the help and I will be cranking up the soldering iron ASAP.
But what you need to realise is that replies to this post need to be written in the same language you would use to talk to a particularly dim cousin (XOR it my, god is that a gun) boom boom.
Thanks again guys and all the best for Xmas and the new year.
 
Here is a useable schematic, with waves. Post any questions you have.
 

Attachments

  • quadrature_waves.gif
    quadrature_waves.gif
    8.6 KB · Views: 1,493
  • quadrature_sch.gif
    quadrature_sch.gif
    8.8 KB · Views: 1,526
Hi Ron, I wonder what those small bumps are on the V(13) trace?

It's definitely not glitches. I can't reproduce them on my program. Just curious? Maybe it is some artifact of the model.
 
TheOne said:
Hi Ron, I wonder what those small bumps are on the V(13) trace?

It's definitely not glitches. I can't reproduce them on my program. Just curious? Maybe it is some artifact of the model.
The flipflops are behavioral.
I reran the sim, this time specifying a maximum time between samples. The artifacts were present for any specified time greater than 1usec. The bumps were caused by the simulator.
 
Ron H said:
Here is a useable schematic, with waves. Post any questions you have.
Thanks for that Ron, this looks to be exactly what we are after.
How will the amplitude of the wave be affected by using 12V supply ??
 
birdleg said:
Ron H said:
Here is a useable schematic, with waves. Post any questions you have.
Thanks for that Ron, this looks to be exactly what we are after.
How will the amplitude of the wave be affected by using 12V supply ??
A 12 volt supply will make the amplitude 12 volts. Be sure you put current limiting resistors between the outputs and your PIC inputs. Why can't you use 5 volts?
 
Ron H said:
birdleg said:
Ron H said:
Here is a useable schematic, with waves. Post any questions you have.
Thanks for that Ron, this looks to be exactly what we are after.
How will the amplitude of the wave be affected by using 12V supply ??
A 12 volt supply will make the amplitude 12 volts. Be sure you put current limiting resistors between the outputs and your PIC inputs. Why can't you use 5 volts?
Factory engineers have informed us that the CPU will recognise any signal over 6V, however we have a 5V supply available on our PS so we can try it with this first.
Thanks Ron
 
Hello Ron
We have just spent some time building the circuit you posted up and have so far got no satisfactory results.
the 555 timer part of the circuit is virtually identical to three PCBs we have already made up which give us our frequencies in the right range. The only difference between yours and the ones we have is that pin # 7 is not connected at all on the 555.
When we built the two stage Johnson circuit however there appeared to be some confusing results I was hoping you could maybe clarify.
Pins 6 & 7 on the 555 had a voltage present of around 6V varying up to 6.2V through the 1M pot. We have point to point tested all the circuit and it appears to be fine. We initially thought that the 555 was inserted incorrectly so we tried putting it in the opposite way this then gave us a voltage at pins 6 & 7 of between 0.75V to 1.2V but the Cd4013 U2A got hot real quick so we shut it down and replaced the ICs back to how they were previously.
Any thoughts would be much appreciated ?????
Thanks
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top