DIY Bitcoin Lottery With Raspberry Pi

by seanhodgins in Circuits > Raspberry Pi

29867 Views, 74 Favorites, 0 Comments

DIY Bitcoin Lottery With Raspberry Pi

IMG_2086-Edit.jpg

There was a time when I was really into Bitcoin mining. I had a bunch of GPUs running and it was a fun hobby that surprisingly made me a little money as well. It was a fun experiment but I eventually ran out of time to play around with it, and it was a good time to sell everything, so that is what I did. I kept a few of the small ASIC block erupters. Fast forward 3-4 years, Bitcoin is in the news again $4000 US for 1BTC. Crazy! So I made this fun little device that will never actually make money(Unless you are lucky!) It is a conversation starter.

Watch the Video!

DIY Bitcoin Lottery with a Raspberry Pi

Get the Parts!

Parts.gif

You don't need many parts for this, the Block Erupters could be hard to find.

  • Raspberry Pi 3 B
  • Block Erupter or other ASIC for Bitcoin Mining
  • 3D Printed Files
  • Small Fan(recommended not needed)
  • 8 Neopixel Strip(or more or less if you want, adjust python script accordingly)
  • Power Supply good enough for 6W at 5V
  • Plastic threading screws M2.26 for pi mounting
  • Zip Ties
  • White paint if using non white filament
  • Shrink tube(for fan)

Tools

  • 3D printer
  • Screw driver for mounting
  • Jumpers to cut
  • Soldering Iron(for fan)

3D Print the Body!

3D-Printing.gif

The files are up on Thingiverse here: https://www.thingiverse.com/thing:2494568

Pretty easy to print, any settings should work.

Paint the Back White(if Its Not White)

Painting.gif

I was using black filament, so I decided to paint the part that reflects the light, white.

Assemble the Body With Pi.

Assembled1.gif
screw.gif

Pi Mounts to the back. I use Torx screws, M2.26, plastic threading.

Plug in the block erupter. Hook up the fan if you are using one.

Connect the Wiring.

soldering.gif
IMG_2099.jpg
IMG_2102.jpg
IMG_2100.jpg
IMG_2093.jpg

I am powering everything from a 5V power supply including the Pi. Some people do not recommend this because it bypasses a fuse. You can choose your method of powering.

The Neopixels also need 5V, and then connect the data line to GPIO18 of the Pi.

Program the Pi to Mine.

You will need to get CGMiner working. Here is the method that worked for me, you may require more knowledge in cgminer, lots of documentation online. For this to work you need to solo mine, I use NiceHash. https://solo.nicehash.com/

This was found here and updated by me: https://www.raspberrypi.org/forums/viewtopic.php?t...

sudo apt-get update
sudo apt-get install libusb-1.0-0-dev libusb-1.0-0 libcurl4-openssl-dev libncurses5-dev libudev-dev wget http://ck.kolivas.org/apps/cgminer/cgminer-4.10.0.tar.bz2 tar xvf cgminer-4.10.0.tar.bz2 cd cgminer-4.10.0 ./configure –enable-icarus sudo make install sudo apt-get install screen screen -S miner cd cgminer-4.10.0 sudo cgminer

Run the Programs.

python.gif
runningprogram1.gif

To get the Neopixels working follow this tutorial: https://learn.adafruit.com/neopixels-on-raspberry-...

To get them working with a Pi 2 and 3 you need to disable the soundcard driver, follow this: https://www.instructables.com/id/Disable-the-Built-...

I wrote a python script to run along side cgminer to work the LEDs and see if you have won or not, you can download it here: https://github.com/IdleHandsProject/BTCLotto

You need to get CGminer working and running, then run the btclotto.py program. Instructions are inside the program. btclotto.py takes the information from CGMiner so they both need to be running to have the lights displaying anything.

Get Lucky!

losing.gif
winning.gif

You could find a block, you never know!

Support These Projects!

Dancing.gif
btcwallet.jpg

If you would like to support my projects, Consider subscribing to my YouTube, becoming a Patron, and following on Instagram.

You can also send me bitcoins, here - 19s7hAVkm54Ev7QZEsWAfoyECy1CwXSrhL

I won't be expecting to win the lottery any time soon...

YouTube SeanHodgins

Patreon Sean Hodgins

Instagram

Twitter.

Get notified the moment a new project comes out!