While I was surfing in this platform, I founded the Allen Pan's project, so, inspired by him, I watched inside my Arduino's box and I realised that I had everything I needed: Arduino mini, mpu6050, relay, transistor 2n222A and a voltage regulator.
This project is very dangerous and I decline any responsibility.
To sum up, the fire-punch is a device that reads a certain acceleration and passed a minimum value, shoot the gas through a plasma lighter.
THE CIRCUITWhat does Arduino have to do? Read a certain acceleration, open a contact in the relay that controls the electrovalve.
First of all, I connected the Arduino mini with Mpu6050 and a relay.
In this sketch, I used an Arduino Micro instead of Mini, because they look the same but there are some differences between them. The differences are that in the Micro, the Sda and Scl are in Pin D2 and D3, rather than in A4 and A5 (mini).
Moreover, to control the relay, I used a transistor.
Between the White wire and the transistor (base), I suggest to place a resistance (less than 100 Ohm).
Naturally, in the other side of the relay, I put the positive of the electrovalve (common) and of the battery.
I bought this on Amazon, but every plasma lighter is good for this project.
Then I opened it, and I found the way to leave the switch on.
For the component I ordered, I welded a different switch between the contacts of the first one, that when it pressed, allows the lighter to stay on.
I decided to keep the Arduino's circuit and the circuit of the lighter separated for security reasons.
POWER SOURCEFirst of all, the lighter has its power source.
For the electrovalve, I used these two batteries (tot.12 V).
To power Arduino I used two 18650 with a voltage regulator.
- (1) 12 V electrovalve 1/8"(https://www.amazon.it/gp/product/B07RJGVRX9/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1)
- (1) Reducer 1/2"->1/8"
- (1) Pipe 1/2" for 10cm long
- (1) Female connector 1/2"
- (1) Manual valve 1/2"
You can find them in every hardware store.
CODEFor the mpu6050 I found a library on github called: "MPU6050_6Axis_MotionApps20.h".
I downloaded this library from this website:"https://www.arduinolibraries.info/libraries/mpu6050" and then I edited one of its examples (MPU6050_DMP6).
Moreover, for this project you need to install :"I2Cdev.h" and "Wire.h".
FINAL RESULT
Comments