【项目教程】用Arduino做一套火焰喷射拳套

2018-12-071.4万
AI 快速预览详细 收起
这个项目教程介绍了如何使用Arduino Pro Mini和LIS3DH三轴加速度传感器制作一套火焰喷射拳套。通过追踪佩戴者的手臂动作,当急速出拳时,Arduino会启动点火装置。硬件清单包括Arduino Pro Mini、LIS3DH三轴加速度传感器、电磁阀、电动电池打火机和丁烷气体容器。整个项目的难度适中,适合对创意电子项目感兴趣的初学者。
   首先要感谢制作者Allen Pan的分享。 这套火焰手套中的喷射器由一个电磁阀、一个电动电池打火机还有一个装有丁烷气体的容器组成。手套的点火部分依赖一个集成电路板上的小型计算机 Arduino Pro Mini ,通过加速度计测量速度之后,将相关信息提交给 Arduino Pro Mini 处理再激活点火装置。

【项目教程】用Arduino做一套火焰喷射拳套图8

【项目教程】用Arduino做一套火焰喷射拳套图1

制作原理

通过追踪佩戴者的手臂动作来发射“火焰拳”一旦组装好装置,安装到手臂上,就形成了一个火焰喷射器,但只有当穿戴者急速出拳时,Arduino电脑才会启动。

材料清单
【项目教程】用Arduino做一套火焰喷射拳套图2

1、Arduino Pro Mini 328 – 5V / 16MHz×1
2、LIS3DH三轴加速度传感器×1
3、1/4英寸公头快速连接器
4、1/4英寸NPT全通径球阀
5、1/2英寸至1/4英寸镀锌减速器
6、1/2英寸黑色铁质接头,3英寸长
7、1/2英寸至1/8英寸镀锌减速器
8、1/8英寸黑色铁质接头
9、12V螺线管阀,带2mm孔径和1/8英寸NPT端口
10、1/8英寸NPT至3/16英寸倒钩
注意:如果在螺纹上用到了聚四氟乙膏或胶带,请用管钳拧紧所有东西。确保球阀的杠杆和螺线管阀对齐,最终将其安装在木板上。
制作过程

step1: 组装丁烷罐

一开始,制作者需要一个适配器,把丁烷气体充进罐子里。 3/16英寸铝管完作为连接装置。在球阀关闭之后,将铝管放入,直到它达到底部,记得标记切割线。
用切管机把管子切割成合适的尺寸。把管子的一端打磨,将边缘大致磨成O型。把管子和快速连接器连接起来,这样做的目的是形成一个密闭的空间。在丁烷罐喷嘴处放置一个O形圈。
【项目教程】用Arduino做一套火焰喷射拳套图15

【项目教程】用Arduino做一套火焰喷射拳套图16

【项目教程】用Arduino做一套火焰喷射拳套图17

【项目教程】用Arduino做一套火焰喷射拳套图18

【项目教程】用Arduino做一套火焰喷射拳套图19

step2: 测试罐体是否泄漏

1、填充丁烷气体。
2、测试填充适配器和燃料罐!将燃料罐浸入水中或用肥皂水喷射,检查是否泄漏。
3、若无泄漏,请继续测试该螺线管阀。
4、使用2节LiPo电池将螺线管阀的导线与电池相连,获取雾状的丁烷。

step3: 安装平板架
      这里制作者使用了1/4英寸厚的杨树板作为平板架。板子宽2.5英寸,长9英寸。在手柄距离木板末端大约一英寸处标记两个孔。在燃料罐喷嘴距离木板末端0.75英寸处标孔,用于固定燃料罐的可收缩拉环绳。


【项目教程】用Arduino做一套火焰喷射拳套图3

【项目教程】用Arduino做一套火焰喷射拳套图25

【项目教程】用Arduino做一套火焰喷射拳套图24

【项目教程】用Arduino做一套火焰喷射拳套图23

【项目教程】用Arduino做一套火焰喷射拳套图22

【项目教程】用Arduino做一套火焰喷射拳套图21

【项目教程】用Arduino做一套火焰喷射拳套图20

      用铁条和圆形木棍形成一个D型的环连接到木板的反面。用拉环绳将燃料罐与木板相连接,拉紧!不要留有空间。我将一根1英寸长的尼龙带用热熔胶粘在其中一个D环,缠绕另一头并系在手上,这可以作为一种紧急释放的装置。

【项目教程】用Arduino做一套火焰喷射拳套图28

【项目教程】用Arduino做一套火焰喷射拳套图27

