Shop OBEX P1 Docs P2 Docs Learn Events
Temp fluctuations on PCB affecting sensors — Parallax Forums

Temp fluctuations on PCB affecting sensors

T ChapT Chap Posts: 4,198
edited 2007-01-14 21:09 in Propeller 1
I could use some circuit help. I have a Propeller with a few extra i/o's on a PCB. There is a .1 shunt resistor on a separate motor driver PCB that sees 34v on it's input. There is a precision amplifier by Anaglog Devices called AD628 that looks at both sides of the shunt, and produces an output that has programmable gain and filtering. The amplifier goes to an LM393 comparator with one side of the comparator on a multiturn. The purpose of the current sense is to trip a pin on the Propeller board at a threshold, but that threshold is changing depending on the temp of the PCB. On power up, the trip level is one thing, after so many minutes the level changes. In other circumstances, there may be different cooling systems in place on the driver, different room temps etc. This means the levels will always be in flux.

I have some convoluted ideas on how to solve it, for example, studying the temp and it's affect on the threshold, then adding temp sensors, reading those sensors and modifying the REF input to the comp with a Propeller DA mod. Another idea I have is to add the simple ADC to the Prop, then bypass the comparator, go straight to the Propeller with the amplifier output, and have a loop that is comparing relative voltage changes, relative to previous voltages, not a fixed REF pot. In this case, the cycle can be slow, around 60hz is fine, but I would want to have the comparison be based NOT on the most recent voltage, but a voltage taken from maybe 250ms to 500ms earlier, so that a significant change would be required to produce a trip. In other words, the ADC would need to store 60 cycles worth of circular info, comparing the newest input back to the oldest entry for analysis. This way, regardless of temp, the comparison is always against itself, with parameters for voltage change plus time.

Does this make sense to anyone? If it is workable, would a loop writing to an array be the method to store and compare?

One more thought. Another headache with using a fixed ref is that it is relative to speed. Set your motors to one speed, the REF pin on the comp is one thing, change the speed and your ref is no good. This makes me think that should the ADC idea be workable, that it should be expanded to include a frequency counter, and the sensitivity of the trip point be scaled to the frequency of steps. The steps are already present in the Propeller.


Thanks for any suggestions

Post Edited (originator) : 1/14/2007 11:04:24 AM GMT

Comments

  • inserviinservi Posts: 113
    edited 2007-01-14 13:44
    Hello,

    Why exactly do you need to mesure by mesuring the courant ?

    Best regards,
    dro

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    in medio virtus

    Post Edited (inservi) : 1/14/2007 2:57:33 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-01-14 16:28
    1) Where is the temperature drift coming from? It shouldn't be coming from the op amp or the comparator. Although multi-turn pots will drift slightly with temperature, it shouldn't be much. How about heating in the 0.1 ohm resistor? What's the wattage rating? How much current are you putting through it? It may be that you need a higher wattage rating resistor that would dissipate its heat better and change temperature less.

    2) If you're going to have variation, I would seriously recommend using the ADC instead of a fixed threshold comparator and letting the Prop do some compensation as you mentioned, whether using a temp sensor or just using some averaging or hysteresis.
  • Tracy AllenTracy Allen Posts: 6,656
    edited 2007-01-14 17:39
    Are the shunt, the AD628 and LM393 all on the same PCB? I'd first troubleshoot by hooking a sensitive voltmeter right across the 0.1 ohm shunt to be sure the drift is not coming from there. If it is, then install a better shunt. If not, then trace out with the voltmeter one step at a time to find where the error creeps in. You stated that it was the comparator threshold that was drifting. That would indicate that the voltage supply to the comparator needs to be better regulated. How much drift is there, as a % of full scale?

    If the more elaborate control scheme is going to be needed anyway, I agree with Mike that going right to the ADC is a better option. The prop ADC uses the 3.3 volt power supply as its reference, so you have to determine if it is going to be accurate enough, or else go to an external ADC chip with a more stable absolute reference.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • T ChapT Chap Posts: 4,198
    edited 2007-01-14 20:31
    Thanks guys. The drift is across the shunt. I knew it was underated, however I can only find SMT shunts as high as 3w at Digikey. The motor is 3.5 amp rated, running at 34 volts. I suppose I could hack a larger wattage resistor in it's place for testing, then change out the next board to a power resistor with through hole leads. I am not good with the wattage formulas as you can tell. Obviously the resistance changes by doing this, but does wattage rating double by stacking two of the .15 3W SMT resistors I have now? I think the circuit would still be ok with .075 ohms, just adjust the REF pin.

    Post Edited (originator) : 1/14/2007 8:35:54 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-01-14 21:09
    Yeah. If you put two .15 ohm 3W resistors in parallel, the result is a 0.075 ohm resistor with a power capacity of 6W. With a 4A load, the 0.1 ohm resistor you were using would drop 0.4V which gives a power dissipation of 1.6W which is well within the power rating of 3W, but subject to heating and some change in value. The two parallel resistors will help somewhat, but a through hole physically larger power resistor will also help.
Sign In or Register to comment.