Another 555 timer question

elec_mech

Joined Nov 12, 2008
1,500
If you go with a microcontroller (uC) solution, the possibilities are nearly endless.

Yes, a microcontroller is a chip you write a program to. You can change the program on the fly and use the same uC. You can also put the program onto as many chips as you desire, so if you burn one up, you can easily replace it.

Microchip and Atmel are two of the biggest manufacturers of uC's. There are three languages you can write code in - assembly, BASIC, and C. Assembly is free, but it is the hardest to understand and will require a lot more writing of code than the other two. C is easier, but in my opinion, still has a fairly steep learning curve for a beginner. BASIC is the easiest to start with, so I suggest using it for your project.

That said, using BASIC will limit our choices somewhat. There are still several options and I'll attempt to list a few out quickly.

Microchip PIC - For BASIC, you can purchase PicBasic from melabs.com for $50 to $270. While this is a great project, the price is a bit high for a one-time project. If you plan to really get into uC's, then this might be an option.

Parallax - uses a Microchip PIC with interpreted BASIC. Think of needing to do a job, but instead of you doing it, you need to explain it to a translator who then explains it to someone who speaks a different language than you do. The job gets done, just not as fast. The software is free, but the chips run $40 or more.

PICAXE - like Parallax, the software is free and it uses interpreted BASIC, but the chips start around $2. Because of the slower speed, we have to get clever and add some hardware solutions, but I think this is the best bet for your project without breaking the bank.

I think you meant macromatic.com. Yes, those relays could work, but you're right, they would be pricey. You can program the uC to do the timing and then just trip a simply relay to turn on each solenoid.

What are the solenoids' ratings? You mentioned 12VDC, is this correct? What is the current rating of each solenoid? If it is under 10A each, you can use this relay board with a microcontroller to control the relays.

IF the ON and OFF time of each and every solenoid will be the same, you could use a thumbwheel switch to easily set the ON and OFF times. This assumes all the ON times are the same as well as the OFF times. If ever solenoid 1, for example, will be ON or OFF for a different time than solenoid 2, then this will not work.

Another option is to use some buttons and an LCD display - this would allow you to program the ON and OFF time of each solenoid independent of each other on the fly. This would be similar to a programmable thermostat for your house. You could also easily set or even change the sequence through the interface instead of reprogramming the uC. This will be more work, but it will pay off in the long run if you need this functionality.

I've thrown together a drawing of a couple of possibilities. Right off the top, I'd guess this project will cost you $100-200 depending on how clever we get once you factor in parts, shipping, enclosure, etc.
 

Attachments

Bernard

Joined Aug 7, 2008
5,784
Thumbnail switches outputs are most likely BCD, binary coded decimal, or decimal, 10 line. Other SW options: Rotary, around $ 1.50, 1P 6 position; DIP SW, plugs into breadboard like an IC, 6 SP-ST SW's , $ .75; rotary DIP octal ' binary out. $ 2.00. Need a choice between coded or decimal.
Throwing outmoded drawing just for kicks. Got to go.
 

Attachments

Thread Starter

dthx

Joined May 2, 2013
195
Thank you fboth or the time it too to write your notes to me.....
I learned a little about Basic in the 70's when Radio Shack came out with the TRS 80 computer....
So..I think that PCBasic from Microchip is the way to go.
They seem to have a good product too...
Let me digest all of this and do a little catching up ....and thinking about it.....and I'll get back to you in a few.....
I like the display idea too....
This could be a pretty cool think to learn.
D.
 

Bernard

Joined Aug 7, 2008
5,784
Maybe this partial drawing can serve as a guide for either μC or discrete IC implementation. U 1 & 2 are on & off time. After the time is set & operating order of the solenoids is selected via SW 2-7,SW 1 starts operation. When U2 goes low, the timing starts again & U3 is incremented to next step. At reset U3- 0 is hi, SW 2 was set to 2, second solenoid; as all 2's are connected to U5, #2 solenoid is selected first, all other inputs to big OR are LO; inputs to U8 are HI, so #2 solenoid is ON. After the 6th operation U3-6 goes high, resetting U3, U1 &2, stopping all operations until next closure of SW1. All subject to review
 

Attachments

Thread Starter

dthx

Joined May 2, 2013
195
Thank you very much....I know you spent some time on it..
Jesus....!
I gues it could serve as a guide but there is no way that I can figure it out...
I'll hang on to it and thanks.
I get the general idea of your explaination but we are a Looong way apart.
D.
 

Bernard

Joined Aug 7, 2008
5,784
It's not so daunting if you just take a small piece at a time; look at the top of page, VI-Experiments- 555 timer ckts- esp- mono stable. For about $ 20, everything shown on my drawing , inc BB & wire , postage around $ 6. This was from All Electronics. If you wish to carry on, we will fill in pin nos & missing details.
 
