Page 1 of 2

Pure Sine Wave Inverter

Posted: Fri Aug 16, 2019 10:41 pm
by Derrihj
Hi friends is there anyone here that has an idea of how to make pure sine wave inverter in flowcode 8 things of sine table I totally have no idea how to start and end please share anyone with an idea on how to code pure sine wave oscillator

Re: Pure Sine Wave Inverter

Posted: Sat Aug 17, 2019 12:07 pm
by STibor
Hello,

Component: Frequency Generator (DSP)
Basic Sine Wave Generator:https://www.matrixtsl.com/wiki/index.ph ... ator_(DSP)

Re: Pure Sine Wave Inverter

Posted: Sun Aug 18, 2019 9:36 am
by Derrihj
Thanks STibor but i need a live example for slow learners.

Re: Pure Sine Wave Inverter

Posted: Sun Aug 18, 2019 6:54 pm
by Steve001
Hi Derrihj

Have you tried a google search "microchip inverter reference design"

https://www.google.com/search?q=microch ... e&ie=UTF-8

they are quite well documented and contain lots of information

Steve

Re: Pure Sine Wave Inverter

Posted: Wed Oct 23, 2019 9:55 am
by Derrihj
Guys how to obtain a sine table of 32 values in flowcode? Please help really need help on this and how to implement SPWM inverter.

Re: Pure Sine Wave Inverter

Posted: Wed Oct 23, 2019 3:54 pm
by Benj
Hello,

Hopefully this should help. Currently the scaling is for a 16-bit signed int and will go between -32767 and 32767. If you need to change this to an unsigned value then I can provide an example for this too.
SineGen.fcfx
(11 KiB) Downloaded 577 times

Re: Pure Sine Wave Inverter

Posted: Sat Oct 26, 2019 12:13 am
by Derrihj
Thanks Benj but is this possible for you to provide this as a full complete spwm dc- ac inverter project with feed back say by having different sets of sine table with each having may be 32 values for different duty percentage values may be starting at lower duty of may be 65 percent when the inverter is first switched on then goes on increasing duty until the desired output is achieved say may be 220vac ,230vac or 240vac? we want to see how this is done in flowcode completly because we want to shift to flowcode since its easy to use than others.We want this to have 4 siginals ,that is 2 high and 2 low siginals to be fed to two IR2110 driver ICs.I dont know exactly how to bring out this clearly but i guess you get what am trying to say.THanks sir.

Re: Pure Sine Wave Inverter

Posted: Thu Oct 31, 2019 1:27 pm
by Benj
Hello,

It's probably easier if you generate one sine wave at full scale and then use say the DSP scale component to allow you to dynamically scale the wave. You could maybe use the DSP control component to provide PID type feedback processing for the scaler.

Re: Pure Sine Wave Inverter

Posted: Fri Nov 15, 2019 7:29 am
by Derrihj
Thanks Benj but Guys, i totally don't know how to do this which is why am requesting for a complete project if that is possible then discus where i get lost from which i think is the best way to learn especially for slow learners like me thanks guys.

Re: Pure Sine Wave Inverter

Posted: Mon Nov 18, 2019 4:49 pm
by DCW
Hello there... well now I believe that flowcode 8... has a facility whereby you can type in C-code ... and then it will.. 'create' flowchart (flowcode code) symbols...!!

So now if you go look on the internet.. and look for a brilliant indian fellow called - Tahmid - he has a brilliant working model, of a SINE wave inverter, that will not be too difficult to get around.

I studied it at length, and it seems very do-able... So buddy.. go check him out... Tahmid did it real nicely..

Ask Benj - to help you.. with procedure for creating flowcode - from C-code..

I sure it will work..

regards .. DCW ...

Re: Pure Sine Wave Inverter

Posted: Fri Nov 22, 2019 1:39 pm
by Derrihj
Thanks DCW yes i know that guy Tahmid i my self been using him for some time and he has been so helpful in my smp inverter research and about flowcode i think it cant translate all the C code directly into flow-chat maybe Benj can come in and help us out. My only worry is how do we get Benj visit Tahmid page look at the sine wave project there and translate it into flow code

Re: Pure Sine Wave Inverter

Posted: Sun Sep 05, 2021 11:23 am
by Derrihj
Can someone help code this in Flowcode? http://tahmidmc.blogspot.com/2012/10/ge ... in_10.html

Re: Pure Sine Wave Inverter

Posted: Tue Sep 28, 2021 2:16 pm
by Derrihj
Hi nice people how are you, hope all is well. Ok guys this is what i have been looking for most of the time, and that is a DC- AC pure sine wave inverter code with Feedback, I have attached the Arduino code in a text format if anyone can help turn this code into flowchart that will be really great coz i've had allot of trouble knowing how this is done with a practical example. I will also provide a link were to download a software for the Sine Table (Smart Sine) for generating the required sine table Values.

