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
Digital Fever
  • Challenges & Projects
  • Project14
  • Digital Fever
  • More
  • Cancel
Digital Fever
Blog Cost Reduction Project - Using PSoC device to replace external logic/devices
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Digital Fever to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: genebren
  • Date Created: 15 Apr 2021 6:42 PM Date Created
  • Views 1006 views
  • Likes 11 likes
  • Comments 5 comments
Related
Recommended

Cost Reduction Project - Using PSoC device to replace external logic/devices

genebren
genebren
15 Apr 2021

Note:  Time ran out on me in this competition, but I wanted to thank tariq.ahmad and the element14 group for selecting my proposal and sending me the Cypress CY8CKIT-043CY8CKIT-043.  I am disappointed that I was unable to complete my entry at this time, but I do intend to follow up on this project and post some updates as I get further along on this.

 

When the Digital Fever project14 contest was announced, with the ability to receive a free CYPRESS - INFINEON TECHNOLOGIES  CY8CKIT-043CY8CKIT-043 board, I replied with the following:

 

"I have been thinking about improving an existing design that I have been producing for a few years now.  The product produces multiple PWM channels for driving servos.  The product currently uses a timer to generate two PWM signals that are then demultiplexed into ether 6 of 12 PWM channels, depending on the board type.  While the timing is pretty good, there still is a bit of jitter due to some resource contention and interrupt delays.  I was thinking about trying out the PSoC devices to generate the multiple PWM signals and potentially also replace the onboard processor (ATmega328PB).  The plan would be to reduce my parts cost and assembly time while improving my device's performance. So a PSoC 4200 would be an excellent platform to allow me to learn a bit more about these cleaver little devices."

 

As a result, I received one of the CY8CKIT-043CY8CKIT-043 boards and started my journey into the wonders of the Cypress PSoC devices.  Although I have know about these parts and even had a small collection of development kits and parts, I had never fully committed to actually using one of these parts in a project.  Well, it was time for that to change.

 

Let start out by looking at the existing schematic and BOM.

 

image

The boxed in regions represent the areas of the schematic that need to change in this effort.

  1. The 'Orange box' is the programmable LED dimmer circuit.  The main part is a TLC59731DR by Texas Instruments.  This part is a 3-channel, 8 bit, PWM LED Driver with a Single-Wire Interface (EasySet).  In addition to this chip, I am using one half of a dual P-channel MOSFET (BSD223PH6327XTSA1CT) as an inverter for the serial programming stream and a higher power P-channel MOSFET (PMN52XPX) to provide a flash function (much quicker than reprogramming the LEDs on/off). Note: there will be some added cost in the conversion of this circuit as I will need to supply drivers for the LEDs as the the peak currents can be as high as 50mA per LED.
  2. The 'Red box' is the 2 to 12 channel demultiplexer that uses to PWM channels (from a single counter/timer of the ATmega328PB processor) to generate the 12 Servo output signals.  This circuit uses 6 dual P-channel MOSFET (BSD223PH6327XTSA1CT) and 24 resistors (12 1K and 12 220) (Note: the 220 Ohm resistors are current limiters to protect the outputs and may be needed in the new design).
  3. The 'Blue box' is the current processor (ATmega328PB) that will be replaced by the PSoC device.

 

image

Looking through the BOM, the items that could be removed are as follows:

 

image

 

The cost reduction of $4.7858 doesn't even cover the entry point pricing for the part specifications that I need (Min 8K RAM and 4200M class programmable digital).  But cost isn't the only factor, the assembly time for 20+ less components is also an important factor.  It usually takes me 1-2 hours of time to just place the components onto the board, any reduction in time is also an important saving.  The numbers still might be worth looking forward into this plan.

 

After loading up all of the development software and getting familiar with the environment, I jumped in and starting playing with the programmable logic side of the puzzle.  An what a puzzle it was.  The development reminds me of the earlier attempts of logic design in CPLDs and small FPGAs.  You build some logic, run the fitter, look at the reports (and/or failures) and then to try it again (and again......).  Having the design leverage the bigger blocks (SCB and TCPWM) seemed to be the way to go.  Using lower level logic seemed to eat up valuable resources much too quickly.  Here is the final top level design that seemed to address most of my needs.

 

image

I used the same markup colors to help define the design.

 

  1. The 'Orange box' is the LED dimmer design.  This design, could allow me to use 16-bit dimming command, but to retain backwards compatibility with my prior design (especially in the DMX definition of channel slots), I will happily use 8-bit dimming.  As mentioned above, I will also need to supply drivers for the channels to reach the ~50mA per channel (eating into my cost a bit).
  2. The 'Red box' is the 12 channels of Servo output signals.  The Interrupts allow for the processor to service the PWM devices and Demuliplexer switching.
  3. The 'Blue box(es)' represent the logic that is need to provide the minimum level of functionality needed to replace the ATmega328PB processor.  The configuration port is currently used to assist in testing, allowing me to send simple commands to the device to exercise the PWM signals.

 

The LED dimming and the servo output pulses are fulling tested and working.  Where I ran into issues where in the development of the DMX receiver function.  I have roughly ported some of my existing code, but I failed to get it all function properly. I plan on updating this post as I get further along on this project.

 

In general, I was very impressed with the Cypress PSoC product and development environment, but I do think that I might need to further research their PSoC product offerings and hopefully find a better match (cost, pin count and capabilities) in order to make this project successful. It was quite a leap of faith to use these PSoC parts, as I really like to be a register level type of designer, typically doing bare metal type of coding.  The software wrappers over the registers (way too many 'ifdef's)  and the huge amount of resisters in general made it very difficult for me to get as comfortable with these parts as I would like to be.  The limited areas of protected code spaces (#START/#END) made it a little difficult to adapt some of the software wrappers for the levels of interaction of components that I needed. The whole bootloader scared me from even consider writing my own bootloader (which a area were I am usually pretty comfortable working in).

 

Thank you again to element14 for the opportunity to try out this PSOC development board and I look forward to digging into these parts as soon as possible.  Best of luck to members who were able to complete their projects for this contest!

  • Sign in to reply

Top Comments

  • shabaz
    shabaz over 4 years ago +1
    Hi Gene, Interesting idea, to re-implement with this device. I've not used PSoC so far either, so it's interesting to hear about experiences. It reminds me of some parts that used to be available, which…
  • Jan Cumps
    Jan Cumps over 4 years ago +1
    There's a new development environment for the PSoCs: ModusToolbox. I've used it with PSoC6 and like it. The workflow to configure the onboard hardware is different.
  • Jan Cumps
    Jan Cumps over 4 years ago in reply to genebren +1
    It will not work for your device. It supports a set of PSoC4 boards, but newer ones.
Parents
  • Jan Cumps
    Jan Cumps over 4 years ago

    There's a new development environment for the PSoCs: ModusToolbox.

    I've used it with PSoC6 and like it. The workflow to configure the onboard hardware is different.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • Jan Cumps
    Jan Cumps over 4 years ago

    There's a new development environment for the PSoCs: ModusToolbox.

    I've used it with PSoC6 and like it. The workflow to configure the onboard hardware is different.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • genebren
    genebren over 4 years ago in reply to Jan Cumps

    Thanks Jan Cumps , I will have to look into that.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 4 years ago in reply to genebren

    It will not work for your device. It supports a set of PSoC4 boards, but newer ones.

    • Cancel
    • Vote Up +1 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