element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Cypress Kits
  • Products
  • Dev Tools
  • Cypress Kits
  • More
  • Cancel
Cypress Kits
Forum PSoC 4 Pioneer Kit Community Project#101 – Lithium Power Pack Project
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Cypress Kits to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 1 reply
  • Subscribers 24 subscribers
  • Views 771 views
  • Users 0 members are here
Related

PSoC 4 Pioneer Kit Community Project#101 – Lithium Power Pack Project

cy.wbz
cy.wbz over 11 years ago

Hello!

 

In today’s example we are showcasing a PSoC 4 battery charging and monitoring example. Very often in an end product you will need to have the ability to monitor your battery voltage and assess the state of the hardware’s power system.

 

In this example we utilize the liquidware Lithium Battery Pack Shield as our charging and monitoring source. The Lithium Power Pack example is composed of two parts: charting and battery monitoring. The Charging part of the project has the PSoC 4 enter a hibernate mode and wake up when the battery voltage drops below the reference voltage. The second half o the example supports a battery monitory that checks the battery voltage every 30 seconds and will let the user know to charge the battery when it is low.

 

image

 

image

 

Forum Post Attachments:

 

At the bottom of this post we are including the following items:

  • Example Project Zip File
  • Project Images

 

Components Used: 

 

The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:

  • OpAmp
  • SAR
  • Timer
  • LCD
  • Comparator
  • CyPins
  • CyClock
  • ISR

 

Firmware Description:

 

The main.c firmware is included in the example project. Please review the commented sections for more details.

 

The firmware and the schematic design are divided into two halves, the charging mode and the battery monitoring mode.

 

The charging mode utilizes the PSoC 4 comparator to wake up the PSoC 4 device when charging is completed. In this design we give an external reference voltage to the Comparator. To reduce power consumption, we set the output pin to low in charging mode and high in battery monitoring mode.

 

The LEDs show different program statuses. A button can be also used to wake up the PSoC 4 device to judge if charging is available.

 

The battery monitoring mode utilizes the SARADC and the OpAmp as a buffer which is used for battery voltage monitoring. A timer triggers an interrupt every 30 seconds. When the interrupt is triggered the monitory status is displayed on the LCD.

 

The following image provides you a detailed flow chart for the example code. It may be helpful when designing your application to develop flow charts before writing code. A flow chart will help to divide up elements of your design and provide a way to isolate areas to perform testing to ensure proper functionality.

 


image

 

Hardware Connections:

 

Please connect the Lithium Battery Pack to the Pioneer Kit. In this example we also used a breadboard mounted on top of the Lithium Battery to wire up resistors and an LCD. You can use any breadboard shield. In this example we are using an internally developed shield. For information on the resistor network please take a look at the schematic design as the external resistors are detailed there. These resistors can be laid out on the breadboard.

 

image

 

image

 

Test Your Project:

 

Program your example and begin to charge and discharge your battery system. View the output on the LCD screen.

 

image


image

 

I hope this example can help you in your design.

 

Best,

Matt

Attachments:
LithiumBackpackExampleProject_V22CP6.zip
8308.Project Images.zip
  • Sign in to reply
  • Cancel
  • cy.gul
    cy.gul over 11 years ago

    This is a great example for battery powerd applications that need to be designed for low power consumption.

    Using this project, you can monitor your battery levels and and accordingly adjust the various sleep modes that you can put the device into, to save power.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube