I have built a project where I have a teensie 3.2 measuring 2 thermistors, totaling interrupts from a hall effect sensor (measuring a flow meter), and then sends the 2 temps and total counts (and a calculated flowrate) from the flowmeter over canbus using a TI CAN transceiver.
I posted about it previously in this thread:
https://forum.pjrc.com/threads/53153-Teensie-3-2-Max-Temperature
I've since fixed the power supply side of things described in the previous thread and have been having my flowmeters run problem free ever since...until recently
Recently I installed a UHF communication radio (450 something MHz), also powered by the car's 12V system, and I've noticed some strange behavior -- When the radio is transmitting, I show a higher flow rate on the flowmeter that is pretty close to the UHF Antenna. The fluid is in no way tied to if the radio is transmitting or not so the change of measured flow rate is an error.
I hooked my oscilloscope up to the input (between the hall effect sensors and the Teensie input pin) and I cannot perceive a change in the frequency of the square wave pulses even though the teensie is reporting up to a 3 times higher flowrate than just before the radio begins transmitting.
Here's the code in question:
void PulseCounter() {
IRQcount++;
}
TotalPulses = IRQcount;
if ((millis() - LastTime) >= 2000){
FlowRate = ((0.00013)*(TotalPulses-LastPulses) / ((millis() - LastTime) / 60000.0)) * 60.0;
}
I have the interrupt attached to pin 6, Falling. The circuit is 3.3v supplied though a 30K pull-up resistor to the input pin (pin 6) with the hall effect sensor pulling to ground for each pulse of flow.
So my question is this...If my input signal to the teensie seems unchanged and my outputted value over the CANbus is the variable "Flowrate" shown calculated above increases up to 3 times higher, what could be an explanation for this? I think its EMI because if I unplug the antenna from the UHF radio, I don't see the change in flowrate. I expected to see something with my Oscilloscope during radio transmission but I don't and that's why I'm confused on where to go next.
My Oscilliscope is only 100MHz, maybe that's a problem with seeing some sort of noise coming from the 450 something MHz UHF radio???
I posted about it previously in this thread:
https://forum.pjrc.com/threads/53153-Teensie-3-2-Max-Temperature
I've since fixed the power supply side of things described in the previous thread and have been having my flowmeters run problem free ever since...until recently
Recently I installed a UHF communication radio (450 something MHz), also powered by the car's 12V system, and I've noticed some strange behavior -- When the radio is transmitting, I show a higher flow rate on the flowmeter that is pretty close to the UHF Antenna. The fluid is in no way tied to if the radio is transmitting or not so the change of measured flow rate is an error.
I hooked my oscilloscope up to the input (between the hall effect sensors and the Teensie input pin) and I cannot perceive a change in the frequency of the square wave pulses even though the teensie is reporting up to a 3 times higher flowrate than just before the radio begins transmitting.
Here's the code in question:
void PulseCounter() {
IRQcount++;
}
TotalPulses = IRQcount;
if ((millis() - LastTime) >= 2000){
FlowRate = ((0.00013)*(TotalPulses-LastPulses) / ((millis() - LastTime) / 60000.0)) * 60.0;
}
I have the interrupt attached to pin 6, Falling. The circuit is 3.3v supplied though a 30K pull-up resistor to the input pin (pin 6) with the hall effect sensor pulling to ground for each pulse of flow.
So my question is this...If my input signal to the teensie seems unchanged and my outputted value over the CANbus is the variable "Flowrate" shown calculated above increases up to 3 times higher, what could be an explanation for this? I think its EMI because if I unplug the antenna from the UHF radio, I don't see the change in flowrate. I expected to see something with my Oscilloscope during radio transmission but I don't and that's why I'm confused on where to go next.
My Oscilliscope is only 100MHz, maybe that's a problem with seeing some sort of noise coming from the 450 something MHz UHF radio???