I have a design that uses a thermistor with an ADC SAR and AmuxSeq UDB on a PSOC 4 BLE.
Trying to use the new EZ-BLE for a project. As the CYBLE-022001-00 does not have an AMUXSeq UDB, is there a sample design on how to implement a similar set of functionality? There are plenty of GPIOs, but need to use the SAR on multiple pins.
Any ideas would be appreciated.
Solved! Go to Solution.
I would suggest you to open the example project for SAR ADC and then change the device to PRoC 022001 module which will compile without error. You do not need an AMUX, it is already integated into the sequencing SAR-ADC.
Thank you both for the quick response. That works. I appreciate the pointers.
The Thermistor calculator does not appear to work with that processor. I'll have to write some code, but at least I have the SAR working.
By using an AMUX you can add a buffer between it and SAR and get a
high Z in for all channels you need with just one OpAmp.
Thanks odissey1 , but the fast thermistor component does not seem compatible with CYBLE-022001-00. When I try to Build, Creator3.1 gives red error that this component cannot be used with CYBLE-022001-00 otherwise known as EZ_BLE.
I can't test it, I am on travel. Fast Thermistor calculator is purely software based- try to copy source code directly into your code.
Can you post error log?
Thanks for the suggestion. I think I got it working as per your suggestion. By just having the code included, all I had to do was add a few Steinhart-Hart Equation variables that were giving error. They were #defined in the header file, so I just made them float32 vars. Easy enough to change as needed.
float GetTempExact(float R_th)
float32 myThermistor_1_THA = 1.1259E-03; // Steinhart-Hart Equation
float32 myThermistor_1_THB = 2.346498E-4; // Steinhart-Hart Equation
float32 myThermistor_1_THC = 8.564001E-08; // Steinhart-Hart Equation
float32 myThermistor_1_K2C = 273.15f;
You are using Sheinhart-Hart coefficients for specific 10k thermistor TS-91. To obtain correct temperature readings you must calculate S-H coefficients using online calculator.
Other note: Fast Thermistor Calculator component does not use standard log() function, but fast approximation to it along with some other code optimization. As a result it calculates temperature ~15 times faster than the code you posted above.
Thanks and yes I understand that the values are specific to a given thermister and have to be adjusted. I was just confirming that I can get the code to compile correctly with the CYBLE-022001-00 by creating the variables.
I have not gone through all the testing yet, but this gave me a great starting point.