Announcements

Equip yourself to optimize PSoc4 MCUs for Evs at the EV Webinar. Click here to register.

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

PSoC™ 4 Forum Discussions

CaHo_2689596
Level 1
Level 1

If I apply a voltage via a potentiometer (V3.3 - GND) to P2_7, the voltage is converted correctly.

However, if I put an amplified sensor voltage on the P2_7, the reference value (AVDD / 2 or internal 1.024 Volt) is always returned. Depending on which Vref is parameterized.

I assume that it is a ground problem, but these ground are interconnected throughout.

The voltage at P2_7 is between 0.1 - 0.8 volts (measured and depending on the gain).

Thanks for your support.

0 Likes
4 Replies
MotooTanaka
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Hi,

If the voltage read at the pin is (0.1~0.8), ADC should read some reasonable value.

So I tired to reproduce your symptom.

And when I set the ADC input pin as OpenDrain Driving High with the initial value as 1,

the behavior looks like what you wrote.

005-open_drain_drives_hi.JPG

004-open_drain_drive_high_init_1.JPG

Then when I returned the pin to High-impedance analog, no matter which the initial value is 0 or 1,

the output seemed to be reasonable.

007-TeraTerm-log.JPG

At least accidentally setting pin type to OpenDrain Driving to High could be a reason.

How about checking the pin type?

moto

0 Likes

Hi moto

thanks!

I checked the pin settings again. The setting is in drive mode "high impedance analog".CY_analog_Pin.PNG

The problem must be something else.

carsten

0 Likes

Dear Carsten-san,

Thank you very much for your confirming the result!

And I'm sorry my hypothesis was not correct.

Beside the open-drain scenario, another reason I can think of is

that the input voltage is always higher than the reference,

but as you've already confirmed that this is not the case.

It may not harm if you double check if the gnd of the amp and PSoC's VSSA is connected

and measure the voltage between VSSA and P2_7 to make sure it's less than the reference.

Although right now I have no usable idea,

I'll let you know when I (can) come up with one.

Meantime, it would be nice, if you can upload/attached a sample project which you and others can reproduce the symptom.

Best Regards,

30-Jan-2019

Motoo Tanaka

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hello Carsten,

Could you please attach your project ? In PSoC Creator ,  go to File -> Create Workspace Bundle -> Select minimal. Please attach the generated file.

Best Regards,
Vasanth

0 Likes