Im doing project on this topic, do any one have any idea about it?
The question that Im facing is that, why PSoC?
Interfacing PSoC with inverter and to a battery system.
We have generated the driving signal of 50Hz with your help.
Inverter circuit designing is completed. Now, the job of making the system intelligen is pending.
From the transformer output, signal is fedback to PSoC to pragram it. On the basis of some factors like over charge protection,under discharge protection,over load protection etc.
Can we do program in 8051 language on PSoC 3.
PSoC3 has 8051 based core, however the normal practice is to perform coding using C langauage which strengthened in PSoC Creator via APIs.
The intelligence that you intend to add to your project is easily achievalbe using PSoC3. There is an ADC, which can be coupled with Analog Mux to scan multiple channles. This way appropriate circuit can be built to monitor the conditions such as overcurrent, overvoltage/undervoltage protection etc. The conditions can be read out using ADC and AMUX APIs. The digitally read out values can be compared against standard values to verify occurance of a particular event(such as over current) and suitable actions can be taken(Ex: Turning of an external MOSFET using GPIO).
I hope this helps. Let us know if you need specific help related to PSoC3.
ADC and Analog MUX can be used for only the scanning, isn't?
Where is the comparison done and how can we do the action, that you mentioned.
Using ADC and MUX we can only evaluate only one parameter at a time, isn't it?
Can u just elabrate it?
The channels(input voltages) being monitored to can be connected to different Analog MUX inputs. The Analog MUX can then be routed to the ADC input. Note that ADC needs to be configured in multisample mode. Select a particular AMUX channel, Start ADC conversion, read the ADC data and store it in a buffer. Stop the ADC, Switch the AMUX channel, Start ADC conversion read the ADC data and store it as before. Repeat the same for all the analog input channels. Then you can perform the comparisons and calculations you intend to do. Since PSoC3 ADC will be running in few MHZ, you can have good amount of comparisons/calculations. I hope i have made it clear.
You told to save it to a buffer,in PSOC3 there is a tri state buffer BUFOE, can i use it.
And then I shud fed it to the comparator for comparison.
I need to interrupt the square wave output, follawing my comparison.
Wat can I do?
Can u send me if any particular changes have to b made on the configurations of used blocks.
By buffer, what i really meant was firmware buffer or an array in C program. The ADC data can be stored in an array. These digital values can then be compared against constant values and take necessary actions accordingly.
In your case the square characteristic can be changed based on the analog input. Hence the period or the compare value of the PWM component might have to be modified to get desired result.
In my project , now im dealing with overload protection. Ive done the circuit part and a voltage varying from 0V - 6V dc is to be fed to the PSOC.Input is then fed to Analog MUX+ ADC for conversion .
In the same project Iv done the PWM square wave of 50Hz.
I now need to monitor the dc input from the circuit.
As it reaches 6V, (ie; when overload occurs) the square wave output to the inverter circuit should be OFF. And the inverter is interrupted. Then as the the load is decreased, this 6V gets lowered and automatically the PWM shud deliver the square wave to ON the inverter.
One question can v program PSOC 3 and implement it in a particular circuit, like microcontrollers programmed to an IC and then used it in different circuits.
Plz rply to my prveous post too.
As suggested by U2, you should use a voltage divider (like resistor divider) to bring down the voltage by a known factor (like half the voltage).
So, in this case your voltage threshold where you want to switch will be 3V.
In case you are planning to use an ADC, you can use the API which converts the ADC counts to milli volts, ADC_CountsTo_mVolts( ).
You can compare the value obtained with 3000mV. When it exceeds, then take necessary action.
This method will make the CPU continuously compare the two values hence it will not be available for other operation.
Also make sure that the value of reference voltage used is selected correctly in the 'Voltage Configuration' tab.
This can be found here: .cydwr file > System > Voltage Configuration
How can we use ISR to interrupt the PWM can u tell us the steps
As its only mentioned in the configuration as derived, rising edge etc only
Connect an ISR component to the comparator and build the project. Once the project is built, isr.c and isr.h files are generated. Insert PWM_Stop() API, inside the isr.c file. See this post to better understand where to insert the code.
Once PWM is stopped, now monitor the comparator output, based on your comparator output you can take decision(bring back the PWM to operational state )
These are the steps you need to follow to use Interrupt in your project.
1) First drag an Interrupt component into the design and connect it to the interrupt terminal of the PWM as shown in the figure below.
2) Next in the PWM configuration tab, select the source of interrupt. In this case, i have chosen the Interrupt to occur on the terminal count event.
3) Build the project and the isr_1.c file is generated. Include the "PWM_1.h" file in the location which is between "Start of code" and "end".
4) In the CY_ISR(isr_1_Interrupt) write the statements which has to be executed in the ISR on every Interrupt trigger. Remember that this statement has to be written between the #Start and #End indicated.
Also, the Interrupt has to be cleared first by reading the Status Register of the PWM component used.
5) In the main.c, donot forget to uncomment the CYGlobalIntEnable, and also start the isr_1 component.
Once you follow these steps, you can get your Interrupt working. However you have to remember to declare the variables which you are using between the main.c and the ISR to be declared as extern.
Thanks for ur rply.
For my project I need to place the interrupt at the comparator or at the PWM.
Or u wer juzt showing how to work it.
Is there any change while it is placed at the comparator output.
You can place the Interrupt component at the Comparator's output depending upon your logic.
Set it to either Rising edge, Falling edge or Derived.
When using Interrupt along with Comparator, there is no necessity to read the Status Register upon Interrupt unlike in the case of PWM.
Other than that, all other configuration of Interrupt remains the same.
My final year xams are on 1st june.
I hav not done the work yet,that you have suggested.
Sorry..for that.By 13 th v vl work on it give u the feedback.