Good day comrades!
Today I want to talk about my first and second applications for the PSoC 4. But we'll start with my new testing station.
On my small, but cosy workplace you can find:
- 23" PC monitor
- Multimeter (UNI-T UT61C)
- Drilling tool (Makita 8391)
- Soldering iron (NoName)
- Multitool (Gerber Suspension)
- Universal testing station
- Piece of russian nature outside the window
Let's learn more about by testing station:
I used this station for demonstration of my graduation project a few years ago, now I just modified it to work with PSoC and Arduino.
It consists of:
- A. Current shunt
- B. Power switch
- C. 2S LiPo (aka autonomous power supply)
- D. Breaboard
- E. Arduino Duemilanove (with ATmega328p)
- F. Part of my old MSP430 RF project
- G. MSP430 LaunchPad (with MSP430G2553)
- H. CY8CKIT-042 PSoC 4 Pioneer Kit
- I. LCD with I2C interface
My first application was traditionally HelloWorld. You can see it on the previous photo. I just connected PSoC 4 to LCD via I2C and sent a phrase "PSoC 4 is ready!".
However after some time of work this LCD went to another world... I found out the problem but this week I have not enough time to repair it
Meanwhile at the moment I start developping a new application.
Tricopter's firmware consists of some parts:
- UpTime system
- System of communication with the receiver
- UART module for configuration and telemetry
- Virtual EEPROM for work with configuration parameters
- IMU module (gyro, acc and mag).
- Communication module for BLDC ESC's and servo
- PID controller and so on
This week I start from p.1 and p.2 but I try to communicate the PSoC with PC via UART:
In this screenshot you can see the 'PSoC schematicos' of this application:
- Yellow: In my application I need two arduino funcitons: delay(ms) and micros(). So I create this 'yelow block' to calculate uptime (operation time). It looks simple but in PSoC 4 I found an interesting situation: we can only communicate clock-block output to clock input of any other blocks! For example I can't connect clock-block derectly to pin. But I found a solution! I read this article and add a TFF block to my application.
- Blue: As you know I like MultiWii 2.0 so I just rewrote RX.ino file for a PSoC.
As a result I managed to read all the necessary signals with Rx/Tx system and transfer them via the UART on the computer:
On forthcoming week I plan to realize all necessary UART functions and probably to communicate PSoC with standard MultiWii PC application. See you next week!
|1||PSoC 4 Tricopter Part #1||Introduction|
|2||PSoC 4 Tricopter Part #2||Purchase of components from Farnell and HobbyKing|
|3||PSoC 4 Tricopter Part #3||PSoC firmware: upTime & Rx|
|4||PSoC 4 Tricopter Part #4||PSoC firmware: UART & MultiWii GUI|
|5||PSoC 4 Tricopter Part #5||PSoC firmware: EEPROM emulation|
|6||PSoC 4 Tricopter Part #6||PSoC firmware: Servo & ESC control|
|7||PSoC 4 Tricopter Part #7||PSoC firmware: IMU, LED's & PID|
|8||PSoC 4 Tricopter Part #8||Hardware: PCB|
|9||PSoC 4 Tricopter Part #9||Hardware: tricopter's frame|
|10||PSoC 4 Tricopter Part #10||Hardware: YAW mechanics & motors|
|11||PSoC 4 Tricopter Part #11||Hardware: ESC's, wires & misc|
|12||PSoC 4 Tricopter Part #12||Final: The first fly|