GithubHelp home page GithubHelp logo

bota87 / fossa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lnbits/fossa

0.0 0.0 0.0 45.4 MB

Bitcoin DIY ATM, for loose fiat change

License: GNU General Public License v3.0

Shell 0.02% JavaScript 0.06% C++ 9.89% Python 0.07% C 82.36% Processing 0.12% CSS 0.01% Makefile 0.01% HTML 7.40% CMake 0.05%

fossa's Introduction

image

Welcome to the FOSSA project! FOSSA is an innovative, open-source Bitcoin Lightning ATM designed to be cost-effective and easy to build. Utilizing standard components such as an ESP32 microcontroller, a multi-coin acceptor, and a bill acceptor, FOSSA allows anyone to convert loose fiat change into Bitcoin efficiently. The project includes comprehensive instructions and resources, making it accessible for hobbyists and developers to create a fully functional Bitcoin ATM. Dive in and get started building your own FOSSA!

Demo

https://twitter.com/arcbtc/status/1567639231333277697

Bill of Materials

The parts for this ATM should be approximately £200-£250!

You can run the FOSSA as a coin machine, a bill acceptor, or both.

Primary FOSSA components

Part Description Buy (UK) Estimated cost
ESP32 WT32-SC01 This is the ESP32 touchscreen. You don't need any Wi-Fi. It should be supplied with a USB-C to USB cable. Note that the ESP32 WT32-SC01 is different from the ESP32 WT32-SC01 PLUS! Ebay or AliExpress £45
Option: NV10USB+ bill acceptor The bill acceptor option to accept cash notes. To accept GBP, you should request that it be set to GBP and SIO mode when purchasing. Ebay (second hand) £70-£150
Option: DG600F(S) Multi Coin Acceptor The coin acceptor option. The "S" denotes the front panel (stainless steel sheet version, where we can 3D print a black panel for it). AliExpress or eBay £30
Screw terminal block Easily connect the wires without soldering. Amazon (UK) £1
12v power supply Best to get one with terminal block adapter (12v battery also works well, for unplugged version). Amazon (UK) £8
12v to 5v step down converter with USB 12V to 5V: The adapter converter module can convert unstable voltage DC 12V to stable DC 5V / 15W 3A output. Amazon (UK) £5
Male-to-female GPIO jumpers Plug and play GPIO connectors Amazon (UK) £5
Option: Aluminum "medicine box" Cheap medicine box for the cash machine Amazon (UK) £30
Option: Amazon Basic Home Safe More secure box Amazon (UK) £70
Option: 58mm 701 USB Thermal Receipt Printer Print receipts for users. NB The 3D printed enclosure does not currently fit this. Ebay (UK) £25

image

3D printed enclosure fixtures & fittings

For the 3D-printed version, you will need:

Part Description Buy (UK)
M4 x 16mm pan head security torx tamper-resistant bolts These hold the front facia to the back box. Anything longer than 14mm - 55mm is fine. Amazon (UK)
Tamper-proof torx wrench (T20) To tighten the front facia Torx bolts. Amazon (UK)
Brass insert nuts, M4 x 6mm L x 6mm OD Female threaded heat set knurled embedded insert nuts for 3D printing. These are stronger than trying to create threads in the 3D print. Using a soldering iron, these are heated up and pushed into the backbox for better attachment of the facia. Amazon (UK)
M4 x 30mm carriage/coach bolts These are to replace the bolts supplied with the coin acceptor to accommodate the thickness of the facia. eBay (UK)
5.5mm x 2.1mm DC Power Jack Socket Female Panel Mount Connector This allows the 12V adaptor to plug into the ATM's outside. The box assumes a diameter of 7.7mm (like these). Amazon (UK)
2.2mm Quick Disconnect Female Spade Connector This allows us to crimp a cable and connect to the 5.5mm x 2.1mm DC Power Jack Socket
Cabinet draw tubular 16mm lock This will be mounted on the door. Amazon (UK)
Optional: Rubber feet (D30x22xH15) If you want to have this one on the table, some rubber feet will go at the bottom of the backbox with an M5 bolt. You can also use adhesive versions. Grooves in the bottom of the box will support up to 30mm in diameter. Amazon (UK)
Optional: M5 x 16mm hex socket bolts To screw the rubber feet into the back box. Amazon (UK)
Optional: M5 nylon nuts To screw the rubber feet into the backbox. Amazon (UK)
Optional: Adhesive security plate and locking cable Secure the ATM when desk mounted. Amazon (UK)

Build

A video tutorial is available here on how to construct the FOSSA:

https://www.youtube.com/watch?v=vbyYb9Yiu_k

Step 1: Hardware Setup

STAY TUNED FOR A WIRING HARNESS TO MAKE THIS PLUG-AND-PLAY, AND YOU CAN SKIP TO STEP 2.

