??? 04/17/05 11:44 Read: times |
#91763 - Microcontroller... Responding to: ???'s previous message |
This is a perfect job for a small microcontroller and some simple software. You need to first make the following design decisions:
1) Determine what it is that triggers the start of delay for each of the four delays. 2) Figure out what kind of total range of delay control is needed. I.E. What is minumum delay time you need and what is the maximum delay time needed. 3) Determine what step size in the variability of the time delay is going to be needed. You need to select a step size that makes the delay appear continuously variable to the human but is a time period that a microcontroller can compute within. It will end up that the shortest timing delay will be some integer count of the step resolution. For example lets say you wanted the total delay from 0.2 seconds to 30 seconds. In this range of timing a delay step size resolution of say 100 milliseconds will be hard for the human to notice. However at 100 milliseconds the delay can be set at any value from 0.2, 0.3, 0.40 ..... up to 29.8, 29.9 and 30.0 seconds in a total of 298 steps. You could provide a pair of push buttons for each time delay that the user can use to raise and lower the time delay for each of the four channels. If you are clever about the software algorithm with these push buttons you can have the microcontroller keep track of how long a button has been pressed down and use this information to change the rate at which the delay value is adjusted up or down. Thus a short half second poke of a button can change a delay value by one step size. On the other hand the longer the switch is pressed you can make the delay time adjustment be more and more. This scheme can result in an easy to use delay adjustment, using cheap push buttons, that can go end to end on the delay time interval in a few seconds time. An important consideration the software will have to make is to figure out how to handle changes in the time delay value if that very channel is already in a delay. Best is to vary the existing delay dynamically. The type of software coding to use to make this type of controller easy to implement is a state machine. There is a tutorial that I posted on this forum a while back that shows a process of generating a delay to an output signal in response to an input signal. The delays in that example are fixed but it should be straight forward to modify it so that delay is variable by adding the support for the four up and four down adjustment buttons. Here is a link to the forum posting where the state machine code was given: http://www.8052.com/forum/read.phtml?id=47505 Michael Karas |
Topic | Author | Date |
HMI for adjusting timer | 01/01/70 00:00 | |
How much delay ? | 01/01/70 00:00 | |
what's do you need? Steve | 01/01/70 00:00 | |
4 channel 8 bit AD ? | 01/01/70 00:00 | |
hmm. complexity & cost issue | 01/01/70 00:00 | |
Well now | 01/01/70 00:00 | |
LPC Avilability. | 01/01/70 00:00 | |
Microcontroller... | 01/01/70 00:00 | |
link not available | 01/01/70 00:00 | |
spelling | 01/01/70 00:00 | |
Can you fix it? | 01/01/70 00:00 | |
Nope... | 01/01/70 00:00 | |
Could Craig do it? | 01/01/70 00:00 | |
What? | 01/01/70 00:00 | |
Problem, | 01/01/70 00:00 | |
Rotrary encoder. | 01/01/70 00:00 | |
Qwheel: | 01/01/70 00:00 | |
Two methods I find interesting![]() | 01/01/70 00:00 |