Topics Topics Edit Profile Profile Help/Instructions Help Member List Member List  
Search Last 1|3|7 Days Search Search Tree View Tree View  

Very simple PWM

:: EPE Chat Zone ­:: ­Radio Bygones Message Board :: » EPE Chat Zone » Archive through 26 February, 2010 » Very simple PWM « Previous Next »

  Thread Last Poster Posts Pages Last Post
  ClosedClosed: New threads not accepted on this page        

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

lutin
Valued Member
Username: lutin

Post Number: 14
Registered: 11-2008

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 01 February, 2010 - 10:12 am:   Edit Post Delete Post Print Post

I am using a 555 in a very simple PWM circuit to alter the brightness of some LEDs. These are driven from the outputs of a 74HC138 3 to 8 Line Decoder, and I am using the output of the 555 PWM to drive the Enable pin on the '138.

I am using an LDR as one of the timing resistors and the circuit works reasonably well. However, because the other timing resistor is fixed, the operating frequency changes. In very low light levels the LED could be seen to be flickering, but reducing the size of the timing cap to 47nF seems to have cured this. Isn't the persistence of vision helpful?

Is there a more elegant way to do this, bearing in mind that I want the circuit to be as simple as possible?

Current circuit used is this -

Simple 555 PWM
Top of pagePrevious messageNext messageBottom of page Link to this message

james
Valued Member
Username: james

Post Number: 18
Registered: 02-2007

Rating: N/A
Votes: 0 (Vote!)

Posted on Monday, 15 February, 2010 - 10:21 pm:   Edit Post Delete Post Print Post

How about a PIC?

Put the LDR in series with a resistor to form a potential divider and measure the voltage between the two with an A/D PIC input.
The software then generates an output duty cycle dependant on this voltage. Could possibly use a PIC with a pulse width modulator on it.

Could you use 3 PIC inputs and 8 PIC outputs and get rid of your 138 I.C?

This is a one chip solution!

Hope this helps

James.
Top of pagePrevious messageNext messageBottom of page Link to this message

james
Valued Member
Username: james

Post Number: 19
Registered: 02-2007

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 16 February, 2010 - 09:35 am:   Edit Post Delete Post Print Post

Hi me again!

If you do not like my PIC solution, or do not have the equipment to implement it then you could simplify your existing circuit instead.

You do not need D2 or R1. Replace these with wire links.

C2 then charges through R3 and D1 (output high) and discharges through the LDR (output low).

With this simpler circuit the 'space' will be the same as before but the 'mark' will be halved.
To bring the 'mark' back up to what it was increase the value of R3.

I dont think that even this simplified circuit is as elegant as a PIC solution. It is not a true pulse width modulator as the frequency changes with light level. Not so for the PIC solution.

Cheers

James.
Top of pagePrevious messageNext messageBottom of page Link to this message

hackinblack
Frequent Contributor
Username: hackinblack

Post Number: 464
Registered: 09-2006

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 16 February, 2010 - 12:42 pm:   Edit Post Delete Post Print Post

heres a simple circuit with a useful article too
http://www.eleinmec.com/article.asp?28

even easier if you use a dual 555 IC;and the output transistors on a 555 can easily drive an LED
you wont need an external one,like this motor driver does...
Top of pagePrevious messageNext messageBottom of page Link to this message

alec_t
Frequent Contributor
Username: alec_t

Post Number: 183
Registered: 03-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 16 February, 2010 - 02:19 pm:   Edit Post Delete Post Print Post

Another simple circuit:-
PWM circuit

The first Schmitt gate, R1 and C1 form a fixed frequency oscillator. The second gate is a buffer. The LDR and C2 control the mark/space ratio.

HTH,
Alec
Top of pagePrevious messageNext messageBottom of page Link to this message

lutin
Valued Member
Username: lutin

Post Number: 15
Registered: 11-2008

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 16 February, 2010 - 02:47 pm:   Edit Post Delete Post Print Post

Thanks for the ideas, guys.

I don't want to use a PIC, purely because the target audience (if there ever is one) would not / could not program one. True it would be a nice elegant solution though. I was trying to use bits that I had lying around.

Got some more to think about now, cheers.

Tony
Top of pagePrevious messageNext messageBottom of page Link to this message

alec_t
Frequent Contributor
Username: alec_t

Post Number: 184
Registered: 03-2009

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 16 February, 2010 - 03:14 pm:   Edit Post Delete Post Print Post

....er....my circuit was TOO simple. There should be a diode across the LDR, with cathode towards the gates.

Alec
Top of pagePrevious messageNext messageBottom of page Link to this message

james
Regular Contributor
Username: james

Post Number: 23
Registered: 02-2007

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, 16 February, 2010 - 09:45 pm:   Edit Post Delete Post Print Post

Alec t's circuit seems worth a try.

You need to think about which way the logic works and therefore which enable output to drive on the 138. E1, E2 (both active low) or E3 (active high).

As it gets darker the LDR resistance will increase, increasing the duty cycle (mark to space ratio) at the circuit output ie. The output low time will reduce.
Presumably you want the LED's to become less bright as it gets darker. ie. Enabled for less time. Therefore I think you need to connect the schmitt output to one of the 138's active low enable inputs, E1 or E2. Remembering to connect the other two enable inputs to there disabled states.

The duty cycle available at the output is from about 50% to 100%.(LED's off)

For correct circuit operation the R1C1 time constant should be greater than the C2LDR time constant.

Can't think of anything else!

James.
Top of pagePrevious messageNext messageBottom of page Link to this message

lutin
Valued Member
Username: lutin

Post Number: 16
Registered: 11-2008

Rating: N/A
Votes: 0 (Vote!)

Posted on Thursday, 18 February, 2010 - 04:30 pm:   Edit Post Delete Post Print Post

Okay, have gone with my original circuit. It works fine and it is only in very, very low light levels that you can see any flickering of the LEDs.

This was the easiest implementation for me as all I had to do was to connect the 555 output to pin 6 of the '138 together with a 10k pull-up resistor.

Thanks for the other ideas, will have a play with them just out of curiosity.

Administration Administration Log Out Log Out   Previous Page Previous Page Next Page Next Page