Connect with us

Sequential Timing Circuit

Discussion in 'General Electronics Discussion' started by Michael Joseph, Jul 18, 2014.

Scroll to continue with content
  1. Michael Joseph

    Michael Joseph

    13
    1
    Jul 18, 2014
    I need help with circuitry and parts using an IC 555. (open to suggestions)
    Action...
    Turn on LED-1 lights, timing begins
    At 2 minutes LED-1 off; LED-2 on
    At 3 minutes LED-2 off; LED-3 on
    Switch off / all LEDs off and timer resets.

    Power supply = 12VDC
    LED 150ma

    Optional: IC 556
     
  2. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    Sounds like a very very slow traffic light ;)
    What would you like to happen after 3 minutes if the switch is not turned off?
     
  3. Michael Joseph

    Michael Joseph

    13
    1
    Jul 18, 2014
    The LED-3 stays on.
    Application is for public speaking with time limits. LED-1 indicates beginning of a person's time to speak; LED-2 indicates time is almost up; LED-3 indicates time is up.
     
  4. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    I can't draw anything custom up for you right now, but you can use a microcontroller and program it to however you want it to function... or you can purpose build a circuit.

    http://www.electronicdesignworks.co...ontroller/simple_traffic_light_controller.htm

    Here is a link to show you a sample circuit for traffic lights. Slight alterations will allow you to set the times you want and hold the last LED on until the circuit is reset.

    *Connect LEDs instead of the Relays
    *Tie the first LED to the 4 first outputs (2-min)
    *Tie the second LED to the 5-6 outputs (1-min)
    *Tie the last LED output to the Clock Inhibit pin to stop the progression of the LEDs

    This modified circuit will allow you to alter the times in 30-second increments by swapping pins on the LEDs. You could also adjust the time by using the included potentiometer.

    Edit: Someone else may be able to describe a better alternative, but this is how I would tackle it.
     
  5. Michael Joseph

    Michael Joseph

    13
    1
    Jul 18, 2014
    Thank you for the quick response.
    Since I need an initial on LED, another at 2 minutes and a third at 3 minutes, this could work.
    However, I have a need for similar but different time sequences: LED-1 on at start; LED-1 off and LED-2 on at 85 seconds; LED-2 off and LED-3 on at 90 seconds.

    Overall, I would like the same circuit to be used for multiple variables of similar kind.
     
  6. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    I think your best option then would be a microcontroller.
    Take a look at
    http://www.atmel.ca/devices/ATTINY85.aspx
    or
    http://www.microchip.com/wwwproducts/Devices.aspx?product=PIC10F200

    Some small 8-pin microcontrollers are only a couple dollars, and can be programmed with a multitude of patterns. They can be updated and changed later if you dont like the functions or want to add/remove a function.

    The 8-pin micros typically have 4/5 general purpose input/outputs and usually (but not always) have an ADC*. In a simplistic form, you connect 1 LED to each pin, and you connect a potentiometer to the general purpose pin which is the ADC.
    The micro will be programmed to play whatever pattern is selected by reading the potentiometer when it starts up. (Think volume knob marked with numbers 1-4 for example... point the knob to a number and hit 'reset')

    If you enjoy programming or find a groove in doing so, you can use the same micro and wire it differently to support multiple buttons and LEDs by employing tricks like charly/multi-plexing. You can also scale to a bigger microcontroller that has more pins, but the price will usually (slightly) increase when doing so.
     
  7. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    I currently have an Adafruit Trinket programmed with 8 different flashing patterns. I used this because of design. I can program it with a regular USB cable, and is compatible with the Arduino IDE so it is a little easier to get running right off the bat. It is however more money, and I would rather put a PIC or an ATTiny into a finished product than the arduino because of this.
     
  8. Michael Joseph

    Michael Joseph

    13
    1
    Jul 18, 2014
    Your resources are wonderful, however way over my head. Also, the operating voltages are too low since I must work with a 12vdc power supply.
    I have worked with arduino and adafruit. I have been fully dissappointed since none of the hardware works for me, not even sample test programs. I have another very complicated project that I wanted to use the arduino touch shield. Since the products are not reliable off the shelf, I've lost interest.
     
  9. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    Michael, since you have Arduino already, perhaps we should jump to a different section or forum to get those running for you?
    I do understand your loss of interest, the Trinket I have programmed took me a couple hours to get setup properly to load the 'blink' sample program properly. Once you have your workstation and programmer all worked out, it really becomes quite nice and fluent to work with.
    As far as the operating voltages are concerned, the 12V supply can easily be stepped down to the appropriate working voltages for the micro solution or 555 solution with a couple additional cheap parts.

    An alternative to the Arduino you have is skipping the bloatware and prebuilt platforms and going right to the heart of it by using products like the PIC or ATTiny... I do consider them to be more reliable and easier to setup due to support across various platforms, but I also feel that they are more difficult to program with my current skill set.

    Where would you like to go from here?
    Would you like to explore alternative solutions with discrete components like the 555 Timer and decade counter?
    or
    Would you like to have another attempt at the Arduino you have (assumed) in your possession?


    Edit... as far as the reliability of the product... The Adafruit Trinket that I have in my possession made me want to pull out my hair. Part of that was due to product design and the delay windows introduces to recognizing USB devices... You had to time the upload button perfect right before plugging the device in...
    Since, I have been using Ubuntu to program my Trinket and can upload the first time, reliably, every time once I made the required config file changes.
     
  10. Michael Joseph

    Michael Joseph

    13
    1
    Jul 18, 2014
    I want to get this small project completed with little expense. I am about 2/3 through assembling my second circuit. Maybe it will work. I have discovered hints that could make it easier. 1) the 555 runs ok up to 15vdc; 2) the 555 can handle the current load of the intense LEDs I am using therefore I won't need to use a load switch transistor; 3) by routing the output of the first 555 into the trigger of the 2nd 555, I simply the hand-off of the circuit design.

    I'll upload the program file for the unit I'm building. It is for a single stage, I'm guessing as to make it a two stage operation.
    So far, I have not been able to make it work.
    Yes, I'd like to see if I can get the arduino working.
     

    Attached Files:

    Last edited: Jul 19, 2014
  11. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    A microcontroller is definitely the "proper" way to do this. You can get everything you want with a small (8-pin or 10-pin) microcontroller, a crystal (for accurate timekeeping), a pushbutton for reset, and some LEDs with current limiting resistors. The circuit could be powered from a 6V battery, or a 5V or 6V power supply ("wall wart"). Total components, about ten. Total cost, less than USD 10 plus costs for circuit board and enclosure.

    Using a microcontroller also makes it a lot easier to add enhancements. For example, you could add more LEDs to count off the last 30, 20 and 10 seconds; whatever you want.

    There are many people here who could help you with the electronic and firmware aspects of making a device like this, including me, but you would have to take the initiative, and there is quite a bit to learn. There are lots of "learning resources" on the net though, especially for the Microchip PIC devices. Development software is free, but you would be paying about USD 50 for the programming device (a PICkit 2 or PICkit 3).

    Obviously, once you get into microcontrollers, your opportunities expand hugely, so if you would like to do other similar projects in future, that's a good reason to get involved.

    If you want to avoid microcontrollers, it is possible to do what you want using a crystal oscillator, a frequency divider, and two or more cascaded counters. This is often done with parts from the CD4000 series of CMOS general purpose logic ICs - the CD4060 for the oscillator and frequency divider, and the CD4017 decade counter/divider to count off the time. And other ICs for general "glue" logic.

    If you think this is the way you want to go, let us know, and I or someone else will draw up a design for you. But please consider the microcontroller option.

    The 555 is not accurate enough for this application. No one wants to have their speaking time cut by 5~10% or their opponent's speaking time lengthened by that amount!
     
  12. Michael Joseph

    Michael Joseph

    13
    1
    Jul 18, 2014
    Kris:
    I very much like your reply. You hit the nail on the head with accuracy.
    I don't mind spending the $50 on the programming device. It seems I opened a can of opportunity when I offered to make specialty timing lights.
    I know a small amount about electronics. However, I don't know much about designing circuits or programming microcontrollers..
    I need a guide to help me along. I learn best with hands on. Pouring over books never taught me much.

    What will it take to get me to the finish line with my first working model?

    Michael

    .
     
  13. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    What kind of deadline are you facing?
    What operating system are you working on?
    Do you have that Arduino product from Adafruit still or would you like to ignore that and jump straight to the PIC?

    What you are going to need is a microcontroller and programmer. For the sake of getting things running smoothly, buying a PicKit 2 or 3 from Microchip will allow you to get up and running with a windows system very quickly. (I have not attempted programming a PIC from Linux or MAC). Arduino can work as well, but unless you have some kicking around your house, don't bother buying one for this project. (The cost for an arduino product is not worth it for this project)
    A form of prototyping board will help you develop and experiment with the circuit, but the PicKit has some LEDs, a button, and potentiometer included on a miniature prototype area on the provided board that will let you test your 'timer' program without needing to buy additional parts.
    All of the software is straightforward and easy to install, and once you have tried the 'hello world' or 'blink' test program, you are ready to plunk your custom code on the PIC. This will get you to a working proof-of-concept.
    When you are happy with your program, some strip board will get you up and running with a built solution, or you can provide a more polished product by designing and ordering an etched or milled circuit board. Drop in your components, and your custom programmed PIC and your good to go.
    All that is missing is a case for a finished project.

    There are plenty of souls on the Forums here that can help with any part of this process.
    Before you go shopping for parts. Tell us exactly what you have in mind for your device.
    Do you want a separate button for each mode, do you want to select a mode with a dial, would you like it battery powered, would you like any additional features?
    At the moment, I can visualise a little box with 3 LEDs on it, and a couple buttons... and can suggest a BOM for the project, but if every detail is brought out ahead of time, you can save yourself from making last minute orders ;)
     
  14. Michael Joseph

    Michael Joseph

    13
    1
    Jul 18, 2014
    Attached is a photo of light boxes intended for use. Size is approximately 8" x 5" x 2.5"
    I'll pick up parts when I know what to buy and have a diagram for assembly.
     

    Attached Files:

    Last edited: Jul 19, 2014
  15. Laplace

    Laplace

    1,252
    184
    Apr 4, 2010
    Back in 1982 I did a similar project for the local Toastmasters Club. It had a minute & seconds timer with LED 7-segment display, green & yellow & red warning lights, and pushbuttons to enter several predefined timing cycles. Back then the only viable implementation approach was the CDP 1802 micro-controller (now obsolete). It was easy to build but harder to program. The whole program was about 600 lines of hexadecimal assembly code, and I had to build an EPROM programmer and program the EPROM one assembly instruction at a time with a hexadecimal keypad. With what is available today, your project should be much easier. FWIW, I have attached the project schematic for what was a small table-top device.
     

    Attached Files:

  16. Michael Joseph

    Michael Joseph

    13
    1
    Jul 18, 2014
    Thank you for the response.
    I make manually operated lights for Toastmasters. I have seen two models that are automatic systems. The first one, I've had one in hand. However, its inventor has dropped off the face of the earth and I cannot redevelop his work. He had a beautiful case and the system worked very well. Then the other appears to be a good system. However, its inventor will not sell me his design or resources and sits on the project. He is too busy to build them for Toastmasters and too busy to deal with me.
    I would like to team up with someone who can help me engineer an automated device utilizing a touch screen interface.
    What say you?
    Michael
     
  17. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,490
    2,831
    Jan 21, 2010
    A touchscreen interface adds complexity.

    Something with an LCD display and a few buttons could probably be put together from available modules and some relatively simple coding

    I'm a bit concerned that you say you've had no luck getting and arduino stuff operating, because I'm sure that's along the lines of what some of us are thinking.
     
  18. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    OK, I think a good place to start would be to make a provisional choice of microcontroller - at least the architecture. Microchip PICs are very popular, are fairly easy to program in C, and have plenty of examples and tutorials. Many people here have experience with them, including me, Steve, Gryd3, BobK, and others, who can advise you on the hardware and firmware aspects. You will have to take quite a bit of the initiative yourself though.

    Gryd3's suggestion of starting with a pre-built prototyping/evaluation board with an MCU and programmer is a very good one. Once you get the code working you can do your own stripboard circuit or PCB. Here are four PIC evaluation packages from Microchip available through Digi-Key:

    http://www.digikey.com/product-detail/en/Q7442559/LPC2-PROMO-ND/3880043
    USD 34. Includes a number of blank PIC devices but no programmer/debugger device.

    http://www.digikey.com/product-detail/en/Q7442546/LPC1-PROMO-ND/3880042
    USD 68. Includes a number of PIC MCUs (three 8-pin devices and two 14-pin devices) and a PICkit 3 programmer/debugger module, which you will need - probably your best option.

    http://www.digikey.com/product-detail/en/DV164130/DV164130-ND/3671621
    USD 72. Includes a PICkit 3 programmer/debugger module, which you will need, but it seems, no PIC MCUs.

    http://www.digikey.com/product-detail/en/DM163022-1/DM163022-1-ND/2696124
    USD 120. Evaluation board with an LCD. Includes some blank MCUs but no programmer/debugger.

    This application needs no special features and very little processing power. The choice of MCU is really driven by how much I/O you need. Each MCU needs two pins for VDD and VSS, and two pins for the crystal. That leaves either 4 (for an 8-pin PIC) or 10 (for a 14-pin PIC) more pins for general I/O; one of these is only able to be an input to the device, but the others can be either inputs or outputs.

    That's fine for this case, because you're going to have a pushbutton. And if you only want three LEDs, an 8-pin device is suitable, but you have no expansion opportunities. Actually you do, because three lines are enough to drive external LED driver ICs (there are several options here), but it's simpler to drive the LEDs with a 1:1 I/O mapping. Something for you to consider at a later stage.

    PIC microcontrollers can be programmed in several languages. The commonest are assembly language and C. C is quicker to learn and there is a lot of sample C code for PICs. C is actually a general purpose programming language that can also be used to program PC-type computers; microcontrollers are very resource-constrained compared to PCs so you should look at sample code that is specifically written for microcontrollers.

    The development environment is called MPLAB and it's a free download from microchip.com. There are two generations of MPLAB: MPLAB 8 point something, the last version of the old architecture, and MPLAB X (the 'X' means ten, like Mac OS X) which is the way of the future. Some have criticised MPLAB X but I haven't had any big problems with it. It includes various sample programs, and there's probably code there specifically written to run on those evaluation boards.

    MPLAB programs PIC devices via the PICkit 2 or PICkit 3 programmer, which connects via USB. Like MPLAB, there is some argument about PICkit 2 vs. PICkit 3. PICkit 2 has some extra features, which probably won't be important for your application. PICkit 3 is supported for current and future devices. Your choice.

    The out-of-box experience should be reasonably painless, and you then have a system that you can muck around with to your heart's content. Make a little change, recompile and reprogram, and see what happens. Perfect for a hands-on person. A lot of fun too. Then you can start thinking about the specific hardware and firmware requirements for your project.
     
  19. Michael Joseph

    Michael Joseph

    13
    1
    Jul 18, 2014
    I thought that the arduino screen was an excellent idea. However, the processor speed I'm told is very slow, its bit mode is too low, and its memory is too low for the size of the program is too large for the device concept.
     
  20. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    I would be very surprised if any of those issues was a problem for this project. Arduinos run at a similar speed to the simple PICs - plenty fast enough - apart from the more advanced Arduinos, which run faster. The screen may be slow to update, but not compared to the time periods you're talking about. And your program logic only needs a few bytes of RAM for variables. I'm not saying you should go for the Arduino - it may be a lot more than you need - but I don't think it would have any problem doing what you want.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-