Measuring multiple thermistors independently using PSoC 5LP

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi, 

   

I am using the CY8CKIT-001 PSoC Development kit with the PSoC 5LP to measure the temperature of five thermistors. Looking at AN6477 shows how to measure thermistors in parallel or in series. However, since I do not want my thermistors to be in series or in parallel, I wanted to modify the PSoC 4 thermistor measurement circuit in Figure 11 to work with the PSoC 5LP since I would not be limited by the number of opamps or DACs this way. However, I was unable to successfully build this circuit because of errors like "Signal "Net_1596" is expected to connect to only one GPIO analog pin but instead it connects to "AMux_CYAMUXSIDE_A". Please fix the connection."

   

Any suggestions? Attached my projects. 

   

Thanks!

0 Likes
13 Replies
lock attach
Attachments are accessible only for community members.
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Tie your grounds together. I changed your mux to 6 but you could get by with 5 channels. Always use a Star ground to prevent ground loops. I removed the bootloadable component and also removed the PSOC 3 files as you are using a PSOC 5.  here is a program that compiles.

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

Your routing looks quite out-of-order. Can you check that?

   

 

   

Bob

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

Took some time to figure out what made your routing so messy. in the appnote you can see a shortened input channel or at another example a voltage reference. This is meant to measure the ADC offset. Since you have got only one ADC, you need this mimic only once.

   

So for each thermistor to measure you need two diff channels, one for the ref R, one for the thermistor. For your upper two thermistors you measure in serial you need another diff channel. Lastly one channel to measure the ADC offset.

   

Your ADC needs 3+2+2+2+1 = 10 diff channels and not 13 as in your project.

   

 

   

Bob

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        Ida.huang, Alternately, you may consider using DS18B20 temperature sensor component, which allows for simultaneous sampling of up to 8 sensors at once. http://www.cypress.com/forum/psoc-community-components/component-read-ds18b20-digital-temperature-se...   
0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi, 

   

Thanks for the feedback. I did end up realizing I had a lot more channels in my MUX then necessary. I've fixed that in my current version of the project and have attached it. It is the project version 2. I am getting a warning where it tells me "Bonded pin(s) "P5[1]" are not used in your current design but have been connected in order to route the design." I haven't connected P5[1] in my cydwr file. Also I am getting notes saying: "Voltage Reference Information: Vref 'Vdda/2' is connected to terminal 'vminus' of '\ADC_DelSig:DSM\' but no direct hardware connection exists." Do I need to be concerned with this? In the dev kit's breadboard, I noticed that I have a lot of pins coming out of P1 that I can externally route but in the PSoC Creator, my project won't allow me to assign pins P1[0] - P1[3]. I've selected the op amp pins to their dedicated op amp vout pins P0[0], P0[1], P3[6], and P3[7]. The port 3 pins seem to be directly connected to CY8CKIT-036 PSoC Thermal Management Expansion Board Kit that I am using with the CY8CKIT-001 though. 

   

Ida

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted
        Ida.huang, With so many thermistors you may consider using the Fast Thermistor Calculator component instead of stock Thermistor Calculator, and get about 15 times speedup. http://www.cypress.com/forum/psoc-community-components/fast-thermistor-calculator   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The "Bonding" warning can be ignored. To route your design as required, the router needs to "hop" from one pin to another which will not allow to use that pin for your own purposes.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thank you for your feedback. I ultimately want to test my design with five thermistors and five fans. In my current project, I am just using one fan so it is not a problem that I have set the dedicated op amp vout pins P3[6] and P3[7]. However, I see these are connected to TACH4 and PWM4 on my 036 development kit so if I were to connect the fourth fan it would be a problem. Would it be easier to send my fan signals to different pins so I wouldn't be using the development kit anymore. I was also wondering what port/pins correspond to the VDD12 and DGND received by the fans.   

   

Thanks!

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

A development kit has usually some pins dedicated to some board specific hardware. When the design is tested you may use a prototyping kit where only the essential pins are fixed. Check out the CY8CKIT-059.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

My current thermal system seems to ping pong between the desired temperature range and I'd like to implement a PID controller in my fan controller to more tightly control the temperature of my system. Taking into account the measured value of the temperature and my target temperature, I can subtract them to find an error in the temperatures that should be proportional to the fan speed. I see that the there is this function called FanController_SetPID (uint8 fanNum, uint16 kp, uint16 ki, uint16 kd). I am thinking I should update the kp, ki, and kd terms every time I check measure the temperature? Does the firmware adjust the PWM/duty cycle the fan accordingly when I make this function call?

   

Thanks. 

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

For a closed-loop-controller the kp, ki and kd are usually fixed and do not change. They reflect the environment and together with the frequency of the call to measure the temp build the closed-loop.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

How would I determine the appropriate kp and ki values? I feel like adding the PID control on the fan controller makes my temperature reading and fan control independent from each other if I am no longer making function calls to set the duty cycle or set a desired speed of the fan based on temperature? I want to make sure I am not trying to converge on a certain RPM but rather a desired temperature of the system. 

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

I only have a description for evaluating the k-values in German language. This is completely independent from PSoC, C. Try to google for an English or Indian language description, this is engineering knowledge.

   

 

   

Bob

0 Likes