Last edited:

Thread Starter

dthx

Joined May 2, 2013
195
Yep...Understood....one step at a time...
Let me ask you ...
If I decide to wade into this world...and I brush up on my Basic programming skills...
will that lock me out from any specific development board and any chip manufacturer...
OR....will they all accept Basic programming....
D.
 

Bernard

Joined Aug 7, 2008
5,784
I filled in some of the details from post 24 for my own amusement, works fine on breadboard. If U1 time is to be 2 s to 10 s, R3 selected to give 2 s with R7 shorted; for 10 s max, set R4 to max & parallel with Rz to give 10 s. U1-3-X goes to AND gates, post 24.
 

Attachments

Thread Starter

dthx

Joined May 2, 2013
195
thank you, Bernard...
I think Im gonna concentrate on the microcontroller option.
This project is for the 4H Shooting Sports Program in my Parish...Im attempting to build some pop up shooting targets that pop up and go down for a randomly selected number of seconds...
The targets will be popped up by pneumatic cylinders which will be controlled by pneumatic valves with 12VDC solenoids...
Several of the youngsters want to help me with this project and a couple are able to solder and have built a crystal set, etc...
Ive got the pneumatics handled but I need help with the micro....and understanding how some of the circuits work.
Im going to use this thread for ALL my questions on theory and such in order to keep everything in one place.
I'll be having some hip surgery around the middle of June but will be up and around in several days after that.....
Stay tuned....
 

elec_mech

Joined Nov 12, 2008
1,500
Bernard, when time allows I'm going to build your circuit and learn from it as I had several problems resetting mine, so know your work was not in vain. :)

Dthx, I sent the PICAXE programmer to you yesterday, so you should see it soon. Could you review again your requirements and how you'd like the circuit to work?

In this thread you mentioned 6 solenoids, but in another you mentioned 10. How many do you want to control in total?

Could you give it some thought then go through, step-by-step, how you'd like the circuit to operate? I can write some code to get you started.


Some things to consider:
  1. User interface (UI) - would like to keep it simple and use BCD thumbwheel switches to indicate the on and off times? This assumes ALL solenoids will be on and off for the same time relative to one another. If not, then consider an LCD display. In either case, consider what other switches you'll need, e.g., start, pause, reset, select, etc, and how many.
  2. How would you like to control the solenoids? If price isn't too much of a concern, I'd suggest using a pre-made relay board such as this. If you're trying to do this as inexpensive as possible, you can use logic-level MOSFETs with a few passive components.
 

Bernard

Joined Aug 7, 2008
5,784
elec-mech, the RC time of R8 & C4 needs to be longer than R5 & C2 to make sure that 555's stay reset. Reset pulse is about 500μs. This ckt. is supposed to represent what the μC does.
Can the μC handle the 36 switch contacts? Looks to me that hard wiring is a workable option for big OR gates, would wire diode anodes directly to SW contacts, cathodes, all 6, tied together with a load resistor of 4k7 to gnd.
If using IC OR, each input should have a pulldown R, but with lo-z 4k7 ,no Rs needed.
Would still like to know specs on air valve.
dthx, are you making the pop-up targets & for what ammo?
 

Thread Starter

dthx

Joined May 2, 2013
195
1.) I have 6 (six) 12VDC solenoids that require 333 ma each.
2.) Each solenoid controlls a pop up shooting target.
3.) An energized solenoiid = Up
4.) A de energized solenoid = down
5.) A gang of 6 (six) thumbwheel swithces (one thumbwheel for each solenoid) will dictate the order in which order the solenoids will fire.
6.) A pot will pre-set the UP time ( 0 to 10 sec) AND....
7.) Another pot will set the Down time (0 to 10 sec).
Therefore the UP and Down time will be the same for all solenoids.
If the first thumbwheel switch is rolled to 4....then #4 soleniod will fire first.
The target will pop up for a preset time and then go down for a preset time...
Then the next thumbwheel will determine which solenoid is next.
So....
Turn the power on with a switch...
Set each thumbwheel to determine which sol fires 1st, 2nd, 3rd, 4th, 5th, and 6th.
Set the UP time by rotating a pot to the desired time
Set the Down time by rotating a pot to the desired time.
Push a button to start.
After the last solenoid fires ....everything stops until you push the start button again.
 

Thread Starter

dthx

Joined May 2, 2013
195
Im not sure that Ive explained the thumbwheel clearly.

There are six separate thumbwheel switches ganged together.
Each wheel (on each switch ) will probably have numbers from 0 to 9,,
But we will only be using numbers 1,2,3,4,5,6.....because we only have 6 solenoids.

