An high quality open source airsoft mosfet
based on arduino.
Explore the docs »
Report Bug · Request Feature · Discord
Table of Contents
OpenMosfet is an high quality open source airsoft mosfet based on arduino (currently esp32 board).
The software is meant to be modular and to allow different sensors configurations.
The hardware provides all the electronics needed and allows different boards to be created.
The web dashboard allows full and easy controls over every settings as well an update manager.
The UI is now available in English
The team is composed of two developers and two electronitians, all french airsofters.
- 👨🏻💻 Simon
- 👨🏽💻 Zao Soula
- 👨🏻🔧 Romain
- 👨🔧 Marcellin
- Feel free to contribute to the project
- Install platformio
- Clone the repo
- Open it in your IDE (VSCode is suggested)
- it is recommended that you create your custom platformio environements in a
custom_env.ini
(you can copycustom_env.example.ini
file). This way you can assign different pins or use different boards types without messing with the git versionning and you can still inherit from envs defined in theplatformio.ini
file.- Note : don't forget to include the parent build flags if you inherhit an env
- for building the ui (mandatory) :
- install node.js
- inside the
ui
folder, runnpm install
- Note :
ui.h
is recompiled by running the commandnpm run build
inside theui
folder. this is done automaticaly before each platformio build (see UI Development section, platformio.ini and build_ui.py)
- Note : OTA upload is enabled by default, if your board hasn't ota enabled or you want to upload with serial, you can :
- QUICK AND DIRTY WAY : comment that following parameters in
platformio.ini
upload_protocol
upload_port
- PROPER WAY
- use
custom_env.ini
and create an environement with redifinedupload_protocol
andupload_port
(seecustom_env.example.ini
), ex :- upload_protocol = esptool
- upload_port = *
- use
- QUICK AND DIRTY WAY : comment that following parameters in
- default password for access point is "password"
- I think thats about it...
To serve the UI locally on your computer, we provide a fake server to simulate the board behavior.
- inside the
/src/ui/
folder, runnpm install
oryarn install
- run
npm run watch
oryarn watch
- open http://localhost:3000/ in your browser
- you can now edit
src/ui/**/*
without having to re-launch the server
Note: The configuration is loaded from defaultConf.json
and can be updated as long as the server is running.
Once it stops the updated configuration is lost
Depending on your replica and the way you connect the mosfet, the signals received are not the same.
ex : the original input plate on the G&G TR 16 can be used but the signals are very specific.
- You only know if the safety is disengaged (and mag not empty) when you get a signal from the trigger
- You only know if selector is on full auto or not before firing
You have to choose which behavior you want by specify the value of the REPLICA_TYPE
preprocessor flag (see platformio.ini).
Here is a table (work in progress) listing the different configuration available :
REPLICA_TYPE value |
pins behavior | examples |
---|---|---|
1 | OM_DEFAULT_FIRINGGROUP_PIN grounded when : trigger is pressedOM_DEFAULT_CYCLE_PIN grounded when cutoff is pressedOM_DEFAULT_SELECTOR_PIN grounded when selector is on full auto position |
G&G tr16 original input plate |
2 | OM_DEFAULT_FIRINGGROUP_PIN grounded when : trigger is pressedOM_DEFAULT_CYCLE_PIN grounded when when tappet plate is forwad (nozzle pressed against bucking)OM_DEFAULT_SELECTOR_PIN cycle through firemodes and safety on falling edge |
custom input plate with microswitch detecting tappet plate, simple press button as a selector |
3 | OM_DEFAULT_FIRINGGROUP_PIN grounded when : trigger is pressedOM_DEFAULT_CYCLE_PIN grounded when cutoff is pressedOM_DEFAULT_SELECTOR_PIN between 0v and vcc depending on selector position (needs calibration) |
For developpement reasons or other, you can change the default settings for the replica interface with the following flags :
OM_DEFAULT_MOTOR_PIN
OM_DEFAULT_FIRINGGROUP_PIN
OM_DEFAULT_CYCLE_PIN
OM_DEFAULT_SELECTOR_PIN
Note: it is not recommended that you change this value in the source file, but rather as a build flag in platformio.ini for example.
Note: for example, the ESP32DEVKIT V1 doesnt have the pin 10 exposed, which is the default pin used on the board for the selector input.
Got to the API documentation.
Don't hesitate to contact us via github, or your can come and talk with us on our discord server.
We are french but we can chat in english without problems.