Electronics > Beginners
Circuit to extend time between on/off
Gar:
Hi.
Hoping someone can point me to an IC for the following.
I need a simple 3v I/O circuit that will do the following:
I have a simple switch that is time based . When it switches on,
It will stay on anywhere between one second to 12 seconds (or more) until it shuts off.
I need to output , simultaneously, an on to off time interval based on that length of time plus x seconds.
For example, lets say the Input switch On to Off time interval is 6 seconds. I may want to run the Output switch on to off time interval an additional 6 seconds for a total time of 12 seconds. I would like to set that time extension via a pot. The next "run" may be a 7 second input and the output would either double that time or run a constant set time extension of 6 seconds. 14 seconds or 13 seconds total interval time respectively.
I hope this makes sense.
If not please ask for clarification and any help will be very much appreciated.
rstofer:
You have a digital input, an analog input and a digital output from your black box. I would use a microcontroller if for no other reason than to accommodate 'feature creep'. I would not waste my time trying to develop some analog setup using 555 timers and such.
So, given that Arduino is the easiest microcontroller to get started with and given that this system probably wants to work on 3.3V, I might pick the Arduino Pro Mini 328 and the required USB->Serial adapter.
https://www.adafruit.com/product/2377
Once I had it working, I could dump the prepackaged board and design something that just used the chip. Or not, I have been known to mount these stamp boards right on top of a daughter board that handled or provided the peripherals.
Basically, your code would look for the input going true and, as quickly as possible, set the output. Now would be a good time to read the analog port and figure out how much time to add. Then continue to look for the input to go false and then start a count-down timer. When it times out, clear the output.
There is a millis() function for timing to milliseconds using an internal system timer or you can set up one of the hardware timers.
For the analog bit, you need to read the pot voltage and use some equation to convert volts to time.
I am sure there are analog solutions for this. I tend to focus on digital solutions and I'm really fond of the Arduinos, particularly for new users.
ocset:
Yes, its a job for a micro, either Arduino, which i confess is very good, or a PIC...if you dont know PICs then the book by Babani on microcontrollers is a great starter for learning microcontrollers. Its only a small book.
You can use microchips free c compiler....or just use assembler code.
https://www.amazon.co.uk/Introduction-PIC-Microcontrollers-BP/dp/0859343944
If you do use a PIC, then microchips web forum will sometimes help you if the code doesnt work and you want some advice...you can post your code there.
Ian.M:
Microchip's forums suck - there are lots of knowledgeable and helpful people there, but the forum engine itself is a reeking turd + it interacts badly with Microchip's corporate firewall, so your post can get rejected for no apparent reason.
Its generally worth asking novice to intermediate level PIC questions here, just to avoid the pain of using the Microchip forum.
To get started with low-end PICs I recommend the tutorials at https://www.gooligum.com.au/PIC-tutorials
They are payware, but about 50% of the course, starting from the beginning is available as free samples. (registration required)
Its easier to follow the course with the Gooligum training board, but the whole course can be done on a large solderless breadboard + these parts: https://www.gooligum.com.au/devboards/base-mid/Base-mid_dev_parts.pdf
https://www.gooligum.com.au/devboards/base-mid/Motor-control_parts.pdf
You will also need a PIC programmer - a PICkit 3 is probably still the best compromise between price and range of parts supported.
Zero999:
One of the the old ways is to use a comparator IC such as the LM393. The time delay is equal to about 1.1*R5*C1.
Changing C1 to 68µF would give a delay of about 7.5 seconds
https://www.eevblog.com/forum/beginners/pulse-extender-circuit/msg1090005/#msg1090005
EDIT:
Don't use the LM393 for a supply voltage of 3.3V, the common mode range is insufficient. Use the LMV393.
http://www.ti.com/lit/ds/snos018h/snos018h.pdf
Navigation
[0] Message Index
[#] Next page
Go to full version