element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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
Energy Harvesting Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Energy Harvesting Design Challenge
  • More
  • Cancel
Energy Harvesting Design Challenge
Blog Energy optimized code (I)
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: gelmi
  • Date Created: 27 Jun 2013 9:37 PM Date Created
  • Views 529 views
  • Likes 0 likes
  • Comments 1 comment
  • low_power
  • heat
  • low_energy
  • thermal_energy
  • 32_bit
  • temperature
  • enery_efficiency
  • energy_harvesting
  • thermal
  • efm32
  • peltier
  • energy_micro
  • self_powered
  • kit
  • energy_saving
  • consumer_electronics
  • energy_harvesting_challenge
  • energy_harvesting_source
Related
Recommended

Energy optimized code (I)

gelmi
gelmi
27 Jun 2013

I finished writing and testing the code for my project. I do not know if you remember, but in one of my previous posts I measured the average current consumption of a simple, cheap CO detector to be around 500 uA (@3,3 V) – that is being consumed by the whole standby and sensing functionality. This is a way over what I can supply from the TEG when harvesting energy from hot water tap. That is why I used Energy Micro STK with EFM32 Giant Gecko on board to create my own CO detector device. Before you continue to read the rest of this post, try to guess what average current consumption I did manage to achieve. Later on you can compare your estimation with my score and that will give you the idea how low-power the EFM32 family really is. But let's start from the beginning.

The device uses Figaro TGS 5042 carbon monoxide sensor. The datasheet says that the max response for even small CO gas concentrations is around 60 sec. In large CO concentrations, for instance over 500 ppm, the sensor response time is only couple of seconds (if you missed the short movie in which I tested the sensor in a jar filled with CO, you can check it in my previous post). So, the whole device should be in some sleep mode. And here starts the fun! The EFM32 chip's EM4 (Standby mode) comes very handy. In this mode - according to Energy Micro data - chip draws only 20 nA. But I needed to implement some extra functionality. The Giant Gecko comes with RTC and BURTC (BackUp RTC). BURTC can operate in EM4 and wake up the chip when time compare event occurs. Ultra Low Frequency Clock (internal - 2 kHz) can be used with the BURTC in order to use as little energy as possible. This clock is usually not exactly 2 kHz, so if you would like to use it in your application, you should calibrate it with the oscilloscope and check the temperature stability data in the datasheet to get the best possible time accuracy.

Having the BURTC to wake up the processor every 60 seconds to check the CO sensor response is one thing, but the CO detectors usually do have the TEST button. Thus, EFM32 Giant Gecko also provides the possibility to wake up the processor from EM4 with an external pin interrupt (apart from the reset pin) and this is exactly what I have implemented. To sum up: the device is in the most energy friendly mode EM4 for approximately 60 seconds or less, if one press the TEST button.

After a wake up, EFM32 checks the CO gas concentration and: if the concentration is higher than some threshold level (right how I set it on 35 ppm) or the wakeup is a result of the TEST button, the value in ppm is presented on LCD; if the TEST button was not pressed of the concentration is lower than the threshold, the result is not being displayed. Regardless of the case, the EFM32 goes into EM4 again. Below you can check two graphs, which represents the current consumption from the mentioned cases.

image

image

The average current consumption in the first case is around 2.4 uA and in the second case only around 400 nA. Is it even close to what you have guessed? In the next graph you can check the close up of current consumption between the wake up and going back to EM4 (case where the ppm value is being displayed). The whole action takes around 1.35 sec. The average current consumption in this time is around 80 uA.

image

80 uA is not so little for the energy harvesting power supply, but since this occurs only once every 60 seconds and takes 1.35 sec, it is bearable. Nevertheless, it could have been far more than 80 uA – even couple of mA. The reason why the value is so low is that some other energy friendly coding, functionality and other energy modes were implemented.

Shortly, I will try to post what exactly the microcontroller does in this 1.35 sec and which features were used. Also I will tidy up the code and post it somewhere for you to check it.

  • Sign in to reply
  • vsluiter
    vsluiter over 12 years ago

    Very, very nice post. Energy Harvesting applications make you try to push your system to the limits, and using EnergyMode4 is the lowest limit!

    From the energy modes demo I had only seen that it would just sit in EM4, and never wake up again unless you'd press reset. I hadn't realized that the BURTC could also wake up from EM4. That could be a nice feature for my project as well.

    Looking at your current graphs, I see a lot of current consumption on wakeup and going to sleep. What is the cause of that? Since your application has very long resting times you might want to take a look at the effect lowering the clock speed. Although you're going to spend longer calculating stuff, you'll be using less energy while calculating.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • 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