Temp fluctuations on PCB affecting sensors
T Chap
Posts: 4,223
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
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
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
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.
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
Post Edited (originator) : 1/14/2007 8:35:54 PM GMT