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#088 – Simulation of Gas Sensor
  • 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 2 replies
  • Subscribers 25 subscribers
  • Views 637 views
  • Users 0 members are here
Related

PSoC 4 Pioneer Kit Community Project#088 – Simulation of Gas Sensor

cy.wbz
cy.wbz over 12 years ago

Hello!

 

In yesterday’s example (#087) we show cased the Figaro TSG 5042 carbon monoxide gas sensor. When that example was first created there was an initial task of simulating the gas sensor to ensure that our design would interface correctly. It is common when you are in the lab or maker space to not have access to your external hardware, but there may be a need to unit test your design. In this example we are going to talk about how we simulated the sensor and validated our hardware design before we hooked up the sensor.

 

image

 

Forum Post Attachments:

 

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

  • Example Project Zip File
  • Project Images
  • Gas Sensor Datasheet
  • Excelsheet with data

 

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 (x2)
  • SAR ADC
  • UART
  • CyPins

 

Firmware Description:

 

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

 

For this example we had access to a power supply that allowed us to step up the current supplied to the PSoC. We used this supply as an input to our system. We then took data based on the values measured. Those values can be displayed on the UART output on a hyperterminal window for data collection.

 

For this example we used the same firmware written for the previous example (#087) but attached our current supply to the sensor input.

 

Once we had the sensor in hand we were able to measure the various values based on carbon monoxide values. We see that they correlated very closely to the theoretical values we collected with our test system.

 

image

 

Hardware Connections:

 

You will need to connect a couple of items for this example. First you will need to connect the bypass resistor (R1 503k ohms) and capacitor (C1 22uF).

 

Next connect the UART P4.1 pin to the P12.6 pin on the PSoC 5LP header.

 

Test Your Project:

 

Connect the hardware to the Pioneer board including capacitor, resistor and sensor. Next connect the UART bridge to the PSoC 4 board. Launch the hyperterminal software to view the data received from the Pioneer board. Adjust your current supply to view data over a range of supply values.

 

I hope this example can help you in your design.

 

Best,

Matt

Attachments:
3264.TIA.zip
4863.Project Images.zip
Gas sensor simulation- Results.zip
image5042pdf.pdf
  • Sign in to reply
  • Cancel
Parents
  • jesusantoniocar
    jesusantoniocar over 12 years ago

    Hello Matt.

    Thanks for this project.

    The PSoC 4200 has two op amps with Comparator modes which allow most common analog functions to be performed on-chip eliminating external components; PGAs, Voltage Buffers, Filters,Trans-Impedance Amplifiers, and other functions can be realized with external passives saving power, cost, and space. The on-chip op amps are designed with enough bandwidth to drive the Sample-and-Hold circuit of the ADC without requiring external buffering.

     

    best regards,

     

    Jesus Antonio.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • jesusantoniocar
    jesusantoniocar over 12 years ago

    Hello Matt.

    Thanks for this project.

    The PSoC 4200 has two op amps with Comparator modes which allow most common analog functions to be performed on-chip eliminating external components; PGAs, Voltage Buffers, Filters,Trans-Impedance Amplifiers, and other functions can be realized with external passives saving power, cost, and space. The on-chip op amps are designed with enough bandwidth to drive the Sample-and-Hold circuit of the ADC without requiring external buffering.

     

    best regards,

     

    Jesus Antonio.

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