I have a portable mortor mixer that came with a on/off switch. My mixing time is consistantly 3 minutes long. I would like to know if it is possible to buy/make a toggle/rocker switch along with a timer that when the switch is thrown, the mixer will run for 3 minutes and then shut off and then the timer reset for the next mixing. This would help me from continously having to look at my watch while working durning batch mixes and help eliminate under/over mixing times. The material I am working with is a bit messy so a timer with a turn knob would not last long after it got coated with material off my hands. The motor on my mixer has a rating of 0.55kw, absorbed current 9.2A, 115 volts, and frequency of 60 Hz.
Electronic – 3 minute switch/timer
switchestimer
Related Solutions
I'd not like to ruin your learning fun BUT if you get a more or complete idea on this project you can move on to more difficult ones.
The circuit below is almost exactly what immediately came to mind for me (I have had lots to do with 4017's in recent years :-) ) and lo and behold somebody has done a very nice job of writing it up.
The 4017 is a decoded "Johnson Counter" (look it up) which provides a sequencing one-of-ten output.
You can cause it to
count up to position N and stop,
or to position N and then reset
or you can chain chain several together
or more ....
A very useful IC.
Datasheet for the basic CMOS version here
and for the buffered 74HC4017 version here.
Note that the "basic" CD4017 has a very special feature which tends to be lacking on all "improved" versions - it has a Schmitt triggered clock input - which means that you can use it with a user pushbutton input or other slow and noisy input. ometimes an immensely valuable feature.
The circuit itself is enough:
Does this do whta you want?. Well, almost.
Look at the enable and reset lines.
Look at the datasheet.
What happens if you plug the enable line into output N?
https://homepages.westminster.org.uk/electronics/images/4017_08.gif
BUT they have done a really superb job of presenting a plug in bread-board version here
Leading to this. You could use one small breadboard and less LEDs and a different oscillator
(eg 555 / 4040 et al etc) but this is an extremely nicely done example
THEN you can consider a zillion alternatives [fromhere] - all images hotlink to a page. Look at he top of the page to see the obvious and extremely useful way that I got this eggtimer circuit collection and this overlapping but not identical egg timer circuit collection (plus some other stuff in each case).
74HC4017 "under the hood":
Clock accuracy:
Try it and see. Use a good quality clock cap- NOT a ceramic.
What if you clocked it twice as fasts and used eg diodes to OR a single LED per 2 outputs?
Or 3 times as fast?
If you want to use a faster clock look at CD4040, CD4020, CD4060. Note that one of these can both divide and self oscillate. You can still have 2 ICs total but a clock and a divider as well. Enjoy.
To do any good, you will have to sample the audio at some set rate (usually at some thousands of samples per second.) You can find out how many samples per beat you have and calculate from that to get the beats per minute.
As others have said, though, this isn't really a job for a little ATMega. To do the job with any kind of accuracy, you will need to do some pretty hefty signal processing - an 8 bit processor at 20MHz is not going to do it unless you are an absolute DSP genius who can find a new, unbelievably efficient algorithm and implement it on an 8 bit microprocessor instead of a DSP.
If accuracy isn't important, you could do as you planned (detecting peaks.) The number of samples between peaks can be used to calculate the BPM. Say you are sampling the audio at 8000 samples per second, and you find the peaks are 4000 samples apart. That would 2 peaks per second, or 120 beats per minute.
As you already know, though, the simple method of detecting peaks will get you a lot of false peaks. You might be able to reject peaks that are too close together, but you should be prepared for the results to be pretty lousy.
Best Answer
An alternative would be to use a time delay relay designed for industrial control systems, such as this 820 Series from Magnecraft. This relay could be set in 'inteval mode" and installed in series with an existing toggle switch (on the load side). Then you would just turn the mixer on, and the relay will limit the run time of the mixer to the programmed time. turninh the power switch off and on again would initiate a new cycle. Turning off the switch will immediately stop the cycle.