The first wheel ...say....is rolled to 4
That means that the first sol that fires is #4
The next switch in the line of six is rolled to ...say.....5
That means that the second solenoid to fire is #5
and so on...until all the solenoids have done their duty.
In the random order of the thumbwheel settings....
Which we can change ...next go around.
 

Thread Starter

dthx

Joined May 2, 2013
195
I dont think that I'll use a display or touchscreen ....
The control box will have...
A Power on switch
A 6 gang thumbwheel with a flange mounting so the wheels show thru the top of the box
A start switch
An Up tiime Pot
A Down time Pot
Yes, a relay board would be fine.....the board you showed me didnt get good reviews, though...I assume I could build one.....
 

Bernard

Joined Aug 7, 2008
5,784
Makes sense to me.
If decade [ 10 output contacts] thumbwheel SWs are used the OR gate can be built right on the SW contacts.
Also ,times can be set with thumbwheel SWs
If a target is hit while pressure is on, how do we know that target was hit? Some details on target would be interesting.
 
Last edited:

tracecom

Joined Apr 16, 2010
3,944
Im not sure that Ive explained the thumbwheel clearly.

There are six separate thumbwheel switches ganged together.
Each wheel (on each switch ) will probably have numbers from 0 to 9,,
But we will only be using numbers 1,2,3,4,5,6.....because we only have 6 solenoids.

The first wheel ...say....is rolled to 4
That means that the first sol that fires is #4
The next switch in the line of six is rolled to ...say.....5
That means that the second solenoid to fire is #5
and so on...until all the solenoids have done their duty.
In the random order of the thumbwheel settings....
Which we can change ...next go around.
Have you considered that the same solenoid might be selected on multiple thumbwheels, and is that ok?
 

elec_mech

Joined Nov 12, 2008
1,500
Yes, a relay board would be fine.....the board you showed me didnt get good reviews, though...I assume I could build one.....
I'm not sure which reviews you are reading. 36 reviews on Amazon give it 4.5 stars. Now, I haven't used this before, but for the price and having something pre-built, it seems like a good deal. However, you should be able to easily use a logic-level MOSFET which will take the place of a relay, take up less space, and cost less.

Interesting UI. Bernard's circuit would work well for the timing. I haven't given it an ounce of thought, but I'm wondering if this is possible without a uC - if so, it will require more parts.

May be possible to combine Bernard's timing circuit with a uC. The latter would handle reading the BCD switches and firing the solenoids, the former would handle the timing. Just a thought - there are a lot of possibilities to explore.

I've thrown together a schematic if you opt to do this solely with a uC. It is far from refined (probably need some diodes across the solenoid contacts), but it gives a feel for what is involved. I need time to study it and see if there is a way to reduce the required uC pin count down. As shown, you'll need a minimum of 22 I/O pins, with two of those being ADC inputs to read the potentiometers. The DS1307 provides a reliable 1-second clock signal.

Based on this, you'll need a PICAXE 28X2. We could replace the DS1307 with a simple 4060/4013 combo, but this only gets us down to 20 I/Os or we may be able to rely on the PICAXE's internal timer since we don't need to do much from a program standpoint. The next smallest PICAXE has 18 I/Os. We could use a shift register or two which would reduce the pin requirement further.

To everyone else, feel free to pick apart and suggest improvements or alternatives - this was literally thrown together.
 

Attachments

Thread Starter

dthx

Joined May 2, 2013
195
For Tracecom:
Good point...no ,I hadnt thought of that...but it would be Ok if that happened.
For Bernard:
These are archery targets....when the target pops up...for say ...5 secs....the archer has 5 secs to shoot the target....the target then lays down out of sight....for say....another 8 sec...the archer gets ready for the next target to pop up....
After the round....someone goes out and retrieves the arrows...scoring the round.
The arrows stay in the targets until the end of the round...
For Elec_Mech:
If we can accomplish this without using a microcontroller....that's ok with me...
And my comments about the relay board was just that.....a comment.
I'll be glad to buy a bunch of components and breadboard this all together, etc...
I want to do my part and dont want you guys to feel like I'm freeloading....
If you want to try Bernards circuit and you need me to buy something and send it you, I will be glad to.....or I can send you a check and you can buy what you need....no prob.
 

Bernard

Joined Aug 7, 2008
5,784
If the μC can handle all of those inputs & outputs- WOW. Sometime I must take off a year and learn more about them. I believe it would be easier to operate pots if they were single turn with labeled times. Also ' would be more comfortable with diodes across solenoids & not rely on FET internal clamps.
If power supply & FETs are rated for multiple simultaneous firings, might create some interesting effects. What a fun project!
 
Top