This method requires no soldering. We do this by using GPIO jumpers and terminal blocks. First, split a terminal block into a block of 3 (our LIVE terminal) and a block of 4 (our GROUND terminal).

The wiring reference is as follows:

image

To connect the bill acceptor:

  1. Connect the Rx (GPIO 32) and Tx (GPIO 33), pins 29 and 31, on the WT32-SC01 board to pins 1 and 5, respectively, on the bill acceptor.
  2. Using a GPIO jumper, connect the live wire (pin 15) to the first LIVE terminal block at an available terminal.
  3. Using a GPIO jumper, connect the ground wire (pin 16) to a second GROUND terminal block of block at an available terminal.
  4. Connect the positive wire (red) of the 12V to 5V power converter and connect it to the LIVE terminal block at an available terminal.
  5. Connect the negative wire (black) of the 12V to 5V power converter and connect it to the GROUND terminal block at an available terminal.
  6. Connect the ground pin (e.g. pin 5) of the WT32-SC01 and connect it to the 2nd terminal of the GROUND terminal block at an available terminal.
NV10USB+ Pin WT32-SC01 Pin No. (Not GPIO No.) Power Supply
1 (Tx) 31 N/A
5 (Rx) 29 N/A
15 (12V DC+) N/A 12V DC+
16 (GND) 5 GND

The bill acceptor needs to be programmed to your currency and set to SIO mode. Usually, you can buy them preconfigured. If you have to program, buy this wire and download the Validator Manager software here or here (sadly only runs on windows, so use a friends machine). Details on programming can be found here. It's relatively straightforward to program the acceptor: plug in the USB host cable, turn it on by holding the config button for 2 seconds, and open the Validator Manager software. If you prefer to build your own programming cable, see page 42 of the NV10 USB Operations Manual, which gives a wiring diagram for the NV10 USB host cable. You can ignore all the hardware requirements for programming in the guide; you just need the host cable! Don't try using the programming cards in the guide; that's an old system these machines no longer support - "Many Bothans died to bring us this information"!

To connect the coin acceptor:

NB You can usually order the coin acceptor pre-programmed to your currencies. Otherwise, you will need to train the acceptor using this guide.

  1. Set the 3rd dip switch to high (this sends integers to the WT32-SC01 rather than pulses).
  2. Using a GPIO jumper, connect the interrupt pin (pin 5) on the coin accepter to the 5V pin (pin 2) on the WT32-SC01.
  3. Using a GPIO jumper, connect the serial out (pin 2) on the coin accepter to pin 4 on the WT32-SC01.
  4. Using a GPIO jumper, connect the live pin (pin 1) to the LIVE terminal block at an available terminal.
  5. Using a GPIO jumper, connect the GND pin (pin 3) on the coin accepter to the GROUND terminal block at an available terminal.
DG600F(S) Pin WT32-SC01 Pin No. (Not GPIO No.) Power Supply
5 2 N/A
4 N/A N/A
3 (GND) N/A GROUND
2 (serial out) 4 N/A
1 (12V) N/A LIVE

To connect the 12V power supply:

  1. Connect a GPIO jumper to the live connection (+) on the 12V power supply terminal block adapter to the LIVE terminal block at an available terminal.
  2. Connect a GPIO jumper to the ground connection (-) on the 12V power supply terminal block adapter to the GROUND terminal block at an available terminal.

To complete the terminal blocks:

  1. Connect each terminal in the LIVE terminal block so they all receive power by looping over wires from terminals 1 to 2 and 1 to 3.
  2. Connect each terminal in the GROUND terminal block so they all receive power by looping over wires from terminals 1 to 2, 1 to 3 and 1 to 4.

To connect to power:

  1. Plug in the WT32-SC01 to the USB connector of the 12V to 5V power converter.
  2. Plug in the connection terminal of the 12V power supply and connect to mains power.

You should hear the bill acceptor and coin acceptors turn on.

Step 2: Configure LNBits

To configure your LNBits instance to pull funds from:

  1. Login to your instance of LNBits.
  2. Create a wallet.
  3. Go to Manage Extensions, find LNURLDevice, and install/enable it.
  4. Open the LNURLDevice extension, click New LNURLDevice Instance, give it the title of ATM, and choose the appropriate wallet for the ATM. Select the correct currency (e.g., GBP), ATM mode, and a percentage for the commission.
  5. Copy the link it gives you.

Step 3: Programming the WT32-SC01

The ATM is configured in two parts: the ATM and LNBits running on a separate node.

