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.

56 outputs

Status
Not open for further replies.
This project is definitly doable with a LOT of shift registers and DAC's but with 56 outputs you're talking about an absolutly massive board and a really high price tag. PWM would work, but not on 56 channels independantly.
There are two important questions that I can think of off the top of my head. How much current do you need to drive into these electromagnets and what is the update rate you need?
 
As suggested, you might be able to control the electromagnets by PWM (google for it, wikipedia is a decent source). Doing this with a lot of outputs is a challenge and your PWM frequency probably won't be very high.
 
I came up with the same two questions (grin).

If you can drive the small electromagnets with less than 35 volts and 500 ma then you might consider using Micrel MIC5841 or Allegro A6841 8-bit serial-to-parallel sinking drivers instead of the 74HC595 devices. The Micrel and Allegro parts use the same cascadable Data/Clock/Strobe type interface.

As 3v0 mentioned, instead of loading seven cascaded serial-to-parallel chips you might consider loading them in parallel. I do this for my large LED matrix displays. For example, connect the Data line on each chip to a unique PIC pin; RB1 through RB7, connect all the Clock lines in parallel to RB0, then connect the Strobe or Latch line to another pin. Arrange eight data bytes so that all the bit 7 data for each driver is in one byte (in the b7..b1 bits leaving b0 set to '0'), all the bit 6 data for each driver in another byte (in the b7..b1 bits leaving b0 set to '0'), and so on. Then as you throw each of these eight bytes onto PORTB you're setting up the Data pins on each shift register and clearing the Clock pin in one instruction cycle. This allows us to load the seven shift registers with a very simple/fast algorithm;

Code:
;
;  26 cycles, 5.2-usecs (20-MHz clock)
;
ISR_load_shift_registers

        movf    SBuff+0,W       ; bit 7 byte
        movwf   PORTB           ; data & CLK [ddddddd0]
        bsf     PORTB,0         ; shift data [ddddddd1]
        movf    SBuff+1,W       ; bit 6 byte
        movwf   PORTB           ;
        bsf     PORTB,0         ;
        movf    SBuff+2,W       ; bit 5 byte
        movwf   PORTB           ;
        bsf     PORTB,0         ;
        movf    SBuff+3,W       ; bit 4 byte
        movwf   PORTB           ;
        bsf     PORTB,0         ;
        movf    SBuff+4,W       ; bit 3 byte
        movwf   PORTB           ;
        bsf     PORTB,0         ;
        movf    SBuff+5,W       ; bit 2 byte
        movwf   PORTB           ;
        bsf     PORTB,0         ;
        movf    SBuff+6,W       ; bit 1 byte
        movwf   PORTB           ;
        bsf     PORTB,0         ;
        movf    SBuff+7,W       ; bit 0 byte
        movwf   PORTB           ;
        bsf     PORTB,0         ;
        bcf     STROBE          ; set SR output latches
        bsf     STROBE          ;
Forgot to mention that the MIC5841 and A6841 devices have the spike/surge diodes for each output built-in.
 
Last edited:
A lot of ideas have been suggested, and I'm getting to the point of ordering my parts. Hmmm which road do I take? Maybe I should try them all on a smaller scale, an see which is best.

-Sterling
 
Microchip has both I2C and Serial Data 16 channel cihps for under $1. This might be a way to go. I'm not sure which would be the preferable interface.

As far has how much power will I need for the magnets, I am not sure. I'm picking up some magnet wire tomorrow to build some prototypes and test the strength.

-Sterling
 
Sterling, you never did say what exactly you're trying to do. Why would you need to control 56 electromagnets?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top