Shop OBEX P1 Docs P2 Docs Learn Events
Input needed on circuit design - Page 2 — Parallax Forums

Input needed on circuit design

24

Comments

  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2010-02-16 02:35
    Bambino said...
    Can you think of a capacitor that would give less error?

    From the theoretical standpoint the larger the capacitor value the better (RC increases) but I suspect that parasitics (inductive, parallel resistance and ESR) might become an issue if the value is too large due to increase in physical size. I couldn't begin to comment further on parasitics as this is foreign to me. I would definitely experiment with different values (smaller as well) and types (as Philldapill mentioned). If you see very little change in behavior from capacitor to capacitor (value/type) then the capacitor is likely not the cause of your headaches. If the capacitor ends up being the cause and you find yourself in between a rock and a hard place (larger capacitor less error but intolerable parasitics) then you may need an op amp buffer/follower.
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-02-16 02:41
    Miner, What makes you say that a larger RC is better?

    Bambino, what is the x scale on your plots?

    Graham
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2010-02-16 02:56
    Graham, I posted a speil a few comments back (page 1)...the ADC has a 17K input impedance and so the 10uf cap forms an RC circuit with the ADC input. To understand better imagine you apply a step function to the capacitor input that jumps from the typical 2.5V (nominal 0g) to 3V...that is a 0.5V step, initially the voltage across the capacitor is 2.5V and the ADC sees 0.5V but as time passes the capacitor will charge due to current flow through it (C=Q/V and I = dq/dt)...at t >>RC the voltage across the capacitor would be 3V and the ADC would read 0V. For this application some acceleration underestimation error is to be expected due to capacitive charging while coupling the signal to the ADC.
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-02-16 03:10
    I understand it is a high pass filter but I'm asking why a large RC is better in this instance?

    Graham
  • bambinobambino Posts: 789
    edited 2010-02-16 03:19
    The x scale is samples taken at roughly 56 k per second.
    Miner may have just unknowing let hit on my problem.

    Yes, at 2.5(0G's) the capacitor should settle to around .5, but not.
    Idle readings are just under 2.5 volts. because any current draw from the ADC would be compensated by the diode to maintain current.

    The follower op amp really looks good if that is going to be the case no matter what size cap I place there. Then again its late and I may be ...... O welll.
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2010-02-16 06:20
    What part number is the constant current diode? Constant current diodes are jfets that have gate tied to source. They operate correctly only well above a certain voltage, typically around 5 or 10 volts. At lower voltages, below pinch-off, they act more like a non-linear resistor, which could cause instabilities in an amplifier circuit. D3 in this circuit only sees 2.5 volts across it, atypically low.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • train nuttrain nut Posts: 70
    edited 2010-02-16 15:27
    bambino


    Having spent many years in the data acquisition field and having used piezoelectric accelerometers there are two things you are doing which may be giving you problems. First as someone suggested I would ditch the electolytic cap and replace it with a 5-10 ufd paper cap. Second most pe accs require from 2 to 20 ma of constant current but at a compliance voltage of at least 10-15 volts. This is the voltage that is driving the constant current source. Check the spec sheet for your acc to see what compliance voltage is reccomended.·A low compliance voltage could cause nonlinearities as much as the eletrolytic cap does.

    Hope this has been helpful.

    train-nut
  • train nuttrain nut Posts: 70
    edited 2010-02-16 15:31
    bambino

    Almost forgot I would put a voltage follower between the cap and the ADC with its input a a known impeadance as depending on what ADC you have the input impeadance may vary with input.



    Train-Nut
  • bambinobambino Posts: 789
    edited 2010-02-16 16:43
    Thanks a million for the input guys. Tracy I don't have a datasheet for the diode. The part comes with the accelerometer when we purchase them. The Tech support guys at·dytran recommended it and said to feed it 5 volts. The batteries at minimum are 7.2v. The regulators deliver 500 mA.
    Thanks again for the suggestions

    Post Edited (bambino) : 2/16/2010 5:22:22 PM GMT
  • bambinobambino Posts: 789
    edited 2010-02-16 23:31
    Revisions:
    higher amperage regulator
    paper or ceramic capacitor
    Voltage follower

    Questions?
    Would parrallel regulators be OK or just one higher amperage"maybe hard to find in a small footprint"
    Or running one just for the diode and another for the 3.3 regulator, giving the diode the full 500 mA.

    Paper or Ceramic?

    By placing the inverting input of the op amp at 2.5 volts I would not have to adjust for zero G's in my code. Does anyone see any problems with that?
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2010-02-17 00:11
    Bambino said...
    By placing the inverting input of the op amp at 2.5 volts I would not have to adjust for zero G's in my code. Does anyone see any problems with that?

    I believe that would result in a comparator with a 2.5V reference rather than an amplifier. To correct for the 2.5V why not fix that in software?

    Parallel regulators can cause issues if they are not perfectly matched which typically is the case. I have seen application notes for paralleling regulators to increase current capacity and they usually involve connecting both together through a resistor on the output of each to allow for some voltage drop/wiggle room. Best stick with one regulator if possible.

    One side note...have you tried attaching a scope probe to both sides of the cap and on the power supply during a drop...might be a pain to rig (be careful to not have the probe cables snag etc.). This is the ideal way to debug these types of issues....I would hate to hear that you redesigned only to have the same issue all over again.

    Post Edited (Miner_with_a_PIC) : 2/17/2010 12:17:47 AM GMT
  • bambinobambino Posts: 789
    edited 2010-02-17 01:52
    .................................To correct for the 2.5V why not fix that in software?.............................
    There is another reason I wanted to do this. The ADC is a multirange as well, Their smallest range is 0 to 3 which would give me the highest resolution possible with the chip. I can live without it but, I choose this ADC based on that, only to find out that 0 was at 2.5 and 500 was at 3.5 v.
    If I used a dual op amp and configured the first as a follower and the second as a comparator would that pull the monkey wrench out?
  • bambinobambino Posts: 789
    edited 2010-02-17 02:00
    As far as scopeing out a drop goes, I don't see any way of doing it with the current rig. The circuit is in the base air tight and bolted down. Even the magic smoke couldn't get out if I fried it. I do have an extra accelorometer I could put in a test circuit, but it wouldn't have the 20lbs and all I could do for g's would be to tap it on my desk or something.
  • bambinobambino Posts: 789
    edited 2010-02-17 02:04
    Tracy the diode is a Cil1302
  • bambinobambino Posts: 789
    edited 2010-02-17 02:12
    Here is a pic for those who can not open the accelorometer data sheet pdf.
    2821 x 3572 - 206K
    Acc.png 205.9K
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2010-02-17 02:26
    Bambino said...
    If I used a dual op amp and configured the first as a follower and the second as a comparator would that pull the monkey wrench out?

    Nope, unfortunately that would have the same effect...first op amp would just replicate the first voltage and the second would be set as a comparator...operational amplifiers are just that, they perform math operations on analog signals..sum, invert, multiply (same as divide) and check for > or < (comparator).

    If you had a negative power rail you could use a summing amplifier (one input at -2.5V other from the accelerometer, both input resistors equal) followed by an inverting amplifier. The great advantage of such a set-up is you could set gains to maximize resolution at will, downside is added complexity. At this point I am unsure what you are proposing regarding the redesign but I trust your judgement.

    Google search : "summing operational amplifier"
    'inverting operational amplifier' for all example circuits and equations


    Great idea to use the extra accelerometer for debug etc away from the drop zone, might prove useful...and probably necessary if you want to prototype your new design.
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2010-02-17 08:22
    The constant current diode, CIL1302, seems to have been a product of Knox Semiconductor (KSI). I struck out on finding a data sheet. I'd guess however that it is similar to the series 1N53xx, for example the 1N5305 (2 mA) or 1N5313 (4 mA) with characteristics attached. The data shown is from Motorola, but Knox too manufactured that generic part.

    The constant current on the graph appears when the voltage across the diode is greater than something around 2 to 5 volts. The graph is a bit deceptive. The printed specs make it quantitative. Take the 1N5305:
    -- 2 mA nominal at room temperature when there is 25 volts across the diode. Different diodes might be 1.8 to 2.2 mA and still meet spec.
    -- When there is 25V across the diode, its effective impedance is 395 kOhms. That makes it a good current source. High is good.
    -- When there is 6V across the diode, its effective impedance drops to 61 kOhms, This is considered the "knee", above which it transitions to constant current.
    -- When the voltage across the diode is 1.85V, the current is about 80% of its constant value, in this case, 1.6 mA, 80% of 2 mA.
    attachment.php?attachmentid=67830
    The point is that it is a poor current source at low voltages. Even at 6 volts bias, the knee impedance is 61 kOhms, which is comparable to the 17kOhm impedance looking into the ADC. More important, the dynamic impedance varies significantly as the voltage across the diode changes, so the current from the diode will be changing in a non-linear fashion. That would distort the peak. The voltage changes significantly in this application. But I don't see how it could make the extra little blips, unless there is something funny going on in tandem with the circuit inside the sensor.

    Maybe the CIL1302 has special properties, but the characteristics of jfets can't be stretched too far. Could you try running the diode temporarily with a higher bias, say 16 volts from a 9V battery in series with the 7.2 volt supply?

    For circuit improvement thought, I'll stick my neck out (having had no experience with this type of sensor), but to say that the sensor could be put in the feedback leg of an op-amp, so the op-amp both provides the accurate constant current and also a low impedance output to drive the ADC. The LM10 op-amp/reference is good for that kind of thing. No capacitor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com

    Post Edited (Tracy Allen) : 2/17/2010 8:31:05 AM GMT
    479 x 308 - 27K
  • Zap-oZap-o Posts: 452
    edited 2010-02-17 12:44
    I don't know if this has been brought up but shouldn't you use a precision voltage reference for the A to D. Also I would use a precision resistor to create a voltage divider for the Accelerometer input using that same voltage reference.
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-02-17 14:09
    If you have the original unit that you think works properly then you could set up a test rig where you drop something on it (perhaps with some foam to reduce g) then try your unit, that would allow testing on the bench.

    Sort of bringing the mountain Mohammad.

    Graham
  • bambinobambino Posts: 789
    edited 2010-02-17 14:17
    Tracy, I probably have the 2mA version. The compliance voltage for the sensor is 4.5 but the current requirement is 4mA. Yes I probably could test the second (uninstalled) sensor at a higher voltage but there is no way I can get a bigger battery into the device. I have managed to squeeze a series of 6 AAA's into the current one. I did ask for more space but the milling engineers wouldn't give it to me. Could those diodes be run in parallel to get the 4mA I need. Not trying to dodge buying the 4mA flavor, but when we needed an extra diode a while back we had to place a minimum order of about 30 of them to get the one.

    Miner, Good suggestion. I can live with the complexity but the footprint may be too large. I have to redesign anyway to fit the temp sensors in. The board I have was not designed with those in mind. They are wired in special at the moment for proof of concept.

    Zap-o The ADC has a voltage reference of 4.096. From that reference it can calculate all the other references it needs. ie: 3,6,12 volts as well as their negatives.
    The sensors input is also the readout. A fixed voltage at that point would read 0 G's all the time. That is the purpose of the constant current diode. As the resistance in the sensor changes with impact, the current at the input remains the same, forcing the voltage to fluctuate. This voltage fluctuation is what we measure to read the G's.
  • Graham StablerGraham Stabler Posts: 2,510
    edited 2010-02-17 14:25
    For a greater voltage you could use a dc-dc converter (linear do nice ones) or what about lithium ion cells? Lithium polymer is even better (I used then to fly models) but worth having a decent charging circuit with protection.

    Fundamentally I think developing the circuit without a means of testing it is going to be really difficult and you can chase various possibilities forever I really do think you need some form of bench test whether dropping a weight on it or swinging a pendulum against it.

    Graham
  • bambinobambino Posts: 789
    edited 2010-02-17 16:04
    Graham, There is a lot prudence in that and and I suppose I could run some wires out that would allow for attaching a scope.
    The results I'm getting are exactly what Tracy is describing so a better power source is needed!
  • bambinobambino Posts: 789
    edited 2010-02-17 16:07
    I wonder what the effects are of running the diode straight from the batteries would be.
    I do have extras I could test with. Anyone think I should call the forest service and get a burn permit first......lol?
  • SapiehaSapieha Posts: 2,964
    edited 2010-02-17 16:20
    Hi bambino

    Most of bateries have very bad characteristics if You supl them with some Transcients from circuity You drive by them.

    FOR good characteristics YOU ned both separations diode's and good decopling by cap's as near batery as posible.

    Regards
    Christoffer J

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stupid question there is at least one intelligent answer.
    Don't guess - ask instead.
    If you don't ask you won't know.
    If your gonna construct something, make it·as simple as·possible yet as versatile as posible.


    Sapieha
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2010-02-17 16:34
    Bambino >> maybe you could attack the diode issue head on and get away with using a programmable current source like the LT3092. The specification claims performance down to 1.2V, so 5V should work nicely. Would like to get Tracy's inputs as he seems to be very knowledgeable in this area.

    Tracy >> Would the LT3092 or similar programmable current source be a workable substitute for the CIL1302 diode?

    cds.linear.com/docs/Datasheet/3092fb.pdf
  • bambinobambino Posts: 789
    edited 2010-02-17 16:39
    Thanks Sapieha, I would be placing in front of the reverse protection diode and it has decoupling caps there. This would keep the diode between 7.2 and 8.4 volts. Whether it fixs the problem or not it would keep the diode in a higher voltage than it has now.
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2010-02-17 16:41
    All you need to characterize the diode is a way to measure the current through it and the voltage across it, accurately. A resistor (variable) in series with a power supply is fine. Vary the current and measure the voltage, plot on graph. The slope of the graph is the impedance. If the voltage does not change one iota as the current is varied, then dV/dI=infinity, which is ideal for a current source. You are particularly interested in what it does at around 2.5 volts. You can put two of the 2 mA diodes in parallel to get 4 mA, and you can test them in the same way as with one diode.

    There is nothing wrong with your 5 volt power supply. If there is a problem with regulation, I'm pretty sure it will be the CC diode. The little blips, if not due to some mechanical issue, might(?) be due to instability of the diode+sensor circuit hitting a local "negative resistance".

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • bambinobambino Posts: 789
    edited 2010-02-17 16:42
    Indeed miner, I was thinking of drawing out the op amp circuit he discribed to see if I was close. I don't know if work will let me get to it today though.
  • bambinobambino Posts: 789
    edited 2010-02-17 16:52
    Thanks Tracy, Will do. If I knew for sure the diodes where 2mA I would piggyback one on top of the existing prototype and test it this weekend. Over 4ma would damage the sensor!
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2010-02-17 16:53
    Here is what I mean by putting the sensor in the feedback leg of an op amp. A voltage reference of 0.2 Volts is tied to the non-inverting input and the feedback condition forces the voltage across the 50 Ohm resistor to be also 0.2 volts, which means the current through the sensor is regulated at 0.2/50 = 4 mA. The current can be trimmed by adjusting the resistor. The sensor voltage added to the 0.2 volts appears at the output. Vout = Vsense + 0.2. That is a low impedance that can easily feed the 17kOhm input impedance of the ADC. The pinouts given are for the LM10 op-amp/reference, and it can pull almost rail to rail at the output and easily supply the 4mA current. (The accurate 0.2 volt reference is on the chip.)

    attachment.php?attachmentid=67855

    This assumes that you can float both ends of the sensor. If the case is grounded in way you can't float it, there are other LV op-amp circuits that can deliver the current like the diode does, but with better performance.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
    296 x 195 - 5K
Sign In or Register to comment.