Electronic – Building a variable frequency magnetic pulser

coilpicwaveform

I'm starting a little project that will run a square wave through a copper coil to make magnetic pulses. I imagine the project would be quite straight forward if I were a little more experienced with making electronics.

The exact specifications of the coil and magnetic pulses are essentially not that important. I don't want to go into too many details about why, but suffice it to say the device should "work", i.e. it should generate magnetic pulses that are easily detectable with, say, a steel washer. The frequency range I'm targeting is about 50-120Hz which I'll generate with the PWM module in the PIC.

Here is what I have so far:

I'll use a 2155 type 1A xformer, and I'll be using the 6.3 and 15V taps.

I'll use the 6.3V to drive a 5V VR to power a PIC16F877A (I think those are the ones I alread have lying around). The PIC will use a potentiometer set up as a voltage divider on an analog pin to control the frequency between a given range (I've never done any analog or ADC stuff before). The PIC will also drive a small 8-segment display to show the frequency, and I'll use a crystal oscillator to give the PIC a more stable clock (I've had issues with timing in PICs before). The square wave will be between 0 and 5V.

For the coil, I basically want as much as possible, so I'll use the 15V to drive a 12V VR. I'll use the square wave output of the PIC (positive only) as a 5V input to an OpAmp. 5V -> 12V is a gain of 2.4, so I'll use a 240K and 100K resistor for the feedback of the OpAmp (I've also never used an OpAmp before either). I'll also use a schotky diode, reversed, to prevent the collapsing field to burn anything out.

I hope that all makes sense and sounds more-or-less reasonable. I know I don't need to use a PIC, but I've used them before and they're easy to program use, and I'm a lot less confident doing analog frequency adjustment with, say, a 555 (also never used these before either, lol), and using an 8-segment driver. I just want something that works and that's within my capabilities.

Here are some parts I have so far: (I'll be using 240V mains)

  • 2155 type 1A transformer with 6.3, 7.5, 8.5, 9.5, 12.6, and 15V taps.
  • 7805T 5V regulator
  • 7812T 12V regulator
  • BR104 10A 400V rectifier x2 (one for the 6.3 and one for the 15V)
  • 8Mhz crystal for the PIC
  • 1K linear VCU pot
  • SB560 schottky diode 60V 5A
  • 0.5mm 500g enamelled copper wire (approx 180m length)

I'll also have some electrolytic caps before and ceramic caps after the rectifiers in the power supply sections. I've got a bunch of these lying around in my drawer already.

I have a few questions:

  • If I've said anything absurd so far, please point it out.
  • Let me know if any of these components seem wildly overkill, e.g. the schottky diode or rectifier, for example.
  • I'm not sure if I even need a voltage regulator for the high(er) voltage section. If I can avoid it and just use bigger caps, I can drive the coil at 15V which would be "better".
  • I have no idea what OpAmp to get. I'm looking at the LM301AN which seems reasonable.
  • I'll wrap the coil reasonably tight. It's ~180m and I aim to have it in a small package around 4x4x2cm approx. I don't know how many turns this will be, but probably "a lot". I can only assume that driving a 0.5mm copper coil at 15V @ 120hz should be fine? (i.e. won't burn out)

Sorry for being so vague. If you comment with a question I can actually answer, I'll do so.

Thanks for your help.

If I get some things clarified here, I'll order the parts online and post a circuit diagram in the next few days, and then we can all laugh together at how bad it is.

Best Answer

The coil, it seems, is not well-defined and my first thought is that an op-amp won't cut the mustard on driving it successfully. The LM301 is only really suitable for driving kohm loads so I believe you ought to invest in a power transistor to interface the op-amp to the solenoid/coil.

But hold-on, lose the op-amp and use a logic level mosfet driven from the PIC'c PWM output. Connect source to 0V, gate to the PIC output and put the coil between drain and positive supply. This will give you a better drive to the coil and don't forget to put the diode across the coil reverse biased to catch the back emfs when the transistor is turned off: -

enter image description here

The 100k resistor is to ensure the mosfet remains off when the input is not connected to anything (important). The 1k is to limit stress on the PIC output because the MOSFET will likely have input capacitance in the order of 1nF. You need to find a MOSFET that will switch fully on with the positive drive level from the PIC (5V presumably).