8 Replies Latest reply on Jan 18, 2018 1:40 PM by e.pratt_1639216

    CYBLE-224110-00 battery level

    AndyMarder

      I have a custom board with a CYBLE-22410-00 .powered by the cr2032 battery

       

      Could you please help with the following

      1. I copied the ADC SAR  component from the BLE_Battery_Level01 project  (attached) into my project  but don't know how to connect the  J3 pin VREF. The  the project doc  says "The Vref analog input pin is locked to P3[0] and "Connect J2 pin P3[0] to J3 pin VREF" - but it has to be project specific

      2. What modifications (if any) are required in the sample code to make it work on  CYBLE-22411-00 ? I' m  referring to the MeasureBattery() function and the defines it uses ,i.e ADC_VREF_INTERNAL1024BYPASSED,ADC_SAR_CTRL_REG , etc

      3. The comment in the MeasureBattery function says that it converts the battery level voltage to percentage using values specific to the CR2033 battery. I could not find that info for the CR2032 .Any ideas where to find it? Or do these values apply to CR2032 as well?

      Thanks

      Andy

        • 1. Re: CYBLE-224110-00 battery level
          yliu

          1. You are right, it should be project/board specific, you can assign that pin properly based on your hardware, the desciption in the project doc is based on the PSoC4 BLE kit.

          2. You may just directly use it with CYBLE-22411-00, I remember the ADC of the two chips(the one used in the original project and the CYBLE-22411-00) is same.

          3.  I think these values apply to CR2032.

          • 2. Re: CYBLE-224110-00 battery level
            e.pratt_1639216

            3. The "percent battery charge" is based on the expected SoC for each voltage level for the CR2033 lithium battery. Unless it has different voltage ratings (I can't find the datasheet for the CR2033), then similar voltage and type of battery with only a small difference in the amount of total charge it stores should have a similar SoC to voltage correlation, which means that it should work. Basically, the percentage battery life is estimated from the voltage for the type of battery, and similar batteries will have a similar estimation.

            1 of 1 people found this helpful
            • 3. Re: CYBLE-224110-00 battery level
              AndyMarder

              Where can I find information what pin to use? I could not find it in the CYBLE-224110-00 data sheet

              Thanks

              • 4. Re: CYBLE-224110-00 battery level
                e.pratt_1639216

                The Pin P3[0] looks fine when I build your project; Are you expecting a certain pin for use by the ADC to get the Vref?

                The example project shows an external Capacitor wired to the Vref pin. If you are wanting to measure the battery voltage without external components, then see here: http://www.cypress.com/blog/psoc-hacker-blog/measuring-vdd-battery-volts-psoc4

                (If you directly reference the Vref, then on a comparison between battery voltage and the Vref, it will almost always come back with 100/100%)

                • 5. Re: CYBLE-224110-00 battery level
                  AndyMarder

                  I'm a bit confused with the terminology. By "external" do you mean a physical part that has to be connected to the PSoC ? Or is it a logical component? I started reading the article you mentioned and the same question applies. Thank you

                  • 6. Re: CYBLE-224110-00 battery level
                    e.pratt_1639216

                    When documentation for the PSoC chips uses "external" they generally mean a part or component that is NOT inside of the CYBLE module, or whatever chip you are using, and thus it would be a component that you need to wire to the pins on the cypress module using one of the IO pins, PCB traces, jumper wires, etc.

                    When they refer to "internal" they are generally referring to something already included, and within the cypress module/chip.

                     

                    For example, the ADC itself is internal to the cypress module, but the pin it reads from can be external.

                    In the top design schematics on PSoC schematics, the blue "penned" looking wires, resistors, capacitors, etc. all refer to documentation on externally wired components for the project. Thus, the article referenced is using an external resistor divider bridge to read the ADC values from. That means, that you would need to dedicate a pin for the use of measuring battery voltage level.

                     

                    Tl;Dr; Yes, external means a physical part that needs to be connected/wired to the PSoC.

                    • 7. Re: CYBLE-224110-00 battery level
                      AndyMarder

                      Thank you for clarifying, this is very helpful. I'm looking for a solution that does not require any external parts. Is there such a solution?

                      • 8. Re: CYBLE-224110-00 battery level
                        e.pratt_1639216

                        Not as far as I know, but someone else would probably know better.

                        Support for an internal VDD battery measurement with the ADC would require a different chip, or manufacturing changes afaik.

                        Sorry, but good luck