cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

luisji
New Contributor

In electro-tech-online I asked about my need of making a device wich could generate a sinusoidal signal (by PWM method) with a 18F4550 Ucontroller, but it seem it is not possible. Someone named Dana suggested me to see the information about this cypress device.  So, the questions are:

1. Is it possible to make a threephasic 5 KHz signal (3 120 degrees unphased signals), wich could be used by a power stage to handle about 1 ampere each branch in some kind of power transistors?

2. If the signal is analog, is it a way to isolate the control stage from the power stage?

3. Is it possible to stop or restart this signals with a Ucontroller signal?    Or further, to control amplitude?

4. Do this device is sold and there are existences now on Mouser, Arrow or DigiKey?

Thank you for your time

Luis

 

0 Likes
1 Solution
odissey1
Honored Contributor II

luisj,

Attached a demo project showing ANALOG 3-phase output of the sine waveform with variable frequency and amplitude. Note that this is not digital output, which is used with BLDC controllers. To obtain 3-phase 12Vx1A output using this approach you need additional external power amplifier. 

Project uses DMA to transfer sine data from RAM buffer to VDAC_1, 2, 3 to produce 120-degree shifted sine voltage. The number of the sample points in the sine waveform can be varied, making 12,24,36,48... steps per period.

Frequency range [1kHz to 10kHz], resolution 32-bit (~0.01 Hz)
Amplitude range [0V to 4V p-p], resolution 8-bit (~0.015V)

Frequency adjustment achieved using DDS32 as DMA clock
Amplitude adjustment achieved by re-calculating RAM Buffer values

A Rotary Encoder is used to adjust frequency and amplitude.

 

Project uses several custom components:

DDS_sw 0.0_beta (included in the project)

DDS32 v0.1 - 32-bit-DDS-arbitrary-frequency-generator-component

QuadDec_SW 0.1 - Quad Decoder with Button Switchfor rotary shaft encoders

PSoC Annotation Library 1.0 

Sync32 v0.0 - Sync32 custom component for PSoC5 and PSoC4

 

This video tutorial shows how to Add Library Dependencies to the project:

Tutorial - Adding  Library dependency.png

/odissey1

Figure 1. Project schematic.

DMA_3phase_VDAC_01b_A36.png

Figure 2. Rotary encoder to update frequency (or amplitude).

DMA_3phase_VDAC_01b_EncF.png

Figure 3. KIT-059 project annotation using PSoC Annotation Library v1.0 

DMA_3phase_VDAC_01b_KIT-059.png

Figure 4. CY8CKIT-059 board actual pinout.

DMA_3phase_VDAC_01b_P.jpg

Figure 5. Scope traces: Yellow - reference; Cyan, Magenta and Blue - 3x120deg  sine, 36 points/period,  5kHz, 4V p-p. 

DMA_3phase_VDAC_01b_D_5kHz.png

View solution in original post

0 Likes
28 Replies
luisji
New Contributor

What means PSoC?

0 Likes
Len_CONSULTRON
Honored Contributor II

Luis,

Programmable System oChip

In the case of the Cypress PSoC not only does it have a CPU (in this case an ARM) it also have peripheral resources that can be programmed by the designer as needed by the specific application.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
Len_CONSULTRON
Honored Contributor II

Luis,

I believe it is possible.

Cypress already has a BLDC reference design using a PSoC4.   Here is a link to info about this reference design and the equipment it uses.  applications/motor-control/brushless-dc-motor-bldc 

You want to use the CY8CKIT-059 which uses a PSoC5LP.   I believe the PSoC5LP is a more capable device than the PSoC4.  I believe the BLDC reference design can be converted to use the PSoC5LP.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
odissey1
Honored Contributor II

louisji,

It is definitely possible to make a 3-phase SPWM controller using PSoC5. See, for example, this example

Sine wave generation using WaveGen and PWM (SPWM)

The demo gives an example of the single-phase SPWM digital output, which can control the power stage. 

The demo can be further modified fo produce 3-phase output. And to make a power supply it has to be complemented with an H-bridge.

So, it is surely possible, but will require some knowledge of PSoC programming.

I also recommend reading this App note AN76439 - PSoC® 3 and PSoC 5LP - Phase-Shift Full-Bridge Modulation and Control 

/odissey1

P.S. The DigiKey part number for CY8CKIT-059 is 428-3390-ND.

