# PWM circuit help

1. Mar 13, 2006

### justinreeves

Hello, I am trying to create a PWM circuit but I need a couple controls with in it. I need to control frequency and pulse width (duty cycle)seperately with 2 pots.
This is going to control a spring loaded electromagnet for oscillation.
I need pulse width control because of the varying elctromagnets it will be connected to at times, and the loads they will pull differ also.

Here is a site I have been looking at they mention a 556 and a FET.
but he mentions it not absolute on/off.
I think with what Im doing I would rather it be absolute on/off.

http://casemods.pointofnoreturn.org/pwm/circuit3.html

There is a example of a 555 w/ opamp.

In this schematic can I just put a pot in place of RF? If so wouldnt the pot work in reverse? ie as it turns counter clockwise it speeds up?
If so are there reverse resistance pots?

Im just a car audio tech. I dont ever work with IC,s. Resistors caps and ,diodes is all I work with. Can someone recommend a way to learn basic electronics, I know a 555 is basic and I should know how it works and how to use it.Most of the stuff I learned is just past the MECP guide, ohms law, just figuring curent, voltage, resistance...No IC training. Is taking a class easiest or are there books out there that would work as well and quicker.recommendations?

2. Mar 13, 2006

### Cliff_J

Sure you could just put a pot in place of RF in that schematic.

Ok, a pot has 3 contacts on it. The outside pair has the full resistance (lets say 200k) and the middle contact is the wiper that varies from one end to the other.

In this example, use the wiper and one end, that would give 0-200k, and if you want CCW instead of CW just use the other end and now it will be 200k-0.

The pots come in two varieties, log and linear, for this you probably want linear so the frequencies are easy to distinguish and could be marked out easily for the rotation of the knob (if you wanted a volume knob, a log pot makes better sense since hearing is logarithmic).

There are some decent books at Radio Shack (if they even have them anymore amoungst the cell phone and batteries and other high margin items that have overrun the stores) and also in many bookstores. Since the quality varies, its nice to preview the book to make sure it is what you're looking for, Amazon.com has a decent version of this but a local B&N or Borders is hard to beat to look a few books quickly and see if it has what you're looking for. The internet has a plethora of information about circuits if you have a little persistance to find the information, and the price can't be beat!

By the way, what's this for? If you're trying to build a woofer tester or something like it, you'll want a different approach.

3. Mar 13, 2006

### justinreeves

This is not for audio its for a tattoo machine. I didnt know that about pots. good to know.
I had another question, now that I think about it, I want the FET to swith power from a variable voltage 2 amp approx. power supply, I want the circuit to have its own power supply seperate from what the FET switches. WHat dirrent connections would need to be made there?

4. Mar 17, 2006

### Staff: Mentor

Here's a book recommendation that is perfect for you:

The Art of Electronics, by Horowitz and Hill.

Your local technical bookstore will have it, or else you can just get it from Amazon.com. It's a quick read, and it will give you all the tools you need to understand the circuits that you are starting to work with. Have fun!

5. Mar 28, 2006

### justinreeves

Ok new question same schematic. I want the circuit to switch the power from a different source then the one used for the circuit, because the circuit is a add on to a preexisting power supply that has a voltage and amperage control. Also this circuit is for engaging 2 electromagnets, when I initially connected the circuit to the coils they just engaged and stayed that way they didnt pulse on/off. so I added a electrolytic cap in parallel to the coils to discharge any power left in the coils between pulses. it works for the most part but some times will stick, What type and or size cap would you suggest? It all looks good on the o-scope though. and I even tried disconnecting power to the coils and they still stayed engaged,strange.

6. Mar 28, 2006

### Staff: Mentor

Are you saying that the relays/electromagnets stay engaged when you remove drive from the coil? Any chance that they are latching relays?

7. Mar 28, 2006

### justinreeves

no they are just electromagnet coils on a tattoo machine being driven by this circuit
the coils pull down on a armature bar that is connected to a piece of spring steel, wich pulls the armature bar up. and the coils pull it down, it sticks in the down position.
the coils are wound on a plastic spool with a iron core, the armature bar bottoms out on the iron cores as a stop. I tried shunting across the coils after disengaged to ground and it still stayed stuck, strange.

8. Mar 28, 2006

### justinreeves

similar to these coils

9. Mar 28, 2006

### justinreeves

10. Mar 28, 2006

### Staff: Mentor

Maybe just a lubrication issue? How easily do the armatures move? Does the steel return spring keep the rod centered pretty well, or is the rod binding on the plastic maybe?

11. Mar 28, 2006

### Cliff_J

How much "stick" is there with the coils disenergized? Less than if its fully powered up? Sounds like maybe residual magnetism then. Try running current through the coil in the opposite direction briefly and see if you can neutralize it.

12. Mar 28, 2006

### justinreeves

the armature bar is connected to the spring steel wich is in a normally up position then the magnet pull it down until it touches the top of the to coils. there is absolutely nothing to bind or to get stuck, it has to be a magnetic/electrical problem.that or if power was running through the cores and the machine frame it could be arching and welding itself in the down position, but there isnt power running through the frame or the cores. See the circuitmI can run power backwards.

13. Mar 28, 2006

### justinreeves

there is definitely residual magnetism in the coils that is why the cap is there(at least on a standard machine, that is why I tried putting it on this system, only problem is on a standard tattoo machine the voltage is pulsed and while circuit is open machine rests at ground so the cap not only takes the charge from the coils but discharges also, Ive been told a standard machine (non-PWM) is like a tank circuit.

14. Mar 28, 2006

### justinreeves

OK back at home, Just in case it was the capacitor in paparalell to the coils value, I originally had a 10uf 35v cap on it, I had a .1uf 100v laying around tried that, magnetic sticking was almost instantly no matter what setting speed ...So I also had a 70uf 100v it works fine with the 70uf but the coils get really hot fast, compared to the standard electro/mechanical system the machine was originally setup as. and it runs hotter than when I had the 10uf cap on it. any ideas? whats going on.

15. Mar 28, 2006

### justinreeves

Not to familiar how stuff like this should look on a scope but it doesnt look like absolute on/off to me. the line reads flat then on the pulse it drops down far but half way through the cycle it returns to about half of the original pulses drop.