To set up your Arduino IDE:

  1. If you have not already done so, install the Arduino IDE from https://www.arduino.cc/en/Main/Software.
  2. Install the ESP32 libraries. You can do this by copying the stable release version link, currently https://espressif.github.io/arduino-esp32/package_esp32_index.json and putting in the File > Preferences... > Additional Board Manager URLs (see: https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html)
  3. Install the boards by going to Tools > Board > Board Manager..., searching for ESP32, and clicking Install.
  4. Copy the libraries from this project libraries folder to your "/Arduino/libraries" folder (usually in OS "Home" directory)
  5. Clone the repo and open accessPointFOSSA.
  6. Select the relevant port and ESP32 dev module.
  7. Go to Sketch > Upload.
  8. Once uploaded, the access portal will launch when you press the screen on the WT32-SC01 device.

To configure the ATM:

  1. Connect the access portal wi-fi (Device-fa7ce5a4, for example).
  2. Open the access portal.
  3. Enter a new password.
  4. Enter the coin denominations (if you are using a coin acceptor, separated by a comma)
  5. Enter the maximum withdrawal amount in fiat (e.g. 30 for 30 GBP).
  6. Enter a percentage charge for the service (e.g. 10 for 10%, which should be the same value you entered into LNBits).
  7. Click Save.
  8. unplug and plug the WT32-SC01 back in once saved. You should see the Fiat for Sats screen.

Step 4: Enclosure

It should be pointed out that this ATM is designed to be attended to (such as on a shop counter) rather than something that can be left unattended and mounted to a wall.

Option A: 3D printed enclosure

If you want to want to print your own enclosure, we recommend these settings:

  1. Print the Facia
    • STL: FOSSA ATM Facia
    • Material: PETG
    • Layer: 0.2mm
    • Infill: 10-100% (recommend 20%+)
    • Supports: Yes
    • Notes: To set the Bitcoin logo with a different color, set a color change at layer 114 (13.20mm). In PrucaSlicer, you can "paint" out all the screw holes as they do not need supports. I would also recommend setting a thicker layer parameter, in PrucaSlicer, you can do this by settings Printer Settings > Layers and perimeters > Perimeters to 4)
  2. Print the backbox
    • STL: FOSSA ATM Backbox
    • Material: PETG
    • Layer: 0.2mm
    • Infill: 10-100% (recommend 20%+)
    • Supports: Yes
    • Notes: In PrusaSlicer you can set Print Settings > Support material > First layer expansion to 1 mm, XY separation between an object and its support to 80% and Overhang threshold to 1 mm, or, you can "paint" out all but the door as the model has been designed for minimal supports
  3. Print the accessories
  4. Use a soldering iron to melt the brass female embedded insert nuts into the six holes for the facia (see picture 1 below)
  5. OPTIONAL: If using the coin acceptor, replace the coach bolts with longer bolts (M4 x 30mm carriage/coach bolts) to account for the thickness of the facia.
  6. Mount the bill acceptor so it is "smiling" (see picture 2) with the supplied mounting bracket and screws as pictured (see picture 3). You can remove the bill input feed from the main part of the unit and then re-attach it.
  7. Mount the screen to the WT-32-SC01 Backplate.
  8. Mount the backplate to the Facia with the M4 (4mm x 8mm Inc Head) hex socket countersunk screws.
  9. Mount the backbox note holder to the backbox with the M4 (4mm x 8mm Inc Head) hex socket countersunk screws.
  10. Mount the 5.5mm x 2.1mm DC Power Jack Socket Female Panel Mount Connector in the hole in the back left of the backbox (this directs the notes to the bottom of the box.
  11. Connect wires from the connection terminal to the 2.2mm Quick Disconnect Female Spade Connector and plug into the inside of the 5.5mm x 2.1mm DC Power Jack Socket Female Panel Mount Connector.
  12. OPTIONAL: Mount the Rubber feet (D30x22xH15) using the M5 x 16mm hex socket bolts and M5 nylon nuts (be careful not to over-tighten).
  13. Using the Tamper-proof torx wrench (T20), use the screw in the M4 x 16mm pan head security torx tamper-resistant bolts to secure the facia to the backbox.
  14. Plug the power supply in.

Option B: Mount in a box

Use the templates provided here, print out at 100% on standard UK A4, and check the dimensions are correct after printing. It's helpful if the bill acceptor and coin mech pins are accessible.

  • For the Aluminium Storage Box solution, holes can be cut with a sharp knife (clearly not secure - but acceptable for somewhere you can keep an eye on the ATM or for demos).

  • For the Home Safe solution, holes can be cut with an angle grinder and a very thin cutter. (If you have not used an angle grinder before, don't be scared; they're cheap, easy enough to use, and very useful. Take your time and wear safety equipment.)

We use CT1 sealant/adhesive (or similar) for mounting the screen, although the screen has screw points, which should prob be used for added security.

Get in touch

And there you have it. Have fun, and tag us on Twitter / Nostr with all your cool setups!

Join our telegram support/chat.

fossa's People

Contributors

arcbtc avatar bengweeks avatar blackcoffeexbt avatar vnnkl avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.