Sunday, January 15, 2017
Litecoin mining with my Raspberry Pi
It's an intriguing subject, creating money by having your computer carry out calculations. Most of the information on the Net is dated 2011-2013 and is now quite obsolete.
In those days you might have been able to make a small profit but now the electricity cost to run the computer will outweigh the revenue created. A Raspberry Pi (a small credit card sized computer with wireless, bluetooth, Ethernet, hdmi) only draws a few watts and is ideal to use as a controller.
You can set up litecoin mining without buying anything else by using a program called cpuminer. Set up an account at litecoinpool.org and create one worker. Use this Rpi tutorial to download and install cpuminer. It will use the 4 core cpu (in a Pi 3) to start mining at about 4 kilo hashes per second (Kh/sec). This will create about 1 cent a year in wealth, but you will learn how to compile c programs.
Clearly you need something much faster. It's called an ASIC (Application-specific integrated circuit) that has chips on board dedicated to crypto mining. Only a few years ago miners used GPU cards (graphics cards) which had fast memory and processors that did the calculations much faster than the cpu. The ASICs have dropped in price and normally use USB ports.
Here is one (LKetc USB with Zeus chips) that I have used. (Cost about $US 16 on aliexpress) It generates about 144 Kh/sec.
I am currently running it on my desktop using bfgminer 4.1.99 with windows 10. It was not happy on the Rpi together with my gridseed miners. It apparently has two chips and can process 288 Kh/sec with fan cooling but I have not managed that. The software only finds one chip. Here is my Win10 startup command (put in your own login details). Change the clock speed and see if you get more throughput.
bfgminer.exe --scrypt -o stratum+tcp://us2.litecoinpool.org:3333 -u user -p password --chips-count 2 --ltc-clk 190 -S zeus:all
Then on the Rpi I hooked up a Gridseed GC3355 5-chip. They mine at about 350 Kh/sec using cpuminer-gc3355. That program auto detects and handles 5-chip and 40-chip devices simultaneously. I find the 5-chip units run OK at 850 Mhz and don't really need fan cooling.
Here is a picture of the 5-chip units (costing about $29 on aliexpress).
Two of these mine at about 700 Kh/sec and earn about 1 litecoin cent in 4 days.
Next step up is the Gridseed Blade miner with two 40-chip GC3355 cards known as blades, so a total of 80 chips.
They are rated at 5300 Kh/sec and this unit is mining away right now with the two 5-chip units at 6000 Kh/sec and earning me 0.035 litecoins in 24 hours ($NZ0.21). Trouble is they pull 100 watts at 12 volts, about 8 amps, and I use a computer power supply rated at 12 amps at 12V. So the electricity cost is at least 2.4 units per day at $NZ0.32 = $NZ 0.77.
So there it is, making money for the power company.
In those days you might have been able to make a small profit but now the electricity cost to run the computer will outweigh the revenue created. A Raspberry Pi (a small credit card sized computer with wireless, bluetooth, Ethernet, hdmi) only draws a few watts and is ideal to use as a controller.
You can set up litecoin mining without buying anything else by using a program called cpuminer. Set up an account at litecoinpool.org and create one worker. Use this Rpi tutorial to download and install cpuminer. It will use the 4 core cpu (in a Pi 3) to start mining at about 4 kilo hashes per second (Kh/sec). This will create about 1 cent a year in wealth, but you will learn how to compile c programs.
Clearly you need something much faster. It's called an ASIC (Application-specific integrated circuit) that has chips on board dedicated to crypto mining. Only a few years ago miners used GPU cards (graphics cards) which had fast memory and processors that did the calculations much faster than the cpu. The ASICs have dropped in price and normally use USB ports.
Here is one (LKetc USB with Zeus chips) that I have used. (Cost about $US 16 on aliexpress) It generates about 144 Kh/sec.
I am currently running it on my desktop using bfgminer 4.1.99 with windows 10. It was not happy on the Rpi together with my gridseed miners. It apparently has two chips and can process 288 Kh/sec with fan cooling but I have not managed that. The software only finds one chip. Here is my Win10 startup command (put in your own login details). Change the clock speed and see if you get more throughput.
bfgminer.exe --scrypt -o stratum+tcp://us2.litecoinpool.org:3333 -u user -p password --chips-count 2 --ltc-clk 190 -S zeus:all
Then on the Rpi I hooked up a Gridseed GC3355 5-chip. They mine at about 350 Kh/sec using cpuminer-gc3355. That program auto detects and handles 5-chip and 40-chip devices simultaneously. I find the 5-chip units run OK at 850 Mhz and don't really need fan cooling.
Here is a picture of the 5-chip units (costing about $29 on aliexpress).
Two of these mine at about 700 Kh/sec and earn about 1 litecoin cent in 4 days.
Next step up is the Gridseed Blade miner with two 40-chip GC3355 cards known as blades, so a total of 80 chips.
They are rated at 5300 Kh/sec and this unit is mining away right now with the two 5-chip units at 6000 Kh/sec and earning me 0.035 litecoins in 24 hours ($NZ0.21). Trouble is they pull 100 watts at 12 volts, about 8 amps, and I use a computer power supply rated at 12 amps at 12V. So the electricity cost is at least 2.4 units per day at $NZ0.32 = $NZ 0.77.
So there it is, making money for the power company.