Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Using pulses from a quartz clock to drive a solenoid... unexpected behaviour

Status
Not open for further replies.
Replace R11 with 1 or 2 diodes in series. Also, connect the pullup resistor on the clock input to the power pin on the 390.
I meant to mention that in my last post.
 
Last edited:
Euphy,
You deleted your schematic in post #28? Now all the subsequent posts make no sense to others now or in the future. Better to post schematics here, rather than links that will disappear.
ken
 
Hi Ken, I thought there wasn't a way to attach them directly, and I could only post links.. hence the link. I've dug a little deeper and I see the attachment feature now under advanced.. I will try to fix retrospectively, but otherwise, I'm sorry and I'll do better in future!!

. Perhaps better than nothing.
 

Attachments

  • linearclock1.gif
    linearclock1.gif
    20.4 KB · Views: 169
Last edited:
Ok, I have done that, but am running low on parts, so
R9 is 5.6k rather than your suggested 10k
c1 is 2.2nF rather than your suggested 1nF. The first diagram shows the circuit as it stands:
linearclock3.gif

This exhibits the same problem as previously, where the power to the counter is disrupted when the solenoid is on. I don't think it is a problem to do with the 555 section, because it occurs even when that whole section is disconnected and unpowered. I can prompt the behaviour by shorting the solenoid to ground, energising it. As long as it's shorted, the counter races. osc3.gif (the clock in to the counter) and osc4.gifthe supply voltage to the counter.

I've tried another circuit: linearclock3a.gif
that is just the above circuit but with a set of batteries (common ground) for the powering the solenoid. That works fine, every time, without affecting the power to the counter: Rejoicing etc.

Ok, so my problem is decoupling the solenoid power supply from the counter supply, I think? At the moment, I have two 10uF electrolytic in parallel between the +v and ground, which is far from the 47uF that was specified on my diagram for the 555 portion (at **broken link removed**) because I didn't have any more bigger capacitors spare.

Is it worth me beefing that up? Even running with three 10uF in parallel doesn't seem to make any difference to the shapes of the supply graph or the clock graph. Does it matter that they are polarised electrolytic caps? I have also tried adding a 10uF in parallel with the 0.1uF cap on the supply to the counter, without being able to detect any difference in voltage.

Thank you all for your time helping me with this, I really appreciate it!
 
Last edited:
I'll work on your problem after you tell us why your ULN2803 pin numbers are wrong.

Yikes, really sorry Ron, folks, I had a 2003a (DIP-16) in my schematic software and had changed the name because it didn't have a 2803 in the library! And I got caught up with making the rest that I never went back to change the part. Specially since visually it married up just fine.

The exact model is https://www.st.com/stonline/products/literature/ds/1536.pdf

Very sorry about the confusion this caused.. hopefully it doesn't have much significance for the circuit. Here's a fixed version:
linearclockc.gif
 
You've got the clocking circuit a little screwed up, and furthermore I think that the 2803's crappy logic low level may be the cause of your problem. Attach is a partial schematic, with the proposed clock buffer change.
 

Attachments

  • Euphy's counter clock ckt.PNG
    Euphy's counter clock ckt.PNG
    29.8 KB · Views: 165
Last edited:
IMHO, a MOSFET would be a better solenoid driver than a ULN2803A. You would also need a resistor and a diode, but with a 6V relay, you are probably only getting about 5V across it, due to the saturation voltage of the 2803. With the proper MOSFET, the voltage loss could be a few tens of millivolts.
The relay is probably designed to pull in with less than 5V across it, but it just seems like it would be more reliable with the full 6V across it.
 
You know, I think you are absolutely right! Because I've just made that change and it works perfectly now! Looking at a graph of the supply voltage, there's still a big drop whenever the solenoid is on (as you'd expect I guess), but it doesn't affect the counter at all. That's brilliant.

I've still got the 2803 wired in to use to drive the solenoid, but I think I'll probably replace it with a discrete transistor pair instead.

I really think that's it done Ron, I can't tell you how pleased I am, and grateful for all of your help!

YouTube - Linear clock circuit working proper style

I hope further challenges are ones I can rise to myself, but I'll let you know the results when the project is all done and dusted.

Cheers guys!
 
Aye, I've been a bit afraid of MOSFETs for some reason, but almost all of the references I've seen online for solenoid drivers suggest that that's the easiest way to go. Well, I might still come back for some advice later in that case! Any idea of a good one to try and start with?

Ta!
 
Last edited:
Haven't done it enough to have a typical place, but online, uk based. I've used rapid most recently, but also RS just before that, and smaller places (oomlout, coolcomponents) for arduino/roboty stuff.

I have just got rid of the 2803 and have a NPN pair driving the solenoid (with a back-emf protection diode). Working swell! One thing made me scratch my head - I only had one 2n3904 left over to make the NPN pair with, but I've got loads of 2n2222s, so I used those. It worked, and I thought it'd be better to use those throughout the entire circuit (smaller number of parts required), and so replaced the 3904 at the input of the circuit with the 2222. And it ran, but it skips over the 0th tick... If you see what I mean- The counter goes straight from 9 (1001) to 1 (0001) instead of to 0000. It's no big problem, I switched back to the 3904, but it made me frown a bit - I see the 2222 and 3904s being specified interchangably often, just curious about what the difference is that is so subtle that it exhibits in this behaviour... Would I be safe to use the 3904s in my driver pair?

Thanks!
 
As a half amp switch, 2N2222 is marginal, but should work. 2N3904 runs out of breath at about 100mA. Your discrete Darlington saturation voltage won't be any better than the ULN2803A.
The clock input circuit may have rise and fall time issues. You can improve the falling (active clock) edge by changing the base resistor to 10k, but the 2N3904 will always be faster than the 2N2222, all other things being equal. Your problems may be due to the long wires and high stray capacitance in your breadboard. Wires are antennas and inductors. The longer they are, the more likely you are to have problems.
Rapid has an N-channel logic level MOSFET, **broken link removed**, which you should be able to drive directly from the 556. Connect the 556 output to a resistor (47 to 100 ohms, not critical). Connect the other end to the gate. Connect the source to GND, and the drain to the solenoid. Be sure to connect a diode (1N400x) across the solenoid, cathode to +6V.
 
Just wanted to let you know that the MOSFET works exactly as you suggested, and the circuit is great. Thanks for all your help on this project. It's not yet moving actual pointers, but it will be soon, and I'll post an update when I get the finished clock ticking, in case anyone here is interested.

Cheers
sn
 
Eventually got a Linear Clock going, but the circuit so thoughtfully worked on here in this forum is on the shelf for the moment. I copped out and used a (you guessed it) arduino and some steppers to directly drive the hands. I don't like that this makes me depend on continuous mains power, so I will be revisiting the intermittent solenoid stepper at some point in the future. I just don't think a clock should have wires hanging out the bottom!

Linear Clock Instructable

It's in the running in a competition to win a laser cutter too, so it'd be great if you could have a look.
Thanks
Sandy Noble
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top