Frequency to frequency converter
Alex41
Posts: 112
Hello,
I read about the stamp microproccessors on this site with great interest.
I am looking for a frequency to frequency converter. Something to take a frequency input and either output a slower or faster frequency output by a linear or non-linear amount.
Is this possible and where do I look to get started? Sprcifically which product will do this?
The application is modifying the output of a MAP (Manifold Air Pressure)·sensor on a car.
The frequency range is 80 hz to 160 hz. I would either like to speed up or slow down the frequency. Either by just 20hz or maybe change the output by 20%. These are just examples, it would need to be adjustable for fine tuning.
Will these do square wave and/or a sine wave?
Will these products do such a thing?
Thank you in advance for any help,
Alex
I read about the stamp microproccessors on this site with great interest.
I am looking for a frequency to frequency converter. Something to take a frequency input and either output a slower or faster frequency output by a linear or non-linear amount.
Is this possible and where do I look to get started? Sprcifically which product will do this?
The application is modifying the output of a MAP (Manifold Air Pressure)·sensor on a car.
The frequency range is 80 hz to 160 hz. I would either like to speed up or slow down the frequency. Either by just 20hz or maybe change the output by 20%. These are just examples, it would need to be adjustable for fine tuning.
Will these do square wave and/or a sine wave?
Will these products do such a thing?
Thank you in advance for any help,
Alex
Comments
Personally I'm not familiar with the Stamp series, but I can tell you that this can be done with one of the SX processors........ that is, if you program it that way. Possibly SX/B is your answer; again, my experience at that is limited, but with assembler it's a definite YES!
Cheers,
Peter (pjv)
Here are the links:
http://forums.parallax.com/showthread.php?p=651534
http://forums.parallax.com/showthread.php?p=651537
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
I'll look more into the various processors and what their capabilities are now that I know that this can be done.
One comment though. I called tech support after I posted on here and the guy on the phone said it could't be done as there is no way in the programming to read an input frequency. Is this true? or was he just talking about the stamp proccessor?
Thanks again,
Alex
COUNT cpin,duration, result
That counts the number of cycles at the cpin (which can be any of the Stamp's input pins), and does it for a duration that you specify (milliseconds on the BS2 and BS2e--the units of duration are a little different on the other Stamps). At the end of that time, the result holds the count, and count/duration = frequency.
For your application though there is the difficulty that you probably want your output in a regular beat at practically the same time as the input. The Stamp is single tasking, i.e., while it counts it will not be doing anything else. That was the same difficulty in the link posted, and there are several possible solutions. You will get the most flexibilty from a faster processor that can do two things at once, in fact or de facto, like the Propeller or the SX.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Post Edited (Tracy Allen) : 6/1/2007 1:34:20 AM GMT
Thanks so much for your help. Seems like the stamp isn't quite capable enough for my application. In your opinion which would be easier to apply to my project? The Propeller or the SX? Which one is easier to program and set up?
Will these processors put out different waveforms? At this point I am not sure which is acceptable for my vehicles computer. Further testing will answer that. First I need something that puts out a wave form!!
Thanks again,
Alex
My first instinct would be for the Propeller, because it offers more independent resources for timing, and it would allow for future expansion without disrupting the timing loop. On the other hand, the SX could handle this task in a very straightforward way, at least in assembly language and maybe also in SX/B, and the result would probably be cheaper to produce if you need to make more of them. Difficulty of programming on either processor depends on the details of the timing requirements, and it sounds like you are still looking into that. Never assume that it is going to be easy, unless you can buy it ready made!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Yes, easy is a relative term. I do have some programming experience from high school and college. I did buy the STAMP kit at Radio shack the other day and have been playing with it. It doesn't seem hard. -I know - I say that now- The programming terminology refreshes my mind to programming.
I understand the stamp isn't fast enough for what I need to do, but gets me to understand this stuff better. I can already see the ways this chip can help me out with other tasks.
On the Parallax site I'm not getting too smart on the differences between the SX and propeller chips. Cost is an issue as I may make more of these.
I see the propeller chip has a keyboard and screen available. Can I change the programming using this directly? Or do I need to be connected to a PC?
I assume the stamp, SX, and propeller chips all use different programming language? Or are they common? I mean the programming that I input into an editor? I understand it gets translated into a language the board can use, but as to what I see in the editor is different?
Thanks so much for your help,
Alex
Currently you cannot develop using the attached peripherals on the Propeller. You still need a Windows 200/XP PC computer. The BASIC Stamps use PBASIC, the SX uses SX Assembly or SX/B and the Propeller uses its own Assembly as well as the higher level SPIN language. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
so far I have come across 2 different kinds of sensors that sense the amount of air going into an engine. one is the MAP - Manifold Air Pressure sensor and the MAF - Mass Air Flow.
It appears the MAP was used on earlier modles and the MAF on later models.
Both also appear to use different signals to the ECU.
some are based on a different voltage based on the manifold pressure, some have a variable frequency output instead of the voltage.
Hope this helps,
Alex
What type of MAP sensor is it I dont knowof any Frequency type only the Voltage type? What model and make car did it come off of? What you are trying to do is make a MAF translator right?
The one like for my truck 91' Chevy TBI injected (only a map sensor no MAF) is a·variable 5vdc signal comming from the MAP sensor.
My 96 buick Riviera has a MAP and·a MAF and the MAP is a 5vdc signal and the MAF is a analog voltage also.
I did find that their are some Frequency type out their but they wont be any harder to work with. Look at this paper.http://www.egr.msu.edu/autoweb/Class/Fall99/Presentations/maflow1.pdf
As far as the analog voltage sensors you can use a 8 bit A/D chip to read the 5vdc signal then use a Digital pot to output a 8 bit signal proportional to what you set it.
Post Edited (bennettdan) : 6/6/2007 6:01:26 AM GMT
My 1989 Ford had a freq output MAP and later model GM also has a freq MAF.
You sure you have a MAF and a MAP? Is one possibly the Air temp sensor?
Thanks,
Alex
You still use a Microprocessor and then use a 8bit A/D (Analog to Digital) converter to convert the 5vdc voltage comming from the MAP sensor to a digital signal with 255 steps which is about .02 volt resolutions per step. Then the Micro uses that data then scales it then outputs a voltage from the digital pot which is also a 8 bit 255 steps. This would only work on a variable voltage sensor like on my 91 Chevy MAP sensor. You could aslo use a 10 or 12 bit A/D converter and digital pot that would give you more resolution.
I have a MAF and a MAP sensor on my Buick because it is supercharged and it reads the MAP sensor to know the boost pressure.
As far as using the frequency variable MAF and MAP sensors you can read the frequency then use a Micro to scale the frequency then output the scalled frequency to the cars ECU.
The SX is a real nice chip and you could use the SX48 protoboard to build your circuit and then you would have the hardware timers to count and send out the frequencys.
here is the link to the SX48 proto http://www.parallax.com/detail.asp?product_id=45300
also you will need a 50mhz resonator http://www.parallax.com/detail.asp?product_id=250-05060
and the SX key to program it. http://www.parallax.com/detail.asp?product_id=552-00007
But instead of just the SX key alone I would recomend a SX tool kit that comes with the manuals and the Sx key and a few other goodies.http://www.parallax.com/images/prod_jpg/45181.jpg
But you can download the SX key manual from the parrallax websight for free if you dont want a tool kit. I love working on EFI controls and would be glad to help out where I can.
You could get away with the SX blitz USB programmer http://www.parallax.com/detail.asp?product_id=45170 and the SX48 Prototye board and be about the same price as a Basic Stamp. Then use SX/b to progam it.
thanks for the help.
A solution is available for adding and reducing the voltage output of a variable voltage sensor. Let me know if you are interested in this.
Now I need to figure out how to adjust the frequency output of a sensor. I'll order one of the SX toolkits here shortly. right now I'm going through the lessons of the stamp book.
I'm slowly learning more about he capabilities in PBasic and have an idea of what I need to do - of course there are always a few things that go haywire in doing just about anything.
Alex
Paul
Post Edited (Paul) : 6/14/2007 9:21:07 PM GMT
····· Thanks so much for the idea. I did look at the datasheet on the LM331 and it seems the lowest frequency it will do is 10khz. I'm looking for frequencies of about 100Hz. Much slower. I'll do some more research on this though, as it seems like a simple solution. Do you have any experience applying the LM331 chip?
Alex
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=50491
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!
the link didn't work for me. Could you doublecheck that for me?
Thanks,
Alex
Alex
can be used·in designs.
http://ww1.microchip.com/downloads/en/AppNotes/00795a.pdf
regards peter
I did look at the LM331 datasheet again and it is a bit unclear, but appears it can work down to about 100 Hz. I'll have to try that and see how it works.
Also have the SX chip now and I'll see what I can come up with to get that to work.
Thanks again,
Alex