WaveGen_PWM_02a_basic_cA.png

luisji
New Contributor

First, thank you to Len_Cons and Oddisey1 for your comments.  I need a sinusoidal threephasic signal about 1 ampere each branch (3 amps for all), so I first had thought on swithching 3 pins of a 18F4550 respect a clock made with interruptions.  I though this hardware was enough, I did the design of the circuit and at the time of programming, the clock didn't was enough, far away of the speed I needed for a 5 KHz signal. Then somebody suggested me this as a module, so I'm considering to let the circuit very simmilar, but the power stage was some IGBTs optocoupled to the Ucontroller. 

So, if this module can give me a SPWM signal, I could connect it to the 4550 and then to the optocoupler, but if it gives me the Sinusoidal signal, maybe it would be easier, as I ommit the filter to get the sinusoidal from the SPWM, although I would have to know how to amplify this signal from your CY8Kit and how to isolate it if possible, from high current or voltage of the power stage.  I don't need any feedback, it is not a motor, it is just a resonant device, which I have to tune respect my phisical part.  So I'll need:  1. To start and stop from the 4550, 2. to tune it, moving the frequency maybe 10% respect a center data. (This is just one time on the device's life) 3. It would be great if I could handle ampitude from the 4550.   

This imply a way of being comunicated, maybe I2C, or some serial signal.   I want to read 3 ADCs and some digital signals with the 4550.  I have programmed with basic and a little with C, so I expect not to have many problems with a propietary language. 

So every help you could give me to make this work, I'd thank  you a lot.     I'm thinking of buying the kit from mouser or digikey, but I'd preffer to be sure that I can put to work this two devices together, and that it will be an easier and faster way of achieving what I want.     It is not a large production design, but if it works well, it could be repeated some hundreds of times.

Thank you again.

Luis

0 Likes
odissey1
Honored Contributor II

luis,

The PSoC5 has 4x8-bit DACs, capable of generating phase-shifted analog sine outputs in 0-4V, <10mA range. It will need some emitter follower or power Opamp to boost it to 1A.

       It is not clear, why 18F4550 is needed here, as PSoC5 is more powerful chip, and can handle all other functionality of 18F4550 as well. Using a single chip will simplify design, so no need for i2c/UART or comm protocol development.

0 Likes
luisji
New Contributor

Thank's Oddisay1

DESCRIPTION OF MY CIRCUIT:
See the image enr1_esq1.png  (if you prefer the proteus document, I can send you it)
Begining with the LCD display, down of it is the connector J13 which will have the cables to connect it. At right, the batteries and connections to get 17 volts, needed on optocoouplers-drivers. Down the J13 are the 3 IGBTs (1 per phase) which are the power stage. At left, the optocouplers-drivers.

At bottom, two regulator kits, 5V and 3 V, since the sensors connected via I2C need this voltage. Near, the reset button at MCCLR pin.

bottom down of the uController is a relay for a water pump (the one I had). A little up the driver for a stepper motor ULN2003A. Left &up the connectors for some magnetic switches J9 and J10.

Up and left, the sensors por pression connected via I2C. then a led witness of the program working, up the cristal.

Finally, we have two more sensors, to be readed by ADCs and at the end the USB, which for now is not going to be used.
-------------

THE THING TO BE SOLVED

So, this is what I have now, but with the surprise that clock isn't enough to switch my signals.

Then appeared the fact of thinking on CY8kit- as an attached module who solves the 3 phase - signal. This fix the problem although it needs to solve the communication between both processors.

Then, you propose to use only the CY8kit for solving all the functions of the system.
----------------
TWO WAYS

So, I see two possible ways, but it is needed prioritary to think on TIME to solve all that:
1. Continue the project with the CY8kit as a module and solve the communication for: a) start and stop from the 18F4550 program b) tune the physical system (just one time). This implies to read a 20 rounds potentiometer with an ADC and move the frequency of the 3 phase signal between a range about + - 250 Hz c) Optionally to move amplitude between 50 - 100%.
So, a) is a switch function b) is an ADC and c) is a program data which could be communicated as a 256 bit range, some way

