In today’s example project we are happy to release a great PSoC 4 reference design. This example is a demo solution to create your own Rice Cooker. With our previous examples in this series we focus on projects that have limited features, often having simple inputs driving defined outputs.
In this example project we seek to showcase a more complete solution, something more typical of an end product that one of our customers may create.
In this example we have the following pieces to the design:
- Temperature Measurement with Opamp
- Over current protection
- Temperature control
- Data transmission (UART)
- State Machine Control (Firmware)
- I2C Communication
- LCD Display
- User Interface
One of the key points to note is how the schematic view is organized in this example. This is unique to PSoC Creator and PSoC experience. Here the engineer was able to divide their hardware design, segmenting it into boxes, allowing for a more readable layout. Using the schematic design layout tools you can easily accomplish this type of organization. While it may take a little time to organize it is well worth the effort to have a readable format to pass to other members of a design team. This would be analogous to design practices in large firmware designs.
Forum Post Attachments:
At the bottom of this post we are including the following items:
- Example Project Zip File
- Project Images
The user can download the example project at the bottom of this post. The project uses the following list of Creator Components:
- SAR ADC
- Segment LCD
The main.c firmware is included in the example project. Please review the commented sections for more details.
We are not expecting this project to be a starting point for your example project, instead we are hoping to show you a more complex example project and how that project was designed and implemented.
You will first notice that with the main.c function we have very little code. This code is mainly calling our state machine to begin operating and moving through the various states of the Rice Cooker.
In the example you will see that many of the functions of the example have been pulled out into their own .h and .c files. This helps to organize your project into a more readable format. In this example the example project is governed by our state machine code. This state machine moves the application from action to action based on external inputs, either a temperature or some type of serial command. Based on the system characteristics the application will begin to perform different functions.
We don't want to spend a long time looking through the firmware, instead we want to stress the firmware organization via a state machine map. In these more complex systems the application code begins to resemble a real time operating system (RTOS), where actions are queued and the application code is processing actions based on interrupts and priorities. In this example we begin to see that type of design.
Please feel free to walk through the various functions and firmware files to understand and study this example.
Please review the schematic capture for the example project. In that project we have listed numerous external components and the component values.
Test Your Project:
This project is not necessarily meant to be used with any kit, but more of an example of a more mature PSoC 4 design. This design may give you ideas for your own project and help you see how to stack complexity using the configurable hardware and generated source files for the various components.
I hope this example can help you in your design.