100

100 solenoids were aggregated and made into one devices.

https://www.hirotakaster.com/wp-content/uploads/2023/06/IMG_6038_Trim-3.mp4

spec
Solenoid x 100(https://www.sparkfun.com/products/11015)
M5Stamp C3(I2C controller), self-designed PCB(16 solenoids assigned on 1 board)

sample source code.

#include <Adafruit_MCP23X17.h>
#define MCP_LEN 1
Adafruit_MCP23X17 mcp[8] = {Adafruit_MCP23X17(), Adafruit_MCP23X17 (),
                            Adafruit_MCP23X17(), Adafruit_MCP23X17 (),
                            Adafruit_MCP23X17(), Adafruit_MCP23X17 (),
                            Adafruit_MCP23X17(), Adafruit_MCP23X17 ()};

/* 
 *  10x10 solenoid x-y matrix position
 *            (9 9)
 *  |---------|  
 *  |         |
 *  |         |
 *  |         |
 *  |---------|
 *(0, 0)
 */
void updown(int x, int y, int d) {
  int s = ( x * 10 + y ) / 16 ;
  int p = ( x * 10 + y ) % 16 ;
  mcp[s].digitalWrite(p, HIGH);
  delay(d);
  mcp[s].digitalWrite(p, LOW);
  delay(d);
}

void testfunc() {
  for (int i = 0; i < MCP_LEN; i++) {
    for (int j = 0; j < 16; j++) {
      mcp[i].digitalWrite(j, HIGH);
      delay(500);
      mcp[i].digitalWrite(j, LOW);
      delay(500);
    }
  }
}

void setup() {
  Serial.begin(9600);
  Serial.println("Adafruit_MCP23X17 Test!");
  pinMode(6, INPUT);

  for (int i = 0; i < mcp_len; i++) {
    if (!mcp[i].begin_I2C(0x20+ i)) {
      Serial.print(i);
      Serial.println(" Error.");
    }
    delay(100);
    for (int j = 0; j < 16; j++) {
      mcp[i].pinMode(j, OUTPUT); 
      delay(40);
    }  
  }
  Serial.println("Looping...");
}

void loop() {
  testfunc();
}
I2C test
connect to 100 solenoids.

4×4, circle type enclosure for test.

4×4, circle type enclosure

board designed.
IO Expander : MCP23017
MOSFET : 2SK4017
register: RK73B1JTTD103J 1608(0603)
diode : GS1010FL
connector : S2B-PH-K-S
solenoid : ZHO-0420S-05A4.5(5V)

Solenoid mounter 3D model is three parts.
Top is just an solenoids mounter, 2nd parts holds up to 100 solenoids and guides the cables, 3rd is guide to the output cables.

 

 

Exhibit at Maker Faire Tokyo 2023 with 4×4, 10×10, circle type.

100, 16, circle type.

「100」への1件のフィードバック

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください