Automate PCB to automatically invert the polarity of the output for every pulse

Discussion in 'The Projects Forum' started by Johanpp, Jun 7, 2016.

  1. Johanpp

    Thread Starter New Member

    Jan 5, 2016
    11
    0
    I have a PCB which gives me a polarized pulse every 60 seconds. The H-Bridge relies on an external pulse to PinA the first time and then PinB for the next pulse and so on....

    Currently I use Arduino V3 for these pulses. Is there a way to expand the function of my PCB to automatically send the pulse to PinB if the previous pulse was to PinA and then again to PinA the next time, and so on.......

    So, pulse to PinA, then PinB, then PinA and so on.

    Can someone give me a schematic?

    I will appreciate this very much.
     
  2. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,810
    834
    What is a "polarized" pulse? What is its frequency and magnitude?
     
  3. Johanpp

    Thread Starter New Member

    Jan 5, 2016
    11
    0
    It is simply a 5 volt 100ms pulse from an Arduino board.
    Polarized means wire one carries the V+ and the other wire the GND. Then for the next pulse a minute later wire one will carry the GND and wire two will carry the V+. These wires then connect to a coil which will change the polarity of the magnetic field of the coil. This coil then speeds up or slows down a mechanical public clock to keep accurate time all year round.
     
  4. crutschow

    Expert

    Mar 14, 2008
    13,028
    3,237
    So what you need is to reverse the polarity of the pulse between two wires.
    That can be done with a transistor bridge circuit.
    What is the current and voltage of this pulse?
     
  5. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,810
    834
    @crutschow - the OP has stated it is a 5VDC pulse from an Arduino. @Johanpp - what is the voltage and current of the coil?

    If the coil current is under 600ma, one could use a CD4013 wired as a T flip flop driving an LM293D H-bridge.

    If the current draw is more than 600ma, you could build your own H-bridge to handle the larger current.

    Do you have an extra pin on the Arduino? You could eliminate the flip flop by driving alternate pins in software.
     
  6. Johanpp

    Thread Starter New Member

    Jan 5, 2016
    11
    0
    The Arduino collects the 1 second pulses from a GPS receiver and on the count of 60 sends a 5V pulse to the H-Bridge, PinA for one polarity and PinB for the reverse polarity.

    The voltage of the PCB is 12V (LM7812) for some applications and 24V (LM7824) for others.
    The output of the H-Bridge goes to either a 1 Amp Coil, or a DC motor, also 1 Amp, but with room for the starting surge.

    I already have an H-Bridge on the board which is working well, but because of the cost I would like to eliminate the Arduino. The H-Bridge needs to be pulsed on the left side for one polarity and then the right side to reverse the polarity, hence the Arduino which I am trying to eliminate.

    Since the Arduino handles the polarity and the counting of the 60 seconds it now seems to me that I will need some intelligence on the board to replace the Arduino. Something like a PIC 12F675 or a PickAxe. Any ideas as to which chip will be the easiest to master. I can program in C## and it seems the Pickaxe uses C. @@@ Wrong, it uses Basic Johanpp @@@
    Your views will be appreciated.
     
    Last edited: Jun 9, 2016
  7. Johanpp

    Thread Starter New Member

    Jan 5, 2016
    11
    0
    Yes, I only use Pins 2, 4, 7, 8 and 9.
    But, I have now realized I still need some intelligence on the board to do the counting of the 60 seconds derived from the 1 second pulses of the GPS receiver. Would a PicAxe or similar programmable chip not the best route? I have no experience on these, so if this is the way to go, do you have any suggestions?
     
  8. KeepItSimpleStupid

    Well-Known Member

    Mar 4, 2014
    1,147
    204
    That's the good ole' flip-flop, a divide by 2 counter.

    https://en.wikipedia.org/wiki/Flip-flop_(electronics) Look at the J-K flip flop. When J=K the output toggles. Q and ~Q are the inversions of each other. You have to ensure the correct power up state.
     
  9. crutschow

    Expert

    Mar 14, 2008
    13,028
    3,237
    A PicAxe can readily handle the divide by 60 count and generate the pulses, the same as an Arduino.
    The PicAxe uses Basic language which is very easy to learn and use.
    Personally I prefer Basic for simple programming projects as compared to the arcane C syntax.

    Of course the pulses could also be generated using a couple of counter chips and a flip-flop plus a few logic gates.
     
    Last edited: Jun 8, 2016
  10. Johanpp

    Thread Starter New Member

    Jan 5, 2016
    11
    0
    The flip flop looks like it will work, but I am too new to this and far more comfortable with something I can program, especially as this one PCB must cater for a few different applications, So I will follow that route for now.
     
  11. Johanpp

    Thread Starter New Member

    Jan 5, 2016
    11
    0
    I think this sounds too complicated for my experience. I will firs have a look at the PicAxe.
     
  12. Johanpp

    Thread Starter New Member

    Jan 5, 2016
    11
    0
    I think the PicAxe is what I will go for. I am picking up a PicAxe tomorrow to have a better look at it. I have programmed in Basic, QuickBasic and Visual basic for many years.
    I will keep you updated. Thanks for your help so far.
     
  13. Johanpp

    Thread Starter New Member

    Jan 5, 2016
    11
    0
    See my reply to you further down.
     
Loading...