2. If we trash the 18F4550, then we must remake the circuit, so it can solve all the needs of design you can see in the original circuit. Then next questions:
2.1 How can I interface this uController to all these devices shown in the previous circuit? I understand I'd make a simmilar circuit but connected to this new uController but I don't know where I will connect them and how.
2.2. How can I build the signal I need? (about 5 KHz, 3 phase, about 1 ampere each branch. You say by shift of phase, but I have not understood well after seeing the document you told me. Maybe there is another document to study this.
2.3. I understand I have to learn the way of programming, transferring the program to the uController (I had the pickit 3 for it for the microchip devices), and debugging, but I'd expect some help, some examples with simmilar problems, etc.
2.4 As you know your system and seeing the options described, which way you see could use less time, 2.4.1 to communicate both processors, making CY8kit a module of the previous project or 2.4.2 migrate all the project to the CY8kit?

In both cases, I need some assistance to replace the IGBTs that were there because the system should have worked switching a squared PWM signal, but if we will have 3 almost sinusoidal DAC signals, will need another components to amplify, and if possible, to isolate control signals of power.

If the answer is 2.4.1, (because I'm a little late on finishing the project), we can think on presenting the project and later, as next step, to do the migration of 2.4.2, but the thing is to minimize the project time as it be possible, because this is the requisite for me for receiving some funding that I want to receive a.s.a.p. Please see project_flow image.png

 

0 Likes
odissey1
Honored Contributor II

luisj,

uC selection is a part of system architecture design, and, PIC18 had, apparently, met a roadblock (not enough speed). I am not familiar  with PICs, so can only state that PSoC5 can handle all functions you described. However, if application is price-sensitive, you should keep in mind the cost of the uC, and PSoC5 is on the high end (~$20).

On your schematic I was mostly interested to see the high power section, and it is, apparently, a switched 600V x 20A IGBT stage, which needs PWM control, and not analog. To further confusion, it appears that it doesn't suit your needs. I believe that you have to decide first on that power section of the schematic, and only then proceed with uC selection. 

As I pointed out, PSoC5 has examples for SPWM, LCD, USB-UART, etc., which we can help to speed-up and modify if necessary. I further believe that placing two microcontrollers on the board is wrong direction. You might be lucky to find some of-the-shelf driver instead.   

To help you further please decide on the power section first. I also recommend buying a  PSoC5LP CY8CKIT-059 Prototyping Board for evaluation.

/odissey1

0 Likes
luisji
New Contributor

Odissey1

First, thank you for your time and help.

> it appears that it doesn't suit your needs.
In the schematic it is not the filter to convert PWM in continuous, maybe a Sallen-Key.  Certainly, I need too a bridge (duplicating IGBTs) to complete the negative part of the signal, that originally was in a complementary circuit and it is omitted in this schematic,  but with these exceptions, it should suit my needs.
The specific power need is 1 ampere per branch, so please don't stop for this item. I suppose I'll need a transistor and a power transistor to achieve it, but if you have solved simmilar examples, I would study them

> PSoC5 has examples for SPWM
Could you help me pointing one who be simmilar to what I need, 5 KHz sine?

In the PIC I have a lot of pins with diferent functions, as ADCs, or general I/O digital pins. Where can I connect what you saw in the schematic, if having the PSoc5? (https://www.digikey.com.mx/en/products/detail/CY8CKIT-059/428-3390-ND/5184557?WT.z_cid=ref_netcompon...)

> Placing two microcontrollers... wrong direction
What can be achieved with LESS TIME?
1 * communicate two microcontrollers or
2 * migrating all (and learn how to use your microcontoller and your programming system) If you are going to give me the problem solved, electronics and program, obvious this would be less time, but if you expect I learn to handle all the related cypress technolgy and I solve it for my needs, I'm not sure it be faster. Please try to 'be on my shoes' cause it could be a big odissey to complete it.

> To help you further please decide on the power section first.
It is decided and explicit, so please proceed with the next step. If I have the 3 phase signal at the needed frequency and I can tune it, it is all I need, as soon as possible.

Thank you for all your time and attention helping me to solve this.
Luis Jiménez

 

0 Likes
odissey1
Honored Contributor II

Louisji,

The solutions for SPWM and analog sine are quite different. From your description and the schematic, I suspect that you need a SPWM with full bridge, and not the analog drive. 

    You keep concentrating on small issues, but I need to see your power stage design before recommending any further. If it is a resonant converter with a 3-phase transformer, it is likely a SPWM that you need. Find suitable driver, they are plenty, and already in a single chip - no external IGBTs or filters are required. Then the only step is needed to attach the PSoC.

     Is I said, PSoC5 can handle both low-current SPWM and analog outputs. And, unlike PIC, the pins can be re-assigned (almost) to any position programmatically. In any way, if you is going to use a PSoC you have to learn how to program it.

0 Likes
luisji
New Contributor

Odissey1

Thank you for your patience.

Effectively, the original plan for one sine was a full bridge to invert the signal and even with a death time of abut 30 mS to avoid shortcut,  but for 3 phase is something I'm studying  yet.    

I'd like to propose that you help me as follows: 

Objective: What I have to achieve is the best possible near 4.7 KHz (adjustable)  3 phase signal for a 1 ampere current for each branch, for a total of 3 amperes, working in a resonant system whithout feedback.  As an optional objective, if each signal can be fine tunned independently, it would be better.   

Help:  1. What power stage you know is better and then what configuration of the PsoC5 I'd have to do for it?

2.  see the image of the kit (https://www.digikey.com.mx/en/products/detail/CY8CKIT-059/428-3390-ND/5184557?WT.z_cid=ref_netcompon...) (for this doc = CY8) and I have no idea of what to do with that device to replicate (exception made of the 3 phase signal, that I know it is wrong there) the sensing and handling signals, with the CY8 circuit.   I don't know how to program and write the device, do I need a programer?, is it possible by USB? 

3. As I told you, It seems to me that it could be faster for me to use the CY8 as a module, but otherwise, I need to know how to connect, use and program all the components for this system if I use only the CY8.   In fact, I'm ordering today the kit, but I need  your help to put it to work.  But do ONE KIT CY8 is enough to do the 3 phase signal needed?  Because the examples I see on AN76439 are for one signal, not 3. How can I generate the other 120 degrees shifted signals?  

Thank you very much

Luis J

 

0 Likes
odissey1
Honored Contributor II

luisji,

1. Please take a look on this 3-phase PMIC from TI (DRV8312 and similar). Is this something, which may suit your goal? What power output are you looking for? It has pretty much all, just supply PWM from the uC. 

2. The CY8CKIT-059 Prototyping board can be plugged directly into USB port, no other hardware is needed. It comes with break-out Kit Programmer. The software (Cypress Creator 4.4) is free, you can download and study it w/o the board.

3. Once you receive the board, let me know. I will draft some 3-phase PWM demo. I believe that I have some other demos for LCD, buttons or rotary encoder. You may consider controlling the  unit using UART, which is less work (no need for LCD or buttons).

/odissey1

Attached is 3-phase driver datasheet from TI. Check similar DRV8316, DRV8332, DRV8320.

 

0 Likes
luisji
New Contributor

I'm studying the drivers options, so I'll  buy them together with the uController in order to buy them in the same delivering, the CY8. and drivers. I'll send you copy.  Respect power, I know the circuit is a capacitive one, so I'm reviewing if I need a coil to compensate Reactance and achieve resonance.  I have understood that it consumes 1 ampere by  phase,  so this is my assumption, but real measurements will be when I have built the circuit.  Do you know if the  TI DRV8312  needs heat sink and if so, what kind?

So, the signal that the uController CY8 generates is a continuos signal or a PWM signal? 

So this device replace even the power transistors!  I thought it was an intermediate stage.

Thank you for your advice.

0 Likes
odissey1
Honored Contributor II

luisji,

I believe the driver DRV8312 is surface-mounted on PCB, no heatsink needed. There should be a section in the datasheet, covering thermals. Good practice is to make single-sided PCB and place it on some heat-sink through a thermal pad.

The driver is PWM-driven, it has 6 digital inputs to control the output, which can be provided by PSoC5. It is possible that TI has a demo board for similar driver. I recommend start with a demo board if your budget permits. There are other low-cost boards, but I have no idea what power rating do you need. Can you use simple BLDC motor driver?

Can you provide a datasheet of the resonant device, which you intend to drive? I thought is is a 3-phase transformer that need to be driven. The key parameter here is power rating, so there was my question: how much power do you need? Say, at 9A total and 30V it becomes 270W. Is that enough? Basically, what I am asking is do you need a 3A x 5V driver or 3A x 500V driver.

/odissey1

0 Likes
luisji
New Contributor

Odissey1

> driver DRV8312
I checked in digikey, mouser and arrow, the ones with wich I have some familiarity, and only arrow have some simmilar drivers, but no this one. So I'm trying reading documentation about it.

> single-sided PCB and place it on some heat-sink through a thermal pad.
I'll take it into account.

> The driver is PWM-driven, it has 6 digital inputs to control the output,
So, I suppose, It could be three pwm and 3 bridge changers? Or how do I make the signals?

> a demo board for similar driver.
Do this includes their uProcessor or it would need the CY8?

> I recommend start with a demo board...
I'm trying to follow all your recomendations

> what power rating do you need.
As I told you 1 ampere, if at the end it varies, it would be between the range of 10%.

> Can you use simple BLDC motor driver?
I need sine signals at about 5 KHz, if this driver do that, It could work.

> Can you provide a datasheet of the resonant device
No, it is like a handcraft. As it work I'll share all the information, you will not regret.

> I thought is is a 3-phase transformer
Not an inductive but capacitive circuit. That's why maybe I need to add some coils to compensate reactance.

> how much power do you need?
1 ampere x 3, at 12 Volts. I know it is not linear, but depending of reactance, what I do know is that it won't use more than about 1 ampere by each branch

> do you need a 3A x 5V driver or 3A x 500V driver.
3A x 12 V is my specification. I rode that the TI driver has overcurrent protection, that is wonderful because if when it be resonant, I'd have some limit to current. I'd like to make a one package buying, but arrow has some simmilar drivers and have not the cy8ckit, digikey have the cy8ckit but neither the exact driver. I went to see the TI site, typed what I want to do and it listed 25,000 articles, but there the solutions exclude cypress kit. I'd finish studying that in about 20 years from now. That's why I ask for support, it is so much information, and being me in some way late, that's why your orientation is important.

 

Thank you

Luis

 

0 Likes
luisji
New Contributor

I tryed to get support from texas instruments, but they have the requisite of a 'business email', that I have not.  Maybe  you could send my question to them.  Considering such a mountain of information they have, I just want them that one expert suggest a good driver solution for this problem, (sine wave 3-phase, 5 KHz, tunnable, no feedback, 1 ampere per branch) including that the driver they suggest be in stock in digikey, mouser or arrow.   I really want to define what to buy and go further, but the lack of information has stopped me.   Thank you for your time and patience. 

Luis

 

0 Likes
luisji
New Contributor

In digikey there is the DRV8350RSRGZT driver (https://www.digikey.com.mx/es/products/filter/pmic-impulsores-de-motor-controladores/744?s=N4IgjCBco...   so, if you know that this device can help me to achieve the objective, I'm buying it as long as you confirm me it, together with the cy8.    The Gate driver power supply voltage (VM) min 9,  max 75 V.   My power supply is 12 volts, so it is on range, but as I don't know this device, I don't know if I'll need a higher voltage to use this device.    So If you think we can proceed with these two components, let me know it.

Luis

Luis

0 Likes
odissey1
Honored Contributor II

luisj,

the DRV8350 is a high-voltage (100V) low current (50-1000 mA) driver. It mentions sinusoid and trapezoid current control. Its max PWM frequency (200 kHz) may be OK for 50Hz sine, but not so for 5kHz, which leaves trapezoid option only. The current rating is more appropriate for maybe ~500mA operation. 

What do you think about simple BLDC driver board like this BLDC-SHIELD_IFX007T . There are many similar low-cost BLDC drivers on the internet. I recommend experimenting with some of-the shelf hardware prior to designing the PCB. This is a quick way to evaluate the approach.

Are you OK with trapezoid control or sine is strict requirement. It is my understanding that triple-phase automatically assumes either motor or a transformer load, which automatically filters out high frequency content.  

 

0 Likes
luisji
New Contributor

Odissey1

> the DRV8350 ... leaves trapezoid option only.
The specification I'm following says sine wave, so I don't want to leave the 'sure way' about it.

> simple BLDC driver board like this BLDC-SHIELD_IFX007T .It looks beautiful, but its price is a little high ($45 dlls) for latinamerican standards. I'd preffer to put proteus to work and make a simmilar circuit, with about $5 dlls of components. But, if you think this way is a must, I'd have to loose my love to this quantity. Or maybe there are cheaper simmilar boards. As I'm not expert, I could look for several, and put them to your consideration.

> ...experimenting with some of-the shelf hardware
I have more time than money, but if I don't find any better, I'd buy the board

> Are you OK with trapezoid control
No

> It is my understanding that triple-phase automatically assumes either motor or a transformer load, which automatically filters out high frequency content.
But this is a capacitive system, maybe I'll have to experiment with coils to tune it, but at first aproach, it could be exclusively a capacitive circuit.

So let me look for more boards or solutions, although I'm in a hurry, but anyway I'll have to do what is needed to do.

Thank you

Luis

0 Likes
luisji
New Contributor

Odissey1

I looked for motor control boards and I didn't find another better option.  I have tryied to buy in digikey the cy8 and the infineon board, but on the second product there is an error in their virtual store, that I hope it be solved soon, so I suppose I'll have them with me in about 3 or 4 days.  I'll be studying their documentation.

Luis

 

0 Likes
odissey1
Honored Contributor II

luisj,

Attached a demo project showing ANALOG 3-phase output of the sine waveform with variable frequency and amplitude. Note that this is not digital output, which is used with BLDC controllers. To obtain 3-phase 12Vx1A output using this approach you need additional external power amplifier. 

Project uses DMA to transfer sine data from RAM buffer to VDAC_1, 2, 3 to produce 120-degree shifted sine voltage. The number of the sample points in the sine waveform can be varied, making 12,24,36,48... steps per period.

Frequency range [1kHz to 10kHz], resolution 32-bit (~0.01 Hz)
Amplitude range [0V to 4V p-p], resolution 8-bit (~0.015V)

Frequency adjustment achieved using DDS32 as DMA clock
Amplitude adjustment achieved by re-calculating RAM Buffer values

A Rotary Encoder is used to adjust frequency and amplitude.

 

Project uses several custom components:

DDS_sw 0.0_beta (included in the project)

DDS32 v0.1 - 32-bit-DDS-arbitrary-frequency-generator-component

QuadDec_SW 0.1 - Quad Decoder with Button Switchfor rotary shaft encoders

PSoC Annotation Library 1.0 

Sync32 v0.0 - Sync32 custom component for PSoC5 and PSoC4

 

This video tutorial shows how to Add Library Dependencies to the project:

Tutorial - Adding  Library dependency.png

/odissey1

Figure 1. Project schematic.

DMA_3phase_VDAC_01b_A36.png

Figure 2. Rotary encoder to update frequency (or amplitude).

DMA_3phase_VDAC_01b_EncF.png

Figure 3. KIT-059 project annotation using PSoC Annotation Library v1.0 

DMA_3phase_VDAC_01b_KIT-059.png

Figure 4. CY8CKIT-059 board actual pinout.

DMA_3phase_VDAC_01b_P.jpg

Figure 5. Scope traces: Yellow - reference; Cyan, Magenta and Blue - 3x120deg  sine, 36 points/period,  5kHz, 4V p-p. 

DMA_3phase_VDAC_01b_D_5kHz.png

View solution in original post

0 Likes
odissey1
Honored Contributor II

luisj,

Attached is a simplified version of the above project, which demonstrates generation of the 3-phase analog 5kHz 4V p-p sine, 12 points per period. The project is almost the same as previous, except  it doesn't need any external libraries, which makes it easier to start with. It, however, won't let run-time adjustment of the frequency or amplitude, as there is neither encoder nor DDS generator available.

/odissey1 

DMA_3phase_VDAC_01b_KIT-059_basic.png

 

DMA_3phase_VDAC_01b_basic_D_5kHz__4V_12pt.png

0 Likes
luisji
New Contributor

thank you very much for this case solution, I'll not use feedback but I'll study how to take this as a base.  You say I'll need an extra power stage,  What kind of device you suggest?  Some FET? Have you some comments about it?

I'm barely solving the problem of buying to digikey, so I'd like to include this components.

So lets continue with this...

 

0 Likes
odissey1
Honored Contributor II

louisji,

No need for feedback. I suggest using private messaging on the forum (click my username, and scroll to the bottom to find button "send message"). 

Please note that example as are drafted using older version of the Cypress Creator 4.0. Current version of Creator is 4.4, if you use it, it may ask for some update actions. The Creator IDE can be downloaded for free at Cypress website. The KIT-059 may need download of some config file, which can be found on CY8CKIT-059 page.

Using analog sine approach needs a power stage to produce 1A per phase. PSoC output current is limited to 20mA per Opamp. Take a look on this Class D amplifier:

TPA6304 Class-D 4-channel, 45W and TPA6404

I drafted some other examples of digital PWM output, which is alternative to analog. I believe that it can be used with Infineon or TI trapezoid drivers to obtain sine output using 3-phase transformer. But let's discuss it later, when you have PSoC board

 

0 Likes
odissey1
Honored Contributor II

luisj,

Attached is a project, which demonstrates generation of the 3-phase PWM using 180-degree commutation scheme with tunable frequency and duty cycle. I believe that it is compatible with Infineon BLDC shield.

For more information regarding 180-degree modulation please check this video

Project uses a counter and a lookup table to commutate PWM into 3 outputs. All operation are performed in hardware.

Frequency range [1kHz to 10kHz], resolution 32-bit (~0.01 Hz)
Duty cycle range [0 to 255], resolution 8-bit

Frequency adjustment achieved using DDS32 as PWM clock. A Rotary Encoder is used to adjust frequency and amplitude.

 

Project uses several custom components:

DDS32 v0.1 - 32-bit-DDS-arbitrary-frequency-generator-component

QuadDec_SW 0.1 - Quad Decoder with Button Switchfor rotary shaft encoders

PSoC Annotation Library 1.0 

Sync32 v0.0 - Sync32 custom component for PSoC5 and PSoC4

/odissey1

Figure 1. Project schematic.

BLDC_02a_A.png

 

Figure 2. Output frequency control using rotary encoder.

DMA_3phase_VDAC_01b_EncF.png

Figure 3. KIT-059 project annotation using PSoC Annotation Library v1.0 

BLDC_02a_KIT-059.png

Figure 4. PWM outputs under 100% duty cycle: Yellow - PWMA, Cyan - PWMB, Magenta - PWMC, Blue - reference. Output frequency 5 kHz. 

BLDC_02a_D_100.png

Figure 5. PWM outputs under 50% duty cycle: Yellow - PWMA, Cyan - PWMB, Magenta - PWMC, Blue - reference. Output frequency 5 kHz. 

BLDC_02a_D_50.png

Figure 6. PWM outputs under 100% duty cycle: Yellow - PWMA, Cyan - PWMB, Blue - math difference PWMA-PWMB (sine-like).

BLDC_02a_D_A-B_100.png

0 Likes
odissey1
Honored Contributor II

luisji,

attached above is a demo project showing 3-phase generation using 180-degree commutation. The PHASEA, PHASEB and PHASEC can directly drive Infineon shield inputs (input IN of IFX007T).

The issue I see is very high PWM commutation speed: 5 kHz x 6 x 256 =  7.68 MHz, which IXF007 can't provide. Target range for IXF007T controller is ~50Hz, which is two orders of magnitude lower. This is why I recommended to use D-Class amplifier with analog inputs (see project above), which can commutate up to 2MHz outputs (but lower power).

/odissey1 

0 Likes
luisji
New Contributor

mi_CY8Kit-059.pngHello everybody

I thank very much to Oddisey1 who has been orientating me, but for now has not time to help me.  In the time of this project, I buyed the CY8CKIT-059 PSoC 5 -LTI- 059 and some ' Motor control shields with IFX007T' .  The last didn't work for me as they don't achive the 5 KHz, but anyway will be useful in the next project: an  inverter.   For now, I'm told to dive in the project : "DMA 3phase_VDAC_01b_basic-000.cywrk.Archive01.zip"  So I downloaded it, but It is the first project I'd run with a PSoC, and the project is there, but has not an explanation for beginners with PSoC.    Initially, it says that:   Error: prj.M0051: Unable to open the workspace "C:\Users\LUIS JIMENEZ\Desktop\1\p\EnergíaV\Asesoría\DMA 3phase_VDAC\DMA 3phase_VDAC_01b.cydsn\DMA 3phase_VDAC_01b-000.cywrk":  (Invalid character(s): í). Address the error and try again.   I suppose maybe I'd  have to eliminate 'í' with accent.

So, is there someone who could exlplain me the components of this project?  I know that I have to read what each component does, but I don't know why are they configured or connected as they are, or why these program components are there, or how can I addapt this to my project, which for now is just to generate a sinus signal at about 5 KHz, tunnable, not feedback.  That is  just what I need to solve.    Later I'll see power stage.    

0 Likes
odissey1
Honored Contributor II

luisj,

I recompiled projects using Creator 4.2. Check if works now. Start with basic version.

0 Likes