Providing negative value to an analog pin in PSoC

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

cross mob
Anonymous
Not applicable

 Hi all,

   

At the moment I am trying to provide a negative value to a comparator positive input pin, so the comparator output will be triggered high once a negative voltage goes lower than this defined threshold.

   

Unfortunatelly it looks like the PSoC does not accept a negative signal. I have checked this with scope and anything that goes below 0 Volts just disappears from the input signal.

   

Am I doing somethign wrong or this is, in fact, the way it is?

   

Thanks.

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

No input signal may be lower than GND on a PSoC. Use an R-ladder to shift the signal into positve Voltage.

   

 

   

Bob

View solution in original post

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

No input signal may be lower than GND on a PSoC. Use an R-ladder to shift the signal into positve Voltage.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Yes, you need to offset signals so that they do not go outside the

   

rails, Vss and Vdd.

   

 

   

The attached are some ways of handling - signals.

   

 

   

Regards, Dana.

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

@Dana

   

The 12123.xls does not calculate R1 to R3 and a schematic would be helpful.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

The Excel sheet does work.

   

 

   

In the zip file is a txt file with URL to the original article, and how to install

   

the Excel "Solver", an iterative engine to generate the solution.

   

 

   

I changed the zip, added the article PDF and pics to make life easy. Missing last pic

   

but it is not significant.

   

 

   

Regards, Dana.

Anonymous
Not applicable

Remeber that when using a resistor dvider with one end attached to VCC. The value to the PSoC is "SCALED" and "SHIFED"

0 Likes
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Here is another version from TI, seems a little better calculator.

   

3 Folders in ZIP file, EDN version, TI version, and a folder for

   

simple methods to generate - voltages.

   

 

   

Attached.

   

 

   

Regards, Dana.

Anonymous
Not applicable

Hi Dana and Bob, thanks for the useful info and the suggestions. Now I have the design up and running and operating within the correct voltage range.

   

Regards,

   

J.A.

0 Likes