on XTal side You show caps connected serially --- Them shall be both in parallel to this sides Voltage pins.
I don't know price but them look as
And You need at least only one -- Around Voltage regs You can use electrolytic with low ERS
Hey Sapieha, that has been fixed, that was just a mistake by me drawing, but not how I would have set it up.
With all of this cap protection, is the general consensus that I still need to proto it on a soldered pcb with a metal enclosure? It's an awful lot of work compared to a breadboard, in case I have to make a change?
Why have 9-5-3.3v? With the proper part, you can drop 12v to 5v with a bone standard LM340-T5.0 or LM2940-T5.0. Also, get rid of the 100k resistor to the CAS, it's not needed since you have 18k on the input to the LM1815.
Why have 9-5-3.3v? With the proper part, you can drop 12v to 5v with a bone standard LM340-T5.0 or LM2940-T5.0. Also, get rid of the 100k resistor to the CAS, it's not needed since you have 18k on the input to the LM1815.
Good catch on the 2 resistors. You also recommended earlier that I use 9v and I need 5v for another IC, and possibly 9v for a 3rd IC, so I decided to have the ladder of alternator voltage, 9v, 5v and 3.3v
Why have 9-5-3.3v? With the proper part, you can drop 12v to 5v with a bone standard LM340-T5.0 or LM2940-T5.0. Also, get rid of the 100k resistor to the CAS, it's not needed since you have 18k on the input to the LM1815.
The LM1815 typical operating voltage is 10v, so 5v may result in operation that doesn't work well with the example components. I would recommend a low dropout regulator to 9v from 12v, then drop the 9v to 3.3v for the prop, bypassing 5v. If you use a proper ground pad/heatsink, you can drop the 9v-3.3v in one step.
But the rest looks solid? What type of shielded cable did you use for your datalog/tach product? Will the lm1815 invert the signal, it appears to in the datasheet? Did you set this up on a PCB for proto-ing your product, or did you solder a quick pcb?
Sapieha, doing the stepdown may spread transients, but it's wasteful and unnecessary. I suggested he use the MegaSquirt power supply schematic because it does include a bunch of filtering that your approach doesn't. There is over voltage, reverse voltage, noise, and transient suppression.
The MegaSquirt power supply design is a known quantity and has been proven in many environments. I contributed the MOV to the design because of HV transients and accidental alternator overvoltages caused by bad grounds or unloaded operation. I have asked B&G to explain what every component in the design was for, so I understood the rationale; the design is purposeful and complete.
The datasheet seems to indicate that the LM1815 does invert the signal, a high going output on low going crossing.
For the CAS input, use a shielded cable, with the shield connected directly to the ground input of your circuit, where the power input comes in, not anywhere else. You want any noise to be coupled to the ground wire feeding your circuit, not the ground plane of your circuit. Also, leave the other end of the shield un-connected, shields should only connect at one side.
Remember to connect the sensor with the correct polarity, the ECU is probably grounding one of the sensor pins, so you need to maintain the same polarity.
For an easy to find source of shielded cable suitable for VR signals I've utilized plenum rated (100C I think) teflon insulated 22g stranded intercom wire that is usually obtainable from Home Depot and Lowes (these are US home improvement stores). The variety I've successfully used has two twisted pairs, each pair in it's own shield then a shield over the both pairs. As has already been noted - only ground one end of the shield.
Hi Pedward, I will have to reinvert it using something like the circuit below, thanks for the tip on the grounding. Did you just program for the inverted signal on your circuit?
I have already determined the sensor pulsating signal vs the sensor ground from my DMM and from the factory manual which says the following
The datasheet seems to indicate that the LM1815 does invert the signal, a high going output on low going crossing.
For the CAS input, use a shielded cable, with the shield connected directly to the ground input of your circuit, where the power input comes in, not anywhere else. You want any noise to be coupled to the ground wire feeding your circuit, not the ground plane of your circuit. Also, leave the other end of the shield un-connected, shields should only connect at one side.
Remember to connect the sensor with the correct polarity, the ECU is probably grounding one of the sensor pins, so you need to maintain the same polarity.
Hi Mike,
Thanks for the tip, I'm in the states and will get to Home Depot very soon to get the intercom wire, it sounds perfect for my application as I need to have a crank and cam wire that are each shielded and I can use that single intercom wire for both signal wires.
For an easy to find source of shielded cable suitable for VR signals I've utilized plenum rated (100C I think) teflon insulated 22g stranded intercom wire that is usually obtainable from Home Depot and Lowes (these are US home improvement stores). The variety I've successfully used has two twisted pairs, each pair in it's own shield then a shield over the both pairs. As has already been noted - only ground one end of the shield.
-Mike
I guess my schematic is close to being pretty usable and the general consensus is that it should work well for my application?
I want to thank everyone who has posted in this thread, as I have learned a lot about signal conditioning and cleaning up from your posts and personal experience and I appreciate your posts!
No I'm not using waitpeq/pne. I was using those, but I needed more flexibility with timeouts so I switched to pin monitoring with counters, where when the pin is first high I read the low cycles (if they are above a certain value) and then clear them. Then when the pin is low, I read the high cycles and clear them ... repeat.
I believe it would be easier and less confusing for me to keep the code as is and have the hardware match what I already have setup with the other propeller emulating what the car does.
I've noticed on your schematic the bypass caps on your supply regulators, but unless you just are not drawing some of the bypass caps, I see none on the M1815 chip. Out of curiosity, I took a look at the data sheet for the device to see if it was possible to route the input in a differential mode without external parts. No luck. But there were notes on the section titled Input Voltage Clamp that has some relevant notes on V+ bypassing and also on grounding (nearly all noted in this thread) that may be worth a look.
Also, if not PCB prototype, you could try very carefully done point to point on perf-board. There are some types out there with a ground plane etched around all the hole. Use solder or good wirewrap connections. Perhaps judicious application of hot glue for mechanical support. Just gotta be careful with clearances, and minimize parallel wire runs to limit crosstalk.
In the development phase that you are in, I would suggest using a separate 12v sealed lead acid battery source, to isolate signal versus power supply noise.
By the looks of your project, you could probably run it all off a single 9v battery, and remove a few of those voltage regulators.
A perf board is probably my only option at this point. I am worried about the cross talk, but everyone says it is better than a breadboard. I did not see the Input Voltage Clamp section you describe in the datasheet I looked at, http://pdf1.alldatasheet.com/datasheet-pdf/view/8666/NSC/LM1815.html I did however read and reread this a few times and I'm very interested to see how the peak tracking works? It also appears that the chip has an internal diode for the VRS signal, so I don't even have to have an external diode now : )
Operation of Zero Crossing Detector
The LM1815 is designed to operate as a zero crossing detector,
triggering an internal one shot on the negative-going
edge of the input signal. Unlike other zero crossing detectors,
the LM1815 cannot be triggered until the input signal
has crossed an ``arming'' threshold on the positive-going
portion of the waveform. The arming circuit is reset when
the chip is triggered, and subsequent zero crossings are
ignored until the arming threshold is exceeded again. This
threshold varies depending on the connection at pin 5.
Three different modes of operation are possible:
MODE 1, Pin 5 open. The adaptive mode is selected by
leaving pin 5 open circuit. For input signals of less than
135 mVp-p, the input arming threshold is typically 45 mV.
Under these conditions the input signal must first cross the
45 mV threshold in the positive direction to arm the zero
crossing detector, and then cross zero in the negative direction
to trigger it. If the signal is less than 30 mV peak (minimum
rating in Electrical Characteristics), the one shot is
guaranteed to not trigger.
Input signals of greater than 230 mVp-p cause the arming
threshold to track at 80% of the peak input voltage. A peak
detector (pin 7) stores a value relative to the positive input
peaks to establish the arming threshold. Input signals must
exceed this threshold in the positive direction to arm the
zero crossing detector, which can then be triggered by a
negative-going zero crossing. The peak detector tracks rapidly
as the input signal amplitude increases, and decays by
virtue of the resistor connected externally at pin 7 to track
decreases in the input signal.
Note that since the input is clamped, the waveform observed
at pin 3 is not identical to the waveform observed at
the variable reluctance sensor. Similarly, the voltage stored
at pin 7 is not identical to the peak voltage appearing at
pin 3.
I did forget to draw the i/c caps, but had them in design. Here they are
I've noticed on your schematic the bypass caps on your supply regulators, but unless you just are not drawing some of the bypass caps, I see none on the M1815 chip. Out of curiosity, I took a look at the data sheet for the device to see if it was possible to route the input in a differential mode without external parts. No luck. But there were notes on the section titled Input Voltage Clamp that has some relevant notes on V+ bypassing and also on grounding (nearly all noted in this thread) that may be worth a look.
Also, if not PCB prototype, you could try very carefully done point to point on perf-board. There are some types out there with a ground plane etched around all the hole. Use solder or good wirewrap connections. Perhaps judicious application of hot glue for mechanical support. Just gotta be careful with clearances, and minimize parallel wire runs to limit crosstalk.
That is a good idea to get me going and I may try that, I guess I'd still have to tie the grounds together, not sure how much junk would backfeed through the chassis ground?
In the development phase that you are in, I would suggest using a separate 12v sealed lead acid battery source, to isolate signal versus power supply noise.
By the looks of your project, you could probably run it all off a single 9v battery, and remove a few of those voltage regulators.
I would use the PropStick USB, and with the RadioShack boards, just bolt several together side by side. What you are doing would be an hour at most to wire up.
I must be slow : ) , it took me a couple of hours to try and map out the components on the perf board that were not propeller parts before I left for vacation, and that is still not done.
Maybe it would be a good idea to use the Propstick, it's just another $50 bucks ... ugh. I just recently bought 2 proto boards. Does RS carry the prop usb boards?
I would use the PropStick USB, and with the RadioShack boards, just bolt several together side by side. What you are doing would be an hour at most to wire up.
That is a good idea to get me going and I may try that, I guess I'd still have to tie the grounds together, not sure how much junk would backfeed through the chassis ground?
Hi Turbosupra
Everything in your project seems to have evolved a lot since my last visit. I'm still trying to synchronize with the changes, but it seems that the winds are blowing in favor. Perfect!
In the meantime I ended up learning how to use the Eagle 6. I am an old user (in terms of time and age) of the PCAD but six years have passed since the last time I put oil on gears.
I hope these pictures can be of any help to solve your question of how to distribute both the 12V power supply such as land, from the connection in your system until each of the areas of interest in your project.
As for software, rather than change anything, I suggest you write a little routine that reads the input pulses from the detector in your Propeller. Then copy the state, without any extra processing in one of the output pins. Observe the result in a reliable oscilloscope and see if at least until this point has been possible to stabilize the detection.
Perhaps this procedure may prevent you from questioning the correctness of any routine to make sure that the Propeller is recognizing what you're giving it.
I hope this can help a little.
"I hope these pictures can be of any help to solve your question of how to distribute both the 12V power supply such as land, from the connection in your system until each of the areas of interest in your project."
Please read as:
"I hope these pictures can be of any help to solve your question of how to distribute both the 12V power supply and grounding, since the connection on your system until each of the areas of interest in your project."
Perhaps a bit of soil debris (land) or dust got between my gears or between my eyes and glasses.
Lotsa stuff used to be point to point on perf for some pretty high end prototyping. A number of military computers and display units designed in the 70s and 80s had wirewrapped backplanes. I can recall some of my scrounging forays into the dumpsters of some notable 1970s silicon valley Ca companies for tossed prototypes. Recovered many hundreds of gold wirewrap pins and analog parts on headers plugged into them.
Going the point to point route will require care in mounting and layout and you can find perf with ground plane mentioned earlier at Frys electronics and online. If you get a piece large enough you could mount some shielding on the bottom and also install a cover over the components.
This article http://www.aikenamps.com/PCBorPTP.htm mentions some good arguments in favor of point to point. Especially one point regarding the ease of redesign of parts of a circuit done point to point vs one engraved in stone... er PCB anyway.
My old eyes lit up when I read your post.
The Compucorp 400 series machines also included controllers for magnetic tape reel (yes, they existed) as peripherals to exchange data with the existing mainframes. They were built in wire-wrap on perforated plates provided with integral ground backplanes on both sides and heavy buses for power distribution. I even helped in the design of an updated replacement of IBM 2821 control unit for IBM 1403 line printers. Both the channel and device adapters were controlled by a handful of Z80 processors and a large amount of UV eproms that stored the microcode for the state machines. Two beautiful perforated plates (+ - 16 "x 24") with backplane grounding on both sides and large lanes for power distribution. They contain some 400 LS TTL MSI's (a mix of 14, 16 and 20 pins), Z80's and eproms (28, 32 and 40 pins) , all tied together with wire-wrap. There were also eleven small boards (+ - 4 "x 6") to accommodate the 132 high current solenoid drivers for the print hammers (60V, 4A each) but these were normal double face printed circuit boards. A heavily multi-NPN ballasted LM317 linear regulator design provided 5V to the circuit. Enough amperes to fry a huge Kentucky chicken inside.
As for the shields I've always used in my prototype brass plates of the type that were used to manufacture fuel tanks for model airplanes. A little work on the cuts and folds, but they were easy to install and solder using tin / lead alloy. Also served to create connections between independent regions within the planar ground.
Almost forty years have passed and we are still fighting our old enemy; Noise. Touch
I just wanted to thank everyone very sincerely. I tried this out today and it worked and my code worked as it did on the bench. There is some more tweaking to do, but I was able to test it in the car against the benchmark that I had (factory ecu) and it worked pretty well. I am using a perf board inside of a metal enclosure with the caps everyone suggested and a schmitt trigger.
Now I need to graduating to not just reading, but writing/controlling a solenoid based on the reading I have done. I'm hoping to make good progress next month!
Comments
on XTal side You show caps connected serially --- Them shall be both in parallel to this sides Voltage pins.
I don't know price but them look as
And You need at least only one -- Around Voltage regs You can use electrolytic with low ERS
http://www.radioshack.com/product/index.jsp?productId=12460832&retainProdsInSession=1&numProdsPerPage=60
So, yes, they will be a couple of bucks a piece.
Hey Sapieha, that has been fixed, that was just a mistake by me drawing, but not how I would have set it up.
With all of this cap protection, is the general consensus that I still need to proto it on a soldered pcb with a metal enclosure? It's an awful lot of work compared to a breadboard, in case I have to make a change?
Usually if they are $2.30 are Radio Shack, they are $0.50 everywhere else .
I guess while I'm there I will get the shielded wire from Radio Shack as well.
http://www.radioshack.com/product/index.jsp?productId=2103854
Now caps are correct.
BUT -- On REG side You have one error ---> first reg after 12v need be 9v --- not 5v
sorry as I'm are that nit-picking but it is for at You will not have problems
I thought that was what you meant earlier, but forgot to ask you about that.
You are correct.
BUT that construction spreads transients from Mobile generator .(give one extra barrier)
And are cheap
But the rest looks solid? What type of shielded cable did you use for your datalog/tach product? Will the lm1815 invert the signal, it appears to in the datasheet? Did you set this up on a PCB for proto-ing your product, or did you solder a quick pcb?
Solder PCB.
In mobile applications BreadBoards are NOT usable --- shake disturbs Yours results
The MegaSquirt power supply design is a known quantity and has been proven in many environments. I contributed the MOV to the design because of HV transients and accidental alternator overvoltages caused by bad grounds or unloaded operation. I have asked B&G to explain what every component in the design was for, so I understood the rationale; the design is purposeful and complete.
How about the shielded wiring? And does the lm1815 invert the signal like it appears?
For the CAS input, use a shielded cable, with the shield connected directly to the ground input of your circuit, where the power input comes in, not anywhere else. You want any noise to be coupled to the ground wire feeding your circuit, not the ground plane of your circuit. Also, leave the other end of the shield un-connected, shields should only connect at one side.
Remember to connect the sensor with the correct polarity, the ECU is probably grounding one of the sensor pins, so you need to maintain the same polarity.
-Mike
I have already determined the sensor pulsating signal vs the sensor ground from my DMM and from the factory manual which says the following
Hi Mike,
Thanks for the tip, I'm in the states and will get to Home Depot very soon to get the intercom wire, it sounds perfect for my application as I need to have a crank and cam wire that are each shielded and I can use that single intercom wire for both signal wires.
I guess my schematic is close to being pretty usable and the general consensus is that it should work well for my application?
I want to thank everyone who has posted in this thread, as I have learned a lot about signal conditioning and cleaning up from your posts and personal experience and I appreciate your posts!
I believe it would be easier and less confusing for me to keep the code as is and have the hardware match what I already have setup with the other propeller emulating what the car does.
Also, if not PCB prototype, you could try very carefully done point to point on perf-board. There are some types out there with a ground plane etched around all the hole. Use solder or good wirewrap connections. Perhaps judicious application of hot glue for mechanical support. Just gotta be careful with clearances, and minimize parallel wire runs to limit crosstalk.
By the looks of your project, you could probably run it all off a single 9v battery, and remove a few of those voltage regulators.
A perf board is probably my only option at this point. I am worried about the cross talk, but everyone says it is better than a breadboard. I did not see the Input Voltage Clamp section you describe in the datasheet I looked at, http://pdf1.alldatasheet.com/datasheet-pdf/view/8666/NSC/LM1815.html I did however read and reread this a few times and I'm very interested to see how the peak tracking works? It also appears that the chip has an internal diode for the VRS signal, so I don't even have to have an external diode now : )
I did forget to draw the i/c caps, but had them in design. Here they are
Maybe it would be a good idea to use the Propstick, it's just another $50 bucks ... ugh. I just recently bought 2 proto boards. Does RS carry the prop usb boards?
Hi Turbosupra
Everything in your project seems to have evolved a lot since my last visit. I'm still trying to synchronize with the changes, but it seems that the winds are blowing in favor. Perfect!
In the meantime I ended up learning how to use the Eagle 6. I am an old user (in terms of time and age) of the PCAD but six years have passed since the last time I put oil on gears.
I hope these pictures can be of any help to solve your question of how to distribute both the 12V power supply such as land, from the connection in your system until each of the areas of interest in your project.
As for software, rather than change anything, I suggest you write a little routine that reads the input pulses from the detector in your Propeller. Then copy the state, without any extra processing in one of the output pins. Observe the result in a reliable oscilloscope and see if at least until this point has been possible to stabilize the detection.
Perhaps this procedure may prevent you from questioning the correctness of any routine to make sure that the Propeller is recognizing what you're giving it.
I hope this can help a little.
(Credits given do Heater for the Fuse!
"I hope these pictures can be of any help to solve your question of how to distribute both the 12V power supply such as land, from the connection in your system until each of the areas of interest in your project."
Please read as:
"I hope these pictures can be of any help to solve your question of how to distribute both the 12V power supply and grounding, since the connection on your system until each of the areas of interest in your project."
Perhaps a bit of soil debris (land) or dust got between my gears or between my eyes and glasses.
Going the point to point route will require care in mounting and layout and you can find perf with ground plane mentioned earlier at Frys electronics and online. If you get a piece large enough you could mount some shielding on the bottom and also install a cover over the components.
This article http://www.aikenamps.com/PCBorPTP.htm mentions some good arguments in favor of point to point. Especially one point regarding the ease of redesign of parts of a circuit done point to point vs one engraved in stone... er PCB anyway.
The notes I mentioned for the LM1815 are on pg 8 of the PDF from National Semi. https://www.national.com/ds/LM/LM1815.pdf
My old eyes lit up when I read your post.
The Compucorp 400 series machines also included controllers for magnetic tape reel (yes, they existed) as peripherals to exchange data with the existing mainframes. They were built in wire-wrap on perforated plates provided with integral ground backplanes on both sides and heavy buses for power distribution. I even helped in the design of an updated replacement of IBM 2821 control unit for IBM 1403 line printers. Both the channel and device adapters were controlled by a handful of Z80 processors and a large amount of UV eproms that stored the microcode for the state machines. Two beautiful perforated plates (+ - 16 "x 24") with backplane grounding on both sides and large lanes for power distribution. They contain some 400 LS TTL MSI's (a mix of 14, 16 and 20 pins), Z80's and eproms (28, 32 and 40 pins) , all tied together with wire-wrap. There were also eleven small boards (+ - 4 "x 6") to accommodate the 132 high current solenoid drivers for the print hammers (60V, 4A each) but these were normal double face printed circuit boards. A heavily multi-NPN ballasted LM317 linear regulator design provided 5V to the circuit. Enough amperes to fry a huge Kentucky chicken inside.
As for the shields I've always used in my prototype brass plates of the type that were used to manufacture fuel tanks for model airplanes. A little work on the cuts and folds, but they were easy to install and solder using tin / lead alloy. Also served to create connections between independent regions within the planar ground.
Almost forty years have passed and we are still fighting our old enemy; Noise. Touch
Now I need to graduating to not just reading, but writing/controlling a solenoid based on the reading I have done. I'm hoping to make good progress next month!