Newbie

Discussion in 'The Projects Forum' started by Ozjello, Aug 12, 2008.

  1. Ozjello

    Thread Starter Member

    Aug 12, 2008
    10
    0
    Hello all,

    I am new to electronics other than the odd high school project.

    I am trying to design an interface to an O2 Wide band Air/Fuel ratio circuit output that I already have that is an unbuffered (no sink or source) 0-5V DC Output

    The image below is my attempt at a schematic that has 4 sections.

    A TLC555 (texas instruments) timer circuit to generate a 4Hz 20% duty cycle logic output for the sample and hold circuit

    The sample and hold circuit itself (National LF398) to sample the 0-5VDC source and output to another circuit I havent designed yet to represent this sample in an LED bar-graph/dot graph.

    Along with these is a -5VDC regulator circuit (based on LMC7660) to create the dual rail +-5V supply for the LF398, and an adjustable voltage regulator for the +3VDC to run the 555 timer with so that the logic input to the sample and hold circuit is less that the source input voltage as required by the datasheet for that component.

    I am looking for some suggestions/criticisms, and also help in selecting the Wattage range of the resistors, and also Voltage and type of capacitors.

    Any help anyone can give me would be greatly appreciated.

    Thanks
    Tim

    [​IMG]
     
    Last edited: Aug 12, 2008
  2. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    You show an ordinary 555 that has a minimum supply voltage of 4.5V but it has only 3V.
    It probably won't work.
     
  3. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Why do you need a sample and hold?
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Audioguru's right about the 555 not working on a 3v supply. You could use a CMOS version though, like an LMC555.

    For D1, you show a 1N4148. If you look at a Schottky diode like a 1N5817 or BAT54 (smt), you'll find they have a much lower Vf, and will enable you to get a wider range on your duty cycle at the low voltage you're running. The comparator will trigger at 1/3 and 2/3 of Vdd, which since you're running at 3v is a difference of only 1v. A 1N4148 has a Vf of nearly 0.7v at 5mA. The 1N5817 has a Vf of .32v @ 100mA. The BAT54 will be roughly 0.35v at 5mA, or roughly half of the 1N4148. Changing to a Schottky-type will help a great deal in getting you the duty cycle you expect.
     
  5. Ozjello

    Thread Starter Member

    Aug 12, 2008
    10
    0
    Thanks everyone for thier replies

    Audioguru - I am sorry. I was looking at the TLC555 from Texas instruments. I forgot to put the on the schematic, but it was the Datasheet I was working from. It has a supply voltage range of 2V to 15V

    Ron H - The reason I wanted sample and hold is because as far as I know the O2 sensor voltages jump around quite a lot, and that would make for a verry eratic LED bar/dot graph display. So I wanted to smooth it out with a 4Hz sample and hold signal, that will take a sample then hold it for 80% of the cycle.

    Sgt Wookie - I took the signal diode reccomendation right from TI and thier datasheet. I am definately willing to change it out to help with the stability of the logic output.


    ******

    What wattage resistors and voltage range/type capacitors should I be looking at ? I designed a PCB using the lead spacing for a 0.125 W resistor, but I am worried they will be too low wattage.

    Thanks again for everyone help.
     
    Last edited: Aug 12, 2008
  6. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Regarding the LF398 - Unless I missed something, I think you have misinterpreted the datasheet. I assume you read this:
    This condition is satisfied by having pin 7 connected to GND, as in your schematic.
    I think you will find that sampling a rapidly jittering signal at 4Hz will just result in a jittery signal at 4Hz. You would probably be better off using a simple lowpass filter instead of a sample and hold.
    Having said this, you could simply run your 555 on 5V and attenuate the output with a resistive divider if you really needed a 3V pulse (which you don't). If you are bound and determined to use a sample and hold (which I know is sexy), you could use a 74HC4066 and a 1uF hold cap right into the input of an LM3914 bar graph display, eliminating the need for a negative supply.
     
  7. Ozjello

    Thread Starter Member

    Aug 12, 2008
    10
    0
    Ron H - Yeah, you hit the nail on the head with that assumption. That is exactly what I mis-interpreted.

    Basically I want to get from the 0-5V unbuffered source into the LM3914 in cascased mode. I have available a regulated +5VDC and unregulated 12V-14.4V (from car).

    I will admit that I googled things, wrote down what I found and poured over datasheets to try to get what I wanted. If there is a better/easier way I am all for it. I am definately not bound and determined for a sample and hold circuit, just thought it was needed.

    Can you please explain th 74HC4066 quad-bilateral switches IC, and how it can help me get from A to B ?

    I am all for learning how to do it, rather than asking you to do it for me, so any help or advice is GREATLY appreciated

    Thank you very much for your help.
    Tim
     
  8. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    The 74HC4066 is an analog switch. Connect the Vcc pin to +5V and the GND pin (surprise!) to ground. When a control pin is above about +3.5V, its switch is closed. When the control pin is below about +1.5V, the switch is open.
    Connect any unused control pins to GND. Don't connect any pin to a voltage above Vcc or below GND.
     
  9. Ozjello

    Thread Starter Member

    Aug 12, 2008
    10
    0
    So feeding this with the logic output of the TLC 555 will give me a 4Hz 20% duty cycle (or whatever I choose) output of the actual source.

    Would another option be a sample and average circuit ? would that help to smooth out the jitters. Or would it be easier as you mentioned to build a lowpass filter ?

    Thanks
    Tim
     
  10. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Yes. You would need a hold capacitor on the output side of the switch. You might need to buffer the input of the switch (and maybe the output) with a voltage follower. If you do, you will need a rail-to-rail I/O op amp. This is beginning to sound like the LF398 might be just as easy.:(

    If you use a filter, the filter characteristics will depend on how fast your actual O2 sensor information rate changes. I assume it changes rapidly when the throttle position changes. Is the jitter due to pulses from the individual cylinders? Some of the other guys here may know more about this than I do. I just think you need some sort of filtering, and if you choose to sample and hold, the filter should come before the S&H. I guess you could also put a filter after the S&H.
     
  11. Ozjello

    Thread Starter Member

    Aug 12, 2008
    10
    0
    Well at least I can remove the +3VDC supply circuit, that will help out a little bit.

    Now I have an question about cascading 2 LM3914's. I was thinking this morning of a zero center type display centered around stoichiomentric ratio which has a SOURCE of 2.5VDC.

    Do I need some form of voltage offset into the circuit to make the LM3914's think the 2.5V is actually the 0V center, or can I configure them to run in the 0-5V range and know that 2.5 is the center of the display ?

    This is the last piece to my puzzle. Then I will create a prototype and test the filtering/sample and hold and see what real world conditions display.

    At the moment I have never run the O2 sensor circuit, so I dont know how jittery it is. I am guessing it needs filtering/smoothing by the fact that the software that comes with the O2 sensor allows you to output to it's proprietary display (4 digit 7 segment LED) at an 8Hz output frequency.

    ******
    This is taken from page 9 of the National LF398 datasheet. Is this saying that it will average the input over the timeframe it is in sample step, and then output that while in the hold step ? I dont understand the Equation however. Is it asking for a frequency of the input or the frequency of the sampling. Does this still need the logic input, or is the sampling rate driving the the RC circuit attached to pin 6 ?
    [​IMG]


    Thanks again for your help Ron H

    Tim
     
  12. Ozjello

    Thread Starter Member

    Aug 12, 2008
    10
    0
    ***New direction maybe***

    I was thinking about this some more, and how I would like the display to function. I would like to see bar mode looked like with a 2.5VDC center on my scale of 0-5VDC

    So it bars left at less than 2.5V and bars to the right at greater than 2.5V.

    I was wondering if I can use a summing op amp circuit feeding the 0-5V source to the non-inverting input and a +2.5V voltage to the inverting input (with all of the required resistors of course to get a unity gain) to give me an effective -2.5V to +2.5V signal to feed the zero center cascaded LM3914's

    I am drawing up a schematic now and will hopefully have it done soon. But I wanted to run it by people to see if I am thinking correctly before spending the time on drawing up an elaborate schematic.

    Once again.

    Thankyou to everyone for thier help
     
  13. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    It seems to me that if you just cascade them with the bottom one covering 0-2.5V, and the top one covering 2.5V-5V, it will do what you want. I don't see the need to level-shift the input. Won't the visual result be the same either way?
     
  14. Ozjello

    Thread Starter Member

    Aug 12, 2008
    10
    0
    Ron H - I believe the display would be different. Bar mode as far as I know will only hold from left to right in standard configuration.

    If you cascade them and had a souce signal of say 1V with 0.25V segments, the 4 far left Leds would light. I want the LEDS to light from the center out and hold the bar.

    i.e if the reading gets leaner or less than 2.5V at the source I want the bar to start building from the center position to the left, if the source shows a richer condition the bar needs to build to the right.

    The national LM3914 has a zero-center meter application listed on page 10 of the datasheet. It just involves creating a negative ~1.3 V signal to replace the internal reference, +1.25V.

    Does that sound like it will get the effect I am looking for ?

    Thanks
    Tim
     
  15. Ozjello

    Thread Starter Member

    Aug 12, 2008
    10
    0
    Just wondering if anyone has any advice or input on whether I should even bother with sample and hold ?

    I think I am going to start ordering a few parts, and put them together to see what kind of output I get.

    I am a little unsure of resistor wattages. Are 1/8 or 1/4 watt resistors ok in the circuits I have in the schematic ?

    Thanks to everyone for thier help
    Tim
     
  16. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I was up to my ass in alligators today. maybe I can look at it tomorrow, or over the weekend.
    You should be OK with 1/8 or 1/4 watt resistors.
     
  17. Ozjello

    Thread Starter Member

    Aug 12, 2008
    10
    0
    I know the feeling :). I will work on the schematic again today and post it . Hopefully if you have any time over the weekend you can take a gander and see if it jives.

    I will get a parts list together and order some of the things I need and start building a prototype. I dont have the O2 wideband in the car yet, but I am sure I can set up a dummy 0-5Vdc signal to test the display part.

    Thanks
    Tim
     
Loading...