AMux replacement functionality in CYBLE-022001-00

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
anpi_1343696
Level 2
Level 2
First like received

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.

0 Likes
1 Solution
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Use the sequencing SAR ?

   

 

   

   

 

   

Regards, Dana.

View solution in original post

0 Likes
10 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Use the sequencing SAR ?

   

 

   

   

 

   

Regards, Dana.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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.

   

 

   

Bob

anpi_1343696
Level 2
Level 2
First like received

 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.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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.

   

 

   

   

 

   

Regards, Dana

odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

 You can use fast thermistor calculator from here

   

https://secure.cypress.com/?app=forum&id=2492&rID=107492

0 Likes
anpi_1343696
Level 2
Level 2
First like received

 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.

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

 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?

   

odissey1

lock attach
Attachments are accessible only for community members.
anpi_1343696
Level 2
Level 2
First like received

 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;

   

...

   

Many thanks!

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

@apineda,

   

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.

   

odissey1

anpi_1343696
Level 2
Level 2
First like received

Hi odissey1,

   

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.

   

Thanks again.

0 Likes