You are here

analog to digital converter | Cypress Semiconductor

analog to digital converter

Summary: 17 Replies, Latest post by Bob Marlowe on 12 May 2016 09:57 PM PDT
Verified Answers: 1
Last post
Log in to post new comments.
alkh5869_1498161's picture
User
2 posts

Hi there

I am using CY8CKIT-042-BLE I want to convert an analog input to digital but I could not find the right component to do so. so my question is there a pin in the kit that take an analog and digital at the same time and I do not need to do any convert or is there a component that I should use to do so.

the idea of the program I am trying to build is to count pulses. a copy of the file has been attached here 

thanks 

 

Ali

user_1377889's picture
User
10803 posts

Welcome in the forum!

You started to use an AD-Converter, what you need is an Analog input pin. Take one from the components, place it left to the ADC and wire (connect) it to the ADC. After building the project a physical pin will have been assigned.

 

Bob

alkh5869_1498161's picture
User
2 posts

so I got my program to work 

now I want to connect the cypress Bluetooth with a mobile app from app inventor. however I was not able to make the Bluetooth to connect or even to appear in the phone. I check my phone app and is working just fine. but still struggle with turning cypress bluetooth ON. Can you help me with that. I attached my file 

  

Attachments: 
user_1377889's picture
User
10803 posts

But you are aware that you are here in the PSoC3 forum and not in the PSoC4 BLE. Does your mobile devise support BLE which is something like an extension to standard Bluetooth?

 

Bob

luantdoan_1606826's picture
User
14 posts

I'm working on PSoC 3 design to read voltage rails and display them on the UART Console terminal. I wired up a voltage divider network on the breadboard of the CY8CKIT-001 to have 5.0V, 3.3V, 2.5V, 1.6V, and 0.8V rails. The design consist of analog voltage rails connecting to an AMux which connected to ADC_DelSig single ended. The voltage reading from ADC all rails except 3.3V seem reasonable. The voltage read back for 3.3V is 4.3xxV and I don't really know how to correct this. Below is the ouput displayed on the UART Console:

Reading Voltage Rails. Please wait...
P5P0V_Rail: 5025 mV (adc count = 65874)
P3P3V_Rail: 4349 mV (adc count = 57011)
P2P5V_Rail: 2657 mV (adc count = 69668)
P1P6V_Rail: 1666 mV (adc count = 53328)
P0P8V_Rail:  839 mV (adc count = 53710)

I am attached my design here for reference. Please help!

Thanks,

Luan

hli
user_78878863's picture
User
2759 posts

Are you sure your voltage dividers are correct? And that your calculation of the voltages matches the divider? When all other voltages are OK, there doesn't seem to be a general mistake.

luantdoan_1606826's picture
User
14 posts

Hi hli, these voltage readings have been verified with a DVM. I measured at the port pin headers on the CY8CKIT-001 Development board.

user_1377889's picture
User
10803 posts

At first sight and looking into your project I would assume you picked the wrong signal from the resistor ladder: the 4.17V instead of the 3.3V. Please triple-check and test by using a multimeter.

Bob

luantdoan_1606826's picture
User
14 posts

Hi Bob, Yes I checked with DVM multiple time by measure at the correct pin of port pin header on CY8CKIT-001. I also connect a wire to the same 3.3V on the bread board, measure and verify 3.3V at the other end of the wire before plug it into different port pin (P2[7]), then add this to a new channel of AMux, complile, program and run again thru Debug and the reading value is the same:

Reading Voltage Rails. Please wait...
P5P0V_Rail: 5026 mV (adc count = 65881)
P3P3V_Rail: 4350 mV (adc count = 57025)
P2P5V_Rail: 2657 mV (adc count = 69668)
P1P6V_Rail: 1667 mV (adc count = 53347)
P0P8V_Rail:  839 mV (adc count = 53733)
P3P3V2_Rail: 4351 mV (adc count = 57031)

user_1377889's picture
User
10803 posts

I question: How to get a count of 69668 out of a 16-bit result?

As you can see from the picture in ADC configuration Rail-to-Rail cannot measure 5V, disable the input Buffer for Configuration 1

 

Bob

luantdoan_1606826's picture
User
14 posts

The adc count returned by ADC_DelSig_GetResult32() is even higher when I set Buffer Mode to "Bypass Buffer":

Reading Voltage Rails. Please wait...
P5P0V_Rail: 5544 mV (adc count = 72672)
P3P3V_Rail: 4253 mV (adc count = 55750)
P2P5V_Rail: 2657 mV (adc count = 69668)
P1P6V_Rail: 1666 mV (adc count = 53336)
P0P8V_Rail:  839 mV (adc count = 53707)
P3P3V2_Rail: 4253 mV (adc count = 55751)

Log in to post new comments.