【项目教程】用Arduino做一套火焰喷射拳套图26
step4: 安装点火装置

1、这样的打火机。
【项目教程】用Arduino做一套火焰喷射拳套图11

【项目教程】用Arduino做一套火焰喷射拳套图4

2、移除内部多余部分并去除任何铰链部件(你可能需要从孔中戳出一些连接杆)。

【项目教程】用Arduino做一套火焰喷射拳套图10

3、将引线焊接到按钮端口。使用万能表测量电线上的电压。你应该测试出3-4伏电压。

【项目教程】用Arduino做一套火焰喷射拳套图12

【项目教程】用Arduino做一套火焰喷射拳套图5

4、将内部装回金属外壳中,然后重新拧紧。

安装电子部分
【项目教程】用Arduino做一套火焰喷射拳套图6

  原理图


火焰喷射器的电路图。请注意,螺线管是螺线管阀,压电蜂鸣器是电弧打火机的支架。

【项目教程】用Arduino做一套火焰喷射拳套图7
代码

[mw_shl_code=applescript,true]#include <Wire.h>
#include <SPI.h>
#include <Adafruit_LIS3DH.h>
#include <Adafruit_Sensor.h>

// Used for software SPI
#define LIS3DH_CLK 13
#define LIS3DH_MISO 12
#define LIS3DH_MOSI 11
// Used for hardware & software SPI
#define LIS3DH_CS 10

//software SPI
Adafruit_LIS3DH lis = Adafruit_LIS3DH(LIS3DH_CS, LIS3DH_MOSI, LIS3DH_MISO, LIS3DH_CLK);

//A fist experiences significant acceleration during a good punch,
//followed by massive deceleration at the end of the punch.
//This happens within a fairly small window of time, so it's
//pretty easy to distinguish a punch from normal gesticulations.

unsigned long punchStart = 0;//variable for non-blocking punch timeframe check
const long punchInterval = 200;//timeframe of a punch in ms, from max acceleration to max deceleration, 200 is very generous
int punchAccel = 20;//the beginning of a punch in m/s^2, could be over 50m/s^2 depending on the puncher
int punchDecel = -40;//the end of a punch in m/s^2, could be less than -100m/s^2 depending on the puncher
int flameTime = 250;//how long the flame lasts, in ms

void setup(void) {
  //Test to see if accelerometer is communicating
  Serial.begin(9600);
  Serial.println("LIS3DH test!");  
  if (! lis.begin(0x18)) {   // change this to 0x19 for alternative i2c address
    Serial.println("Couldnt start");
    while (1);
  }
  Serial.println("LIS3DH found!");

  lis.setRange(LIS3DH_RANGE_16_G);   //+-16G range for good punch detection
  Serial.print("Range = "); Serial.print(2 << lis.getRange());  
  Serial.println("G");

  pinMode(8, OUTPUT); //Solenoid valve
  pinMode(9, OUTPUT); //Arc lighter
  digitalWrite(8, LOW);
  digitalWrite(9, LOW);
}

void loop() {
  lis.read();
  sensors_event_t event;
  lis.getEvent(&event);

//look for punch starting, at least 20 m/s^2
  if (event.acceleration.x > punchAccel){
     Serial.println(event.acceleration.x);
     punchStart = millis();
  }

  unsigned long currentMillis = millis();

  //look for punch ending, less than -40 m/s^2
  if (event.acceleration.x < punchDecel && currentMillis - punchStart < punchInterval){
      Serial.println(event.acceleration.x);
      Serial.println("Punch");
      Fire(flameTime);
    }
}

void Fire(int flameTime){
  digitalWrite(8, HIGH);
  digitalWrite(9, HIGH);
  delay(flameTime);
  digitalWrite(8, LOW);
  digitalWrite(9, LOW);
}[/mw_shl_code]

  把东西组合起来

【项目教程】用Arduino做一套火焰喷射拳套图9

【项目教程】用Arduino做一套火焰喷射拳套图13

【项目教程】用Arduino做一套火焰喷射拳套图14

此项目需注意安全

创作许可协议

本项目采用 None(不开放任何权利,保留所有权利) 进行许可。

评论(5)
DM
DM
想整一个,厉害
gada888
gada888
这个狠
gray6666
gray6666
酷毙了。。。。。。。。。。。。。。。。。。。。。。。。
Benett
Benett
制作还是不错的,但是有点危险
KIKI
KIKI
作者
回复Benett
是的,这个项目对安全性要求比较高
烧鸡
烧鸡
是时候打一波组合拳了
- 没有更多了 -