magnet control through PIC


Closed Thread
Results 1 to 23 of 23

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Location
    West Hollywood, CA
    Posts
    38

    Default magnet control through PIC

    Okay, so I'm not sure where to put this thread.

    I need to control multiple electromagnets from a PIC18F4550. The strength of the magnets needs to be varied over time, and each magnet individually controlled. To make this more difficult, I need to control more magnets than the PIC has outputs.

    Thoughts?

    -Sterling

  2. #2
    Join Date
    Jan 2006
    Location
    New Hampshire, USA
    Posts
    107


    Did you find this post helpful? Yes | No

    Default

    Implement a 4 bit binary counter and use '154 one of 16 decoder. With a 2 port PIC you could control 128 magnets easily.

    Russ

  3. #3
    Join Date
    Mar 2007
    Location
    West Hollywood, CA
    Posts
    38


    Did you find this post helpful? Yes | No

    Default

    I understand the 1 of 16 decoder, but I'm lost, those decoders have 4 inputs. Two '154 ICs would require 8 pins from the PIC I'm guessing the 4bit counter resolves this, but I'm not clear how.

    Can you be a bit more specific to my untrained brain?

    Thanks,

    Sterling

  4. #4
    Join Date
    Mar 2007
    Location
    West Hollywood, CA
    Posts
    38


    Did you find this post helpful? Yes | No

    Default

    What about using a 1-wire network to address each magnet seperately? Maybe that's much more costly. I have no experience with 1 wire networks.

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Depending on the wattage of the magnets, there are several ways to control them. Use PWM or maybe even FREQOUT. Connect the mag circuit to you chip with an opto-isolator or drive the mags with a MOSFET or IGBT. There are pros and cons to each though.

    How many more mags than pins? How many mags need to be on at a time? Look at some of the recent post about LEDs, add driver hardware and...
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hi SterlingY,

    Don't know your level of expertise, but if it would help, there's a book out for Basic Stamps (these are PIC's) called "The Microcontroller Application Cookbook" that has a chapter on expanding I/O using only a few port pins and it has some code examples. Volume 2 also has some interesting I/O examples. These books are available from www.parallax.com and www.nutsvolts.com and probably from Amazon.com.

    HTH,

    BobK

Similar Threads

  1. DTMF and PIC for Remote Control
    By doggitz in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 30th March 2010, 11:42
  2. Replies: 5
    Last Post: - 12th September 2007, 15:59
  3. Motor Control PLC with a PIC
    By sougata in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 2nd November 2006, 07:59
  4. Pic Control With Software
    By Agent36 in forum General
    Replies: 5
    Last Post: - 18th October 2006, 18:18
  5. Need help on pic to pic flow control (simple problem I think)
    By khufumen in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th January 2006, 00:34

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts