Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PWM using microcontroller (pic)
Author Message
benny Offline
Member
***

Posts: 332
Joined: Sep 2008
Reputation: 5
Post: #1
PWM using microcontroller (pic)
Hi all.

the attached files are for a very much updated version of a pic microcontroller controlled PWM I posted earlier.

Does away with most of the external logic of the earlier version as well as the need for mode switching. Control of mark:space ratio from 3-99% is done from a single potentiometer adjustment
The file HPWM.rar includes a complete set of files including

1. Schematic drawing for circuit.
2. Screenshots 1, 2, and 3, for simulation for
a. Mark:space ratio less that 1:1
b. mark space ratio = 1:1
c. mark:space ratio >1:1
3. The hex file for programming into the pic.

The circuit shown pairs of power fets in parallel. This may be necessary with lower power fets, for power sharing, but is not absolutely essential.
Note. The pic, 18F452, used in this schematic is overkill, but was selected for future updating, and adding of other facilities. The hex file included is suitable only for this particular pic.

The schematic does not show the crystal for the oscillator. This is a 16MHz crystal, connected between pins 13 and 14 of the microcontroller, with 20pF loading caps from either end of the crystal to ground.

For mark:space adjustment, a multi-turn pot is recommended, since adjustment over a 1:1 ratio can be just a bit crude/severe.

This can be used to drive either dual HHO generators, or two sections of a single generator, depending on how the outputs are connected.

Feel free to build, use, and do whatever you wish with this design.

To do:

Add Current monitoring and self-regulation.
Add Graphic display, alphanumeric or graphic for display of operating parameters.
Whatever else comes to mind at the time.
Attachments failed. I'll try a different method .
Uploading attachments to the forum failed. Would not accept .RAR, .BMP, or .JPG files for some reason./

archived file uploaded here.

http://rapidshare.com/files/193317062/HPWM.rar
(This post was last modified: 02-03-2009 04:51 AM by benny.)
02-03-2009 04:22 AM
Find all posts by this user Quote this message in a reply
benny Offline
Member
***

Posts: 332
Joined: Sep 2008
Reputation: 5
Post: #2
RE: PWM using microcontroller (pic)
Eureka.

Schematic diagram and screenshots for above attached. Now shows crystal and frequency of same.
Schematic diagram
   


Screenshot 1. Mark space < 50%
   


Screenshot 2. Mark space = 50%
No overlap of output
   


Screenshot 3: Mark space > 50%
(Note overlap of voltage on (mark) for both outputs
   

Code for programming into pic

.txt  HPWM_18F452.HEX.txt (Size: 4.71 KB / Downloads: 787)

Remove the .TXT from the filename to recover the hex file.
Note this is still a bare bones PWM program, with no extras other than load balancing for dual generators, as described.

This setup allows improved power distribution to two individual generators of similar design and construction, or two individual groups of sections of a single generator, when supplied from a single power source.
For mark:space ratio of less than, or equal to, 50%, each generator is powered at different times, see screenshots, keeping current draw requirement to a minimum. For mark:space ratio over 50%, the power begins to overlap, as shown in screenshot 3. These outputs are still offset, again keeping maximum current draw for the matched pair of generators, or generator sections, to an absolute minimum.

Note: This circuit is simple enough that it can very easily be built on veroboard (stripboard)

All the hard stuff is done by the pic software.
(This post was last modified: 02-04-2009 09:40 AM by benny.)
02-03-2009 04:46 PM
Find all posts by this user Quote this message in a reply
benny Offline
Member
***

Posts: 332
Joined: Sep 2008
Reputation: 5
Post: #3
RE: PWM using microcontroller (pic)
Missing part of main schematic showing power supply, and power connections for hidden pins, pic and 4427 fet driver.


Attached File(s) Thumbnail(s)
   
02-07-2009 03:48 AM
Find all posts by this user Quote this message in a reply
Zipstor Offline
Member
***

Posts: 360
Joined: Dec 2008
Reputation: 0
Post: #4
RE: PWM using microcontroller (pic)
Is this your own design. Did you try it.

>> http://brownsgas.com
(This post was last modified: 02-19-2009 08:36 PM by Zipstor.)
02-19-2009 08:32 PM
Find all posts by this user Quote this message in a reply
benny Offline
Member
***

Posts: 332
Joined: Sep 2008
Reputation: 5
Post: #5
RE: PWM using microcontroller (pic)
(02-19-2009 08:32 PM)Zipstor Wrote:  Is this your own design. Did you try it.

Yes, and yes.

ALL my own work, and fully tested.

Simple circuit. Software does the work..

And yes, I also wrote the software for the pic.

Note.. If you build the circuit, you should add decoupling capacitors at each IC, between Vdd (+) and Vss (ground) pins, as close to each ic as possible..
104, or 10,000 pF disc ceramic..

Like I said in previous post, this is a basic dual PWM. Absolutely no bells and whistles as yet.

Released to the public domain. Feel free to use as you wish.

Updated, software below. Remove the .txt from the file name to use. Multi-turn pot not necessary.
Note: Needs a programmer capable of programming pic microchips.


.txt  HPWM_18F452_SINGLE.HEX.txt (Size: 4.68 KB / Downloads: 374)

Please be sure you read , and fully understand, the previous posts before using this. As with any "home-brew" HHO generating equipment, you use entirely at your own risk.
Note also that each generator, or generator section(s), if sub-dividing a multi-section generator such as 5N2, 6N2, 5N4, etc, design, need not be identical, but it is still preferable to match loads to each PWM output.
And, yes, this has also been fully bench tested.

Basically, up to 50% duty cycle, the individual PWMs switch ON/OFF at different times. Over 50% and the switching ON/OFF times overlap. See simulation oscilloscope pics. Actual oscilloscope display verifies that these are correct. Both PWM outputs maintain the same duty% and period.
(This post was last modified: 02-20-2009 02:35 AM by benny.)
02-20-2009 02:07 AM
Find all posts by this user Quote this message in a reply
Zipstor Offline
Member
***

Posts: 360
Joined: Dec 2008
Reputation: 0
Post: #6
RE: PWM using microcontroller (pic)
Nice one. Thanks for sharing.

Is it too much to ask to edit a pdf? Or maybe just gather all the informations on one file? If you can't just don't worry, it just makes it easier for me, as I have a few projects in my waiting queue to be built.

Have you tried to make your square wave to evolute in ramp cycles.. I have read this very interesting article on peswiki and they talk about current stimulation, maybe it's not relevant and you know already.. have a look >> http://peswiki.com/index.php/OS:Water_Fuel_Cell it's under the pulsar circuit topic.

>> http://brownsgas.com
02-20-2009 03:24 AM
Find all posts by this user Quote this message in a reply
Zipstor Offline
Member
***

Posts: 360
Joined: Dec 2008
Reputation: 0
Post: #7
RE: PWM using microcontroller (pic)
Transformer system... To variate the amplitude I would use a VCA voltage controlled amplifier and an LFO low frequency oscillator or maybe an envelope generator. It's possible to find them as chips. Or software.

>> http://brownsgas.com
02-20-2009 04:49 PM
Find all posts by this user Quote this message in a reply
benny Offline
Member
***

Posts: 332
Joined: Sep 2008
Reputation: 5
Post: #8
RE: PWM using microcontroller (pic)
Content removed by Benny as being unrelated to the main subject matter of this thread
(This post was last modified: 02-24-2009 01:23 AM by benny.)
02-21-2009 02:54 AM
Find all posts by this user Quote this message in a reply
Zipstor Offline
Member
***

Posts: 360
Joined: Dec 2008
Reputation: 0
Post: #9
RE: PWM using microcontroller (pic)
All I know is how to modulate waves and some modules to get there, but my knowledge is limited. I don't know much about the chips you can get on the market as electronic shops, so if you say they are limited, then they are limited. What about industrial machinery suppliers? Maybe they would have something.. In worst case there is always the possibility to build the module yourself from bare components. Concerning the circuit plan that would achieve these modulations, I might have a slight idea as I know how to generate these modulations at smaller scale.......... Let me know if you get there, then I'll tell you my idea.

BTW do you know of the S&K PWM? No frills, like your design, but I heard it's top shit http://skhhofuelsystems.com I think I'll get one of these for now.

>> http://brownsgas.com
(This post was last modified: 02-21-2009 05:20 AM by Zipstor.)
02-21-2009 05:18 AM
Find all posts by this user Quote this message in a reply
Zipstor Offline
Member
***

Posts: 360
Joined: Dec 2008
Reputation: 0
Post: #10
RE: PWM using microcontroller (pic)
My knowledge is not about modulating radio waves. These waves does not, or rarely needs to be modulated as they have to be steady if they are used as a career for example. I was talking about analog synthesis.... I have seen that waveshape on the oscilloscope and I just know how to make it that way, thus only at lower voltage under around 30v average. So if we want these waves x100 or else x1000 it's just about using larger components within the circuits.

S&K generator has nothing special indeed. But apparently there is a good PWM unit working there. These fellas has won the price of best kit at HHO games last month check it out http://hhogames.com/links/prizes2.html .. I'm wondering as well why the pots are sealed, I'm going to have a word about this to the maker before I get it because I might need more gas in the end.

>> http://brownsgas.com
02-21-2009 05:54 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)