Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Pic 16f876a Pure Sinewave inverter

Status
Not open for further replies.
There is nothing special in my test circuit. My method is building inverter on protoboard. So far I have two chips on it. The first one is 16F877A and the second one is MC14053. I am using "Voltage Source Inverter" scheme, which was posted here so many tines, so there is no need to post it once again.
Take a close look to the MCU.
1. First you need power 5VDC (VDD and VSS) MCLR over resistor to VDD.
2. 20MHz xtal
3. From RB4 Green LED over resistor 470 to GND (STATUS of the inverter)
4. From RB5 Red LED over resistor to GND (STATUS of the inverter)
5. From RC0 LED over resistor to GND (OE signal)
6. From RC1 LED over resistor to GND (A/B signal)
7. From RC2 LED over resistor to GND (PWM signal)
8. First input is RA0. Take a trimer potentiometer for example 5k, conect start pin to GND, end pin to VDD and slide pin to RA0. This is the way, how to get analog voltage from 0 to 5V.
9. Connect all other inputs like the first one and yor simple test circuit is finished.
With rotating sliders on trimer potentiometers for every analog input you have to get correct values of voltage, which are already posted few posts back. Take a instrument for measuring of the voltage to be sure to get real values.
This is the simpliest way to get output signals which can be watched on the scope.

Regards
 

Good evening

Thank you very much californiajoe!! The green led light is normal. I put trimmer 10K and I started to check the correct value. But when I was checking the signal
I noted a strange noise signal in PWM. I've attached some photos about this signal. I measured in 'Pin 1' & 'Pin 7' of LM393M and 'Pin A' (Output). Each few seconds
the oscilloscope show me the same signal but with more frecuency (look the picture). I don't want connect transformer up to the signal are perfect.
Why does it happen this?
 

Attachments

  • Photos.rar
    301.6 KB · Views: 640

I also noticed some aditional pulses in PWM but I don't care about them at this momment.
You should connect something else instead of transformer (powerful resistor or even better some light, 12V and 21W would be good). After that you can connect osciloscop on it.

Regards
 

Hi Californiajoe

I've connected a light 12V. The light shine, but the signal is the same. I attache pictures about output (A). You can see like it appear different frecuency each 8 seconds. I just want f= 50hz. What's the problem?I changed some capacitor and I used different PIC.
Do i connect the transformer?

Best regards
Daniel
 

Attachments

  • photos 2.rar
    77.1 KB · Views: 404

Don't connect the transformer (yet), connect some small power light. You should connect your osciloscop to points A and B (on light connection), but make sure first that power of the inverter is galvanic isolated from power of the osciloscop, otherwise you will damage output fets.

Regards
 

Ok, I don't connect the transformer, but I noticed that transistor Q3 y Q4 is very hot, but transistor Q1,Q2, Q5, Q6, Q7 y Q8 is cold. I connecte oscilloscope with probe to A and GND (of probe) to GND of inverter. I will revise my circuit.

NOTE: Also I connected GND of U3 and U4 to GND of inverter.

Thank you Californiajoe!
 

guys you should check your output by connecting oscilloscope between A and B, you cant check it with respect to the ground or some other reference, it will show you unfiltered output, to see the original output you must pass it through filter shown in the schematic.

daniello_85 use sinks for MOSFETS so your problem will be vanished, also handle these with care because your small mistake can damage those MOSFETS

---------- Post added at 02:44 PM ---------- Previous post was at 02:34 PM ----------

here is a PIC16 Simulator, just load your hex file and enjoy

https://cid-8d54ed2e5d95b17a.office.live.com/self.aspx/Softwares/PIC Simulator IDE 6.zip
 

Hi jami007!!

I've measured between Output A and Output B, the frecuency have changed but the values is more small, except one value that is 2.17Khz (See the picture).

**broken link removed**


I 've put heat sink over all MOSFET, but it's very strange that only Q3 & Q4 are hot. My problem started with pin 13 (PWM), the frecuency is 20KHz but it appear a over signail (look the video), so I think the problem is found near of PIC.

Jami007 do you think that I should connect the transformer and the filter in the secundary of transformer??

I will try with PIC Simulator. Thank you very much jami007 & californiajoe and of course Taner, I'm learning a lot!!!

Best regards
Daniel
 

NOTE: Also I connected GND of U3 and U4 to GND of inverter.

daniello_85, you should leave the ground of these drivers connected to the sources of the (high side) Fet's, as in the schematic.
So, not to GND of the inverter circuit.
At.
 

Hi @t!
Thank you very much for your reply. If I don't connect GND of U3 and U4 to GND of inverter, my inverter doesn't work, I've modified the values of analog input with trimmer but the inverter doesn't work. I need to connect to GND.

Also I think that this connection is good because is the reference point of TLP250. What do you think?

Best regards
Daniel
 

daniel I watched the video and photos but if you mention the output stage (e.g pin no) so I can study it easily. also you cant get the original output until you filter it, study inverter block diagram.

check the output peak value, if it is 6-8Vpp then its working fine, also check the TLPs output to the gates, follow instructions for first time run, ensure all feedbacks, measure i/p current to the circuit (no load). test your MOSFETs for proper working, mishandeling and overcurrent can cause damage.transformer is necessary fo proper voltage feedback, or provide values manually
 

You're right jami007, but please I would like you upload the last files about this proyect (schematic and code) or the files that someone has tested succesfully because in this project there's much files with corrections, for example, supply about TLP250(+10V or +U) or pin 5 of TLP250 is GND or not GND:???:.

I know that this project is not finished. Thank you very much everybody, I've learning a lot!!!! If i find the solution I will post my results for other person does not make the same mistake that me.

Best regards!!!:grin::grin:
Daniel
 

Hi @t!
// If I don't connect GND of U3 and U4 to GND of inverter, my inverter doesn't work, // I need to connect to GND.
Also I think that this connection is good because is the reference point of TLP250. What do you think?

Daniello, if you don't trust your output stages (the 4 (or 8) power Fet's), you can test them staticly if you read pages 12 and 13 of this thread.
Concerning the reference points of the drivers; they are optocoupled, so the upper ones have a level-shifting so that their reference point can be the A and B (midpoint of the bridge).
For the two lower drivers the ref. is 0v or gnd. they also can use the full 10 or 12v supply voltage.
Because the upper ones have a changing ref. point (A and B) they therefore suffer from a lower supply voltage, by using a bootstrap circuit (D6 and 7 and capacitors C17 and 18) the supply is "tilted up" a bit for them.
Good luck, At.
 
Last edited:

You're right @t, i will test them. I will read pages 12 and 13 of this thread. I will post the results, ok?:grin:

Thank you very much @t.:wink:
Best regards
 

I hope At provided sufficent info....

I've uploaded the schematics and all files related to the inverter design on page 18, check them, PCB is just for testing purposes not the final one.
 

Thank you very much jami007!:grin:.

Don't worry, PCB is just for testing purposes. I will comment my results, ok?
Best regards!:grin:
 

Hello to all, finally I got my components. Here is next step on the protoboard, added LM3939 and 74HC257. I got very interesting scope picture of the signal taken from pin 4 and pin 9 of the 74HC257. Daniello_85, could you test this modified hex file on your device and could you do some pictures of the signals with your osciloscop?

Regards
 

Attachments

  • Sine_pwm_.rar
    56.2 KB · Views: 652

Californiajoe please mention hex file is for which device??? 16F876A or 16F877A???

---------- Post added at 04:05 PM ---------- Previous post was at 03:54 PM ----------

SN74HC257 is a data line selector

when A'/B= L it will give value from A at output (L or H), B is dont care
when A'/B= H it will give value from B at output (L or H), A is dont care
( G'= L to enable chip)

I think it should be more like PWM

---------- Post added at 04:09 PM ---------- Previous post was at 04:05 PM ----------

LM393 is a dual comparator, output should be PWM and PWM' at pin 1 and 7, check this on scope

---------- Post added at 04:11 PM ---------- Previous post was at 04:09 PM ----------

A'/B is a 50Hz sine wave signal

---------- Post added at 04:14 PM ---------- Previous post was at 04:11 PM ----------

ohh.... sorry.... A'/B is a square wave 50Hz, 50% duty cycle signal
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top