Re: Pure Sine Wave Inverter

Posted: Tue Sep 28, 2021 2:48 pm
by Derrihj
Here is the link to download Smart sine software: https://drive.google.com/file/d/0B4SoPF ... sp=sharing

Re: Pure Sine Wave Inverter

Posted: Wed Sep 29, 2021 7:33 am
by Derrihj
Another very useful information about Implementation of Sine Wave Table is found on the link below, but you will have to open each page in a different web page to be able to zoom in and read the words well coz they are small. http://tahmidmc.blogspot.com/2011/01/ge ... e.html?m=1

Re: Pure Sine Wave Inverter

Posted: Wed Sep 29, 2021 2:05 pm
by Derrihj
Here is the Schematic

Re: Pure Sine Wave Inverter

Posted: Wed Oct 06, 2021 10:12 am
by Benj
Hello,

Have you looked at the DSP wave generator component, it might do just what you need in terms of generating sine wave look up table values and allowing you to step through the waves at different rates.

Re: Pure Sine Wave Inverter

Posted: Tue Oct 19, 2021 9:13 pm
by mnf
Hi,

Not sure if this got sorted - or even if this will be useful...
However - the current project I'm working on needs a wave generator - not necessarily sine, however my code was easily modified to do this.

I'm using a discrete DAC (a MCP4725) - and (hopefully will be) feeding the output into an opamp to generate a -V .. +V wave.

So the code is very simple - you can use the MCP component in FC (v9 at least) - or do as I did and roll your own (partly because I want to save the DAC state to it's EEPROM - and because it's a good way of finding out how the bits play together..) Here using 256 values lookup data - though this is easy to change - 512 values gave a 16.7Hz wave.
LabNation_Screenshot24.png
LabNation_Screenshot24.png (314.67 KiB) Viewed 21185 times
And using a 32 value lookup table:
LabNation_Screenshot25.png
LabNation_Screenshot25.png (282.79 KiB) Viewed 21180 times
and the code:
dac sine wave.fcfx
(13.41 KiB) Downloaded 193 times
Note - this test on an Arduino with i2c running at 400kHz. A faster MCU could run i2c at 1MHz - so should be possible to generate 50 or 60Hz signal using this technique....

Martin

Re: Pure Sine Wave Inverter

Posted: Wed Oct 20, 2021 3:40 am
by mnf
Just realised, at daft o'clock in the morning, that the code above will only work on v9 Flowcode I use an array initialised in the variable definition. It would be easy to modify to use a look up component. It also doesn't use any components and will work on the free version of v9. If needed I can do a v8 version...

Martin

Re: Pure Sine Wave Inverter

Posted: Wed Jan 05, 2022 8:49 pm
by Derrihj
Hi guys, how is the new year treating you? guys i will continue to post sinewave codes until I get someone so kind with love to teach slow learners like me. Guys, now here is an Arduino pure SineWave code that works please anyone good at this help turn this code to a well-commented flowcode flowchart please help. What am looking for is a complete direct translation from this Arduino code to Flowcode, please someone out there kindly share your knowledge and make me really happy in this new year, Thanks allot let me also show its circuit diagram below But please for Flowcode use PIC18F442 because that is the chip i have to test this.

Re: Pure Sine Wave Inverter

Posted: Wed Jan 05, 2022 8:51 pm
by Derrihj
Here is the circuit diagram in PDF.

Re: Pure Sine Wave Inverter

Posted: Thu Jan 06, 2022 10:43 pm
by mnf
The code can be converted to Flowcode - with the proviso that a fair amount will remain as C (all the register assignments such as TCCR1A = ... for example)

However - I think it will eventually crash (in C or FC) - the function Inverter is recursive (it calls itself in two places with no return) and so it will eventually overflow the stack and crash. Each time the input on pin12 is 'clicked' the stack will get deeper...


Martin

Re: Pure Sine Wave Inverter

Posted: Thu Jan 06, 2022 11:57 pm
by Derrihj
Thanks mnf for your quick response to my call for help.So what you are trying to say this can't work out in flowcode 😭😢 we can't get pure sine wave code in flowcode!! am really confused save me.

Re: Pure Sine Wave Inverter

Posted: Fri Jan 07, 2022 6:55 am
by mnf
Hi, no, it could work - just that I think the C code has a bug in it. So as the joke goes - how do you get to... Well I wouldn't start from here.

I'll have a play over the weekend and set it I can get a version working...

Some compilers would optimise tail-recursion to a jump but i don't think they would cope here (and some would give a warning or an error)

Martin

Re: Pure Sine Wave Inverter

Posted: Fri Jan 07, 2022 10:33 am
by Derrihj
[I'll have a play over the weekend and set it I can get a version working...]
Wawo!! That is really cool am waiting for that as I really want to see how it's done in flowcode to get pure sine wave PWM output thanks in advance.