Please help. Throbbing LED circuit with no off

Wendy

Joined Mar 24, 2008
23,421
I can do better. For the movement, make more than one LED circuit. You could use a 556 or two, they are dual 555 circuits.

These circuits are so simple you could pack quite a few in a small space. Ever hear of surface mount?
 

Thread Starter

Jonny1983

Joined Jul 17, 2012
10
I've been using matrix boards to construct circuit in the past, but I've never soldered smd components. I think I'd need to get a better soldering iron as I'm currently using a bit tipped 30W iron.
What circuit did you have in mind?
 
Last edited:

Wendy

Joined Mar 24, 2008
23,421
I haven't drawn it yet, but I'm thinking of switching between 4 to 10 LEDs, each one throbbing once, then moving to the next one in line, giving the appearance of movement.

Yes, if you get into this hobby you will need some tools. There is nothing wrong with breadboarding, but you want a higher complexity level.

It is worse if you want small. Surface mount is tiny, but to the experienced hobbiest, not hard.

If you are serious about this project, and willing to study, µC (AKA PICs, Arduino, Ax, etc) are much better. They are a computer on a chip, and can be programmed with very complex functions. If you can think of it, they can do it.

I will draw the circuit in a day or so, it is a dirivitive of things already done. Figure about 3 chips or so. Eratic is a bit harder, but movement is easy.

LEDs, 555s, Flashers, and Light Chasers, Chapter 9 Light Chasers
 

Thread Starter

Jonny1983

Joined Jul 17, 2012
10
I've worked with Arduinos in the past, I made a Segway clone from scratch.
Arduinos are too big for the solution I'm after though, I wouldn't want the circuit to be much bigger than an inch square.
 

MMcLaren

Joined Feb 14, 2010
861
You could always use a 6-pin or 8-pin μC for a digital solution... You'd need a 100-ma or 250-ma regulator (TO-92 pkg), a couple caps, the LED, and the μC chip, all of which should fit on a one square inch board.

The video below shows an 8-pin PIC12F1822 running the following program (where a gamma correction table is used to make each brightness level step more linear);

Rich (BB code):
   #include <system.h>

   #pragma DATA _CONFIG1, _FOSC_INTOSC & _WDTE_OFF & _MCLRE_ON
   #pragma DATA _CONFIG2, _LVP_OFF & _PLLEN_OFF

   #pragma CLOCK_FREQ 8000000   // 8-MHz INTOSC

   #define r08 const rom unsigned char


   r08 gamma[] = {  0,  1,  2,  2,  2,  2,  3,  3,  3,  4,
                    4,  5,  5,  6,  6,  7,  8,  8,  9, 10,
                   11, 12, 13, 14, 15, 17, 18, 20, 21, 23,
                   25, 27, 29, 31, 34, 36, 39, 42, 45, 49,
                   53, 57, 61, 65, 70, 75, 81, 87, 93,100,
                  107,114,123,131,140,150,161,172,183,196,
                  209,224,239,255 };

   void main()
   { ansela = 0;                // make pins digital
     trisa = 0b00000000;        // porta all outputs
     porta = 0;                 // all output latches low
     osccon = 0b01110010;       // initialize 8-MHz INTOSC
     while(!oscstat.HFIOFS);    // wait until OSC stable

     ccp1con = 0b00001100;      // pwm mode, p1a active hi
     ccpr1l = 0;                // 0% duty cycle initially
     pr2 = 255;                 //
     t2con = 1<<TMR2ON;         // pre 1, post 1, 7812.5 Hz

     while(1)                   //
     { static char duty = 32;   // start at ~50% brightness
       while(duty < 63)         // fade up to 100%
       { ccpr1l = gamma[duty++];
         delay_ms(30);          // over period of ~1 sec
       }                        //

       while(duty > 32)         // fade down to ~50%
       { ccpr1l = gamma[duty--];
         delay_ms(30);          // over period of ~1 sec
       }                        //
       delay_ms(100);           // pause at 50% brightness
     }                          //
   }
video: Fade from 50% to 100%

Cheerful regards, Mike
 
Last edited:
Top