![]() | ![]() | ![]() |
| |||||||
| Electronic Theory Basic principles, ideas, concepts, laws, and formulas behind electronics. |
![]() |
| | Tools |
| | #1 |
|
Using an LM2917 freq to dc converter: (http://www.jaycar.com.au/images_uploaded/LM2907.PDF). (2917 IS ALSO COVERED IN THIS FILE) Converting pulses to dc voltage, then outputing that dc volatge to a TLC0831 analog to digital converter (http://focus.ti.com/lit/ds/symlink/tlc0831.pdf). Output from A/D is then read and stored in a Parallax BS2 microcontroller, which uses a PIC16C57C as its main chip. Using an oscilloscope, I've noticed that the output from the LM2917 is not very steady, it comes out in waves that slope upward and downward at about the same rate as the input pulses, which are less than 100pps. How can I make the 2917 output smoother? A filter capacitor somewhere? I tried putting a 10MFd cap. across the output, and I think I ruined the 2917 by doing so. Now I get nice square wave pulses as an output. Perhaps I shouldn't have done that. ![]() Patrick | |
| |
| | #2 |
|
The LM2917 doubles the frequency, rectifies it then smooths the DC with a capacitor. The amount of ripple should be fairly low unless the input pulses are at a very low frequency. The output is a transistor that is destroyed by the capacitor at the output you added. Maybe you did not add the correct filter capacitor in the circuit.
__________________ Uncle $crooge | |
| |
| | #3 |
|
Thanks, Unka Scrooge. My mistake. I managed to get the thing working again; I found a loose ground connection. Now it works ok, except for voltage restrictions as a result of the BS2 5volt enable/disable pulses to the 0831 a/d. If the output from the lm2917 reaches or goes over the 5 volt pulse, a conflict ensues. I will need to lower the values of CI (pin 2) and R1(pin 3) of 2917 So the output voltage won't go over 5 volts. I hope that will take care of the conflict. ![]() Patrick | |
| |
| | #4 |
| Do you really need to log voltages with the BS2? Why not just use the BS2 to count the frequency of the input signal directly?
__________________ Go Trojans! | |
| |
| | #5 | |
| saturn1bguy asked: Quote:
Now I'm trying to convert the pulses to a varying dc voltage using the LM-2917, which is how some tachometer circuits operate (LM2917 was intended for that, I guess). Then, using a ADC-0831, convert the varying dc to digital, store that data on BS2's EEPROM, then bring that stored data into my desktop PC so I can monkey around with the data on a spread sheet or some other software. I want to develope a torque/horsepower curve (whew) There are other ways of doing it, too. Using magnets with a Melexis magnetic detection circuit. I'll probably try that method out someday. It's a long learning process, I'm a retired guy with some time on my hands, and learning to work with microcontrollers has become an interesting hobby. It keeps an old man busy, and out of his wife's hair. Patrick | ||
| |
| | #6 |
| Do you have any schematics of the circuitry you're trying to interface with, and how exactly were you trying to count the pulses?
__________________ Go Trojans! | |
| |
| | #7 | ||
| saturn1bguy asked: Quote:
I used the Pbasic "count" command of the BS2. Pulses from the ignition go from 12v to gnd(0v), and are ragged at top end. So there are positive and negetive portions to the pulses. The neg. part, if I remember, is about 5ms in length while the pos part varied according to RPM. (8 to 15ms). At first, I tried using the short neg. pulses, since they are flat on the 0v bottom, but just couldn't get that to work. (1) Motorcycle ignition system: Take output from minus (-) end of primary side of xfmer.(see attachment) (1) Voltage divider, which is connected to ignition output (see attachment), but couldn't use zener; resistances restricted current to the diode making it inoperable. (Got it from Quote:
(2) Schmitt trigger (http://www.uoguelph.ca/~antoon/gadgets/555/555.html) Towards bottom of page under SAMPLE CIRCUITS. This seemed to work at first, but didn't; BS2 missed counts or added counts. (3) Monostable MV, (555 and 556 Timer Circuits)trying to get one long pulse that wouldn't allow interference from anything in between. Couldn't get that to work at all from the motorcycle. (4) Junky hand drawn attachment of prementioned ckts together. (see attachment) (5) Clipper circuitry used after failure of Schmitt and mono. MV. (attachment) BS2 miscounts, gets too many other "spurious signals ? (Army days)" mixed in (6) Parallax BS2: (BASIC Stamp Activity Kit) That's enough Patrick | |||
| |
| | #8 |
|
I think you want to stay away from the coil in any case. Looking at your ignition diagram, the computerized ignition module has two inputs, one output, and 12V power. The output switches the coil primary to give you spark, I'd stay away from that. The vacuum input switch simply selects one of two spark-advance profiles, so this sensor is not useful to to you here. That only leaves the cam position sensor to pick off a useful signal for your BS2 to count. It has three wires, I would scope them out. Once you've done that, you'll better know how to proceed to condition its signal for the BS2. On the BS2 side, you already know the count command, fine. It seems the most appropriate for your task, once the input is properly conditioned.
__________________ Go Trojans! | |
| |
| | #9 |
|
Hi there, Just in case you get back to this, i thought i would offer a tip about reading the pulses more directly. The coil primary will look like a pulsing signal with some oscillation. This might look very strange, but it's just the way coils respond to pulsing drives and it's nothing too strange i can assure you. The pulsing is caused by the ignition timing, and the oscillation is caused by what is known as the "Free Oscillation Frequency" of the circuit, also sometimes called the "Ring Frequency" or the "Ringing Frequency". The ring frequency is a good name i think because when this happens the circuit is often said to 'ring'. It's a natural occurrence and happens in many circuits with coils. The only thing we have to know really is that the ring frequency is going to be higher than the pulsing ignition frequency, and that the ringing, if filtered, turns into a ramping signal. The idea then is to filter the signal from the coil primary with a low pass filter and then use a comparator with hysteresis so that it detects when the filtered signal ramps up and then waits for the signal to drop back down to a rather low level before it starts to look for another ramp. The whole circuit might work out to a simple one, with a resistor and capacitor for the low pass filter, and a LM339 comparator section designed with some hysteresis (a little positive feedback). That shouldnt be that difficult to build, however, there is a catch. The low pass filter has to be tuned so that it can pass the lower ignition frequency while filtering the higher ring frequency. This might require trying several values of resistors and or caps. Since a filter like this can also be specified by its RC time constant, and the RC time constant is simply the value of the R times the value of the C (ohms and farads), all we have to do is start with a rather low value of RC time constant (also called TC for short) and work the value of the cap up a little at a time while seeing if the uC starts to pick up a reasonable data stream. Alternately, if a scope is available, we can look at the waveform and pick R and C so that the rings get filtered out but the pulses do not. Perhaps start with a 10k resistor and 0.001uf cap, then try a 0.01uf cap, then 0.1uf cap. If that doesnt work try 20k and those same cap values, then 50k, etc. Eventually the right RC time constant will be found and the comparator will only pick up the ignition pulses. I wouldnt go lower than about 5k on the resistor and higher than 1 megohm i think when doing this. If you know your ignition frequency min and max that would help too as we can get a better starting value for R and C. | |
| |
| | #10 | ||
|
Thanks MrAl, Lots of interesting information in your message. I have observed the ignition pulses with my scope, and have seen the ringing. I think I tried a circuit similar to the one you suggest: Quote:
Quote:
I've also tried a clipper, which cut off the ringing tip of the pulse, in fact I still use it with the LM2917. The BS2 continued to miscount the pulses even after my clean up detail, but counting the pulses (pulses per second) seems to be the clear cut way to get to an RPM/torque/horsepower curve. thanks for the help Patrick Last edited by potoole64; 24th November 2008 at 08:30 PM. Reason: More information to add | |||
| |
| | #11 |
|
I need to mention that getting pulses from the Sportster requires that I hook circuitry up to the ignition system, then fire up the bike, and rev the engine up time after time. This not only gets the engine quite hot, but probably annoys the crap out of my neighbors. I made a simple ckt. in house that puts out a similar pulse as the bike's ign., and the BS2seems to work quite well with it. I try out my test ckts, using that as a stand in for the ign., and things work, but the ckts don't want to work on the bike; the BS2 still miscounts when connected to test ckt. and bike ign. | |
| |
| | #12 |
|
You have a motorcycle without a muffler? Shame on you.
__________________ Uncle $crooge | |
| |
| | #13 | |
| Quote:
Have you not scoped out your cam position sensor yet? It may give you a signal that's easy to interface compared to the ringing coil signal. Why do it the hard way when they may be an easy way?
__________________ Go Trojans! | ||
| |
| | #14 | |
| Quote:
ring waveform and at what rpm i could suggest a proper filter too that would save time. | ||
| |
| | #15 | ||
| Loud pipes save lives, Unka Scrooge; If the cage drivers can't see me coming they can hear me, hopefully while they're talking on cell phones, lighting a cigarette, and reading messages as they roar down the streets and highways, tailgating and passing every vehicle in sight even at speeds well over the speedlimit. Just kiddin, thanks for the message. (The pipes have baffles, but you ought to go to Sturgis if you want to hear loud bikes) saturn1bguy asked: Quote:
MrAl: Quote:
Thanks to all for the information and help. Patrick | |||
| |
|
| Tags |
| converter, freq, lm2917 |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| Questions about LM2917 frequency to volts converter | potoole64 | General Electronics Chat | 3 | 12th September 2008 09:13 PM |
| Lm2917 | iz3dmq | Electronic Projects Design/Ideas/Reviews | 3 | 9th April 2008 12:01 PM |
| Help with LM2917 Frequency to Voltage Converter | crice | Electronic Projects Design/Ideas/Reviews | 10 | 14th August 2006 08:31 PM |
| Question using LM2907 Freq to Voltage converter | mustang98 | Electronic Projects Design/Ideas/Reviews | 5 | 28th April 2005 12:46 AM |
| Replacing a Japanese freq fm tuner to USA freq fm tuner | meepers | Electronic Projects Design/Ideas/Reviews | 4 | 24th April 2004 03:42 PM |