Electronically controlling PWM

Thread Starter

peck68

Joined Nov 27, 2009
73
hmm right, i have made my first PWM (yay :)) but i want to expand it further - however, I do not want to use picaxe's since the programming board is around £40 and I dont want to spend that ;)

So here is the PWM - what I want it to do is sweep from a low duty cycle (since i noticed that it doesn't actually go fully off, but very dim) to maximum, hold it there for a second or two and then come back and hold.



Any ideas? Do digital potentiometers exsist?

---

Oh and please don't take me back to LEDs, 555s, Flashers, and Light Chasers - I've read it enough times ;)

thanks
http://forum.allaboutcircuits.com/showthread.php?t=19075
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
Don't look at figure 4.3 in post #6 of that thread you don't want to look at, because replacing the resistive divider (R4 thru R6) with a variable voltage will do what you want to do.

But since you don't want to look at that thread again, I don't know what to tell you.

I guess forget about building the circuit? :D
 
Last edited:

Thread Starter

peck68

Joined Nov 27, 2009
73
Eh was that in it?!

I've read through it like 4 times haha - okay thanks i will read post #6 ;)

Will post if i need more help :)

edit:

I cant find figure 4.7? Only 5.1, 4.2 and 4.3
 

bertus

Joined Apr 5, 2008
22,270
Hello,

Look at fig 4.3 of that thread.
(SgtWookie probably mistyped the number).
There you will find a 555 with an opamp to create a PWM signal.

Bertus
 

Thread Starter

peck68

Joined Nov 27, 2009
73
Hmm so I think I understand now :)

(correct me)
So as the voltage increases from the triangle wave of the 555, the lm339 output gets brighter, and vice versa when it decreases?

And what is the PNP transistor for? Is the output a negative voltage?
 

bertus

Joined Apr 5, 2008
22,270
Hello,

Q1, R7 and D1 are there for visualizing the PWM.
If you do not want to check it visualy you can leave them out.
R8 is a must as the LM339 comparator has an open collector output.

Bertus
 

Wendy

Joined Mar 24, 2008
23,415
The LM393 is also a good alternate for the comparator, the LM339 is a quad, the LM393 is a dual. Both require a resistor going to Vcc as they are open collector. Ground the input pins of the unused comparators.
 

Thread Starter

peck68

Joined Nov 27, 2009
73
By the way, PICAXES do not need a programming board.
Regards

pilko
How can they be programmed without one? (would save me lots of dosh :D)

---

So was my understanding correct? (that it varies the output with the determined triangle wave) - does it go from 0% to 100% or is it say 33 to 66? (1/3Vs and 2/3Vs)
 

pilko

Joined Dec 8, 2008
213
Check picaxeforum.co.uk, click on Picaxe manuals at top of page, read manual 1. It explains why the Picaxe does not need a programmer.
That is one of the big advantages of the Picaxe.

Regards

pilko
 

Thread Starter

peck68

Joined Nov 27, 2009
73
I found this I assume:
A PICAXE microcontroller is a standard Microchip PICmicro™ microcontroller
that has been pre-programmed with the PICAXE bootstrap code. The bootstrap
code enables the PICAXE microcontroller to be re-programmed directly via a
simple serial connection. This eliminates the need for an (expensive)
conventional programmer, making the whole download system a very low-cost
simple serial cable!
I did a bit of googling and i found a circuit (i think)



Would that allow me to program it fine? Except, I hear the 16F84 doesn't have serial interface
 
Top