Author Topic: Official FutureBit MoonLander USB Scrypt Stick Software and Support Discussion  (Read 25052 times)

Offline jstefanop

  • Sr. Member
  • ****
  • Posts: 558
Now that Im finally shipping the sticks its time to get your rigs ready software wise for them and have an official support point for the sticks. This post will be split in two main sections, one software to go over bfgminer downloads/running etc, and one for the actual hardware instructions.

Before I get started a big THANKS to all of you for making this possible. Its been a fun ride building the software and hardware from ground up for them, and I hope I've added a bit to the Litecoin community and hopefully get a few new miners interested in what Litecoin is all about with these!



SOFTWARE:

BFGMINER 5.4.0 Install

I have built a native bfgminer driver for these with support for all of bfgminer’s bells and whistles. All three major systems are supported so you can mine these one whatever flavor of Windows, Linux, or Macs you want!

The driver is open sourced and available in the link below if you want to compile it yourself from the source (which you will have to for linux anyway). I have provided pre-built binaries for Windows and Mac that will work with just one click on a startup script for ease of use.

Driver Repo: https://github.com/jstefanop/bfgminer/tree/futurebit_driver

You will also need to install the latest version of Silicon Labs VPC drivers for Win/Mac OS links below.

Windows VPC Driver: https://www.silabs.com/Support%20Documents/Software/CP210x_VCP_Windows.zip

Mac OS VPC Driver: https://www.silabs.com/Support%20Documents/Software/Mac_OSX_VCP_Driver.zip

Windows pre-built binaries: compatible with XP/7/8/10
https://www.dropbox.com/s/1izgcftaxgqmx99/BFgminer-FutureBit-5.4-win32.zip?dl=0
https://www.dropbox.com/s/qn63pkae2pdlulm/BFgminer-FutureBit-5.4--win64.zip?dl=0

Mac pre-built binary: compatible with most 64 bit Macs with Mac OS 10.9 or later
https://www.dropbox.com/s/xxkp307ejjdy3qo/BFGminer-5.4-FutureBit-mac64%20.zip?dl=0

Linux: Easiest way to install with linux is to compile the source directly. Detailed instructions below
Install required dependancies (make sure you copy and paste the whole lines since the code is cut off and need to scroll to select all of it)

Code: [Select]
sudo apt-get install build-essential autoconf automake libtool pkg-config libcurl4-gnutls-dev libjansson-dev uthash-dev libncurses5-dev libudev-dev libusb-1.0-0-dev libevent-dev (i think thats all of them let me know if i missed one)

clone repo
Code: [Select]
git clone --branch futurebit_driver https://github.com/jstefanop/bfgminer.git
configure and make

Code: [Select]
cd bfgminer
./autogen.sh
./configure CFLAGS=-O3 --enable-scrypt --enable-futurebit --disable-other-drivers
sudo make


If it complains about missing libraries you might need to
Code: [Select]
sudo make install
sudo ldconfig


Running:

Once you have installed the drivers and bfgminer just plug in the miner to a USB port and double click on the Start_Moonlander file on your Mac/PC. The driver will auto-detect the board and start hashing at the default frequency.

Just edit that same file with a text editor to change pools, add bfgminer options, and change frequency. You can also use the -c flag and load it with your own config file.

For linux just run the full bfgminer command below to start it up or create your own similar scrypt

./bfgminer --scrypt -o stratum+tcp://us.litecoinpool.org:3333 -u jstefanop.1 -p 1,d=8 -S MLD:all --set MLD:clock=144

(you might need to run it as sudo if it complains about permission issues)

Keep in mind that most "ASIC" ports won't work with this miner, since it hashes at the same speed as GPUs from back in the day. So it will take forever to find a share. These can run fine at the lowest difficulty most pools offer which is 16. Just make sure you connecte to a var diff port or one that offers a fixed difficulty of 128 or lower.

Frequency:

The MoonLander can run on a very wide range of speed and efficiency, and leaves a lot of tuning up to you guys. Make sure you read up on the Hardware section below where I go more in-depth on frequency and voltage tuning.

The Moonlander has a default frequency setting of 144mhz, and can range from 104mhz to 400mhz.

To change the frequency just edit the number after —set MLD:clock= in the startup scrypt. You cant just put any number you want in there, otherwise it will default to base 104mhz. Between 104-200 mhz you can set the frequency to any number that is a multiple of 8, so 104, 112, 120 are all valid frequencies.

Between 200-400 mhz you can use any number that is a multiple of 16, so 256, 320 etc are all valid.

I don't recommend going past 352 Mhz on these unless you have really good cooling, as they get really unstable past the frequency and need to turn up voltage past 1v.


HARDWARE:

The Moonlander consists of a single Scrypt ASIC at its core that operates between 300kh/s to 1MH/s and consumes between 2-10 watts of power.

The ASIC is powered by an adjustable DC-DC buck supply that can output between .7v to 1.1v of core voltage, and is adjustable by turning the onboard potentiometer.

It also features communication LEDs so you can visually see whats going on with the board. The red LED flashes when communication is being sent to the ASIC, and the yellow LED flashes when the ASIC is responding. Lots of yellow flashes is a good thing, it usually means the ASIC has found a share :)

The board is mounted to the heatsink with a strong thermal adhesive, since this ASIC is designed to dissipate heat through its bottom side. The heatsink is “oversized” for the heat output of the ASIC, but its recommended you always have some sort of airflow over the heatsink fins when its running especially for frequencies over 144 Mhz. You could get away with no airflow if your running it under 144 Mhz. Make sure you touch the heatsink after a few minutes of running...the heatsinks should feel warm to the touch, if they feel really hot you need a stronger fan (if you have a IR temp gun check the top of the ASIC it should not be any hotter than 80C).

Below is a visual of the board for reference (note this is a prototype board but the layout is the same as the production boards).




Voltage Adjustment:

You adjust the voltage by turning the Pot clockwise or counterclockwise with a fine flat head or philips screwdriver. This pot is VERY sensitive, the whole .7-1.1v range is within HALF a turn. You must do micro adjustments if you want to do very fine tuning. For example going from .75 - .8 v might take as little as a little torque pressure on the screwdriver even if you don't feel it actually twist.

Make sure you have place the stick horizontal and the USB end is facing LEFT (ie you can read FutureBit Moonlander normally on the board).

To turn the voltage UP turn the pot CLOCKWISE, to turn it DOWN, COUNTERCLOCKWISE.

DONT keep turning the POT, it has no stop and if you go past its lowest or highest setting you could break it.

To check the voltage use a multimeter and contact the ground wire to any of the exposed terminals on the output capacitors (circled and labeled ground in the picture), and the positive wire to the terminals on the other side (circled and labeled VCORE). Be extra careful not to short anything as a single short anywhere on the board while its powered will most likely fry it.

The sticks are shipped to you guys with the voltage setting at around .75v, which is good for USB 2 power draw and can hash up to around 200mhz stable.

I would NOT recommend going past 1v, anything in the 1-1.1v range will most likely reduce the lifetime of the ASIC and you will need a strong fan to keep it properly cooled pushing air over the heatsink.

Tuning:

Now to the fun part. Your goals here can vary from trying to get the absolute maximum hash rate (at the expense of power), to the absolute lowest hasrate/watt, or find a nice sweet spot.

Tuning any switching transistor based processing unit revolves around supplying enough current so the transistors on the chips actually switch on and off correctly within their cycle times.

The higher the frequency or “switching time” the less time a transistor has to “charge” so you need more current (ie turn up the voltage). If these requirements are not met the transistors don't function properly and you have what you know as a “Hardware Error”

So if you lets say leave the stick at its stock .75 volt setting and try to run it at 300mhz, it will either not start, or it will produce almost 100% hardware errors. So you need to gradually dial up the core voltage until these errors are reduce to a good level.

To get started what you need to know is the optimal hash rate the ASIC will operate at for a given frequency. This ASIC has 54 cores and assuming all cores are active (you might have a couple dead cores which is acceptable) the optimal hash rate is:

2.77 KH/s per Mhz

So lets say your running at 208 Mhz, under ideal conditions the stick will operate at 208 * 2.77 = 576 KH/s

This is the target hash rate for a given frequency, and you can adjust the core voltage to meet that.

Keep in mind “zero” hardware errors isn't always the best setting. If your getting a hardware error it does not necessarily mean your missing out on valid shares. A good reference point is to keep HW errors to under 5%, and after running for at least an hour if you see that your hash rate is indeed 5% below target level then you know that your under tuned and need to bring up the voltage a bit.

You can also do voltage adjustment “live” by setting the difficulty really low at your pool so you submit at least a share every second or so. You can then turn the pot up and down and watch the hardware errors as you adjust the voltage in real time.

I think that covers the basic and hope you guys have fun with these!


Ill post up FAQs etc below and edit this post as you guys start playing with them and have questions.
« Last Edit: February 04, 2016, 01:45:40 AM by jstefanop »

Offline jstefanop

  • Sr. Member
  • ****
  • Posts: 558
Q:Why does my X hub does not work with my Moonlanders?
Most USB 2.0 and a lot of 3.0 powered USB hubs will NOT work with these sticks. Powered USB hubs need to meet two requirements to reliably support the high current these sticks draw. First they need to have a clean high quality power supply that can output at least 1A PER port. To run the sticks at full speed you need at least 2A per port. Second they need to comply with USB standards which ALOT of cheap HUBs don't...which causes a lot of EMI issues and disconnects. Unfortunately its trial and error to figure this out, but from my testing Anker 3.0 USB hubs seems to work fine under Windows and Mac, and the Superbpag 7 port hubs seems to be the best for this type of application and provides lots of power per port and works under all three OSes.

Q: Bfgminer detects my moonlander but nothing happens when it connects to my pool
Don't forget that even though this is a very powerful scrypt miner for its size, its still "slow" when compared to other ASICS which most pools are optimized for these days. Some pools have a scrypt difficulty default of 256 or higher, in which case it could take several minutes for your moonlander to find a share. So it might seem like its not working. For best results set your diff to 128 or lower, contact your pool operator for what diffs they have set for each port.

Q: Can I run my moonlander without a fan?
You can probably get away with no fan on the lowest voltage setting and below 144mhz frequency. I would still not recommend this and you should have at least a small light fan blowing over the fins to make sure it wont overheat. Higher frequencies will require more airflow, and make sure the airflow is blowing parallel with the heatsink fins. If the heatsink is too hot to touch (above 50C) then its running too hot.

Q: How do I know which stick is which under bfgminer?
Each stick is hardcoded with a unique serial number, which can be displayed by pressing "M" in bfgminer then scrolling through the list of sticks which will show each serial number(the serial number is also visible in Device Manager etc). You can physically write the last 3 digits somewhere on the stick to easily identify it.

Q: What frequencies can I set my moonlander?
The moonlander supports any frequency between 104mhz to 400mhz in multiples of 8. If its not a multiple of 8 the frequency will default to 104. You can change the frequency by editing the Start_Moonlander.bat under windows or .sh file under Mac and editing the number after "--set MLD:clock="

Q: How can I set frequency to a particular stick in a mutistick setup under bfgminer?
If you want to specify frequencies for each individual miners you can point which frequency gets set to which miner by changing the global --set MLD:clock=144
to --set [email protected]/dev/ttyUSB0:clock=320  (note I haven't really tested if you can keep the global option and lets say just set one stick to a different frequency...if you do it this way you might have to specify frequencies for each miner port individually even if some of them are the same, since the global option might override individual frequencies).

So if you have two sticks and want two different frequencies your options might look like this:

Code: [Select]
./bfgminer --scrypt -o stratum+tcp://us.litecoinpool.org:3333 -u jstefanop.1 -p 1,d=16 -S MLD:/dev/ttyUSB0 -S MLD:/dev/ttyUSB1 --set [email protected]/dev/ttyUSB0:clock=320 --set [email protected]/dev/ttyUSB1:clock=304
« Last Edit: February 16, 2016, 10:50:02 PM by jstefanop »

Offline jstefanop

  • Sr. Member
  • ****
  • Posts: 558
RESERVED

Offline xxSUPERMANxx

  • Newbie
  • *
  • Posts: 2
Great work and instructions !! Thank you

Offline Sukarti

  • Hardcore Member
  • *****
  • Posts: 3418
Congratulations on your first batch of sticks. Nice write up and best of luck!

Offline jstefanop

  • Sr. Member
  • ****
  • Posts: 558
instructions are updated for linux install from source.

Offline Searing

  • Full Member
  • ***
  • Posts: 312
  • Clueless
instructions are updated for linux install from source.

thanks ..not that it may do me any good in that i also have instr for linux on the 8gh geeko usb miners and am still stuck... :) but hey ....hope springs eternal :)

we appreciate your efforts


Offline Mr. Jinx

  • Full Member
  • ***
  • Posts: 301
instructions are updated for linux install from source.
I followed this instruction without problems. Bfgminer running on a Raspberry Pi.
My powered USB hub is ready and waiting for the new sticks.

Offline Mr. Jinx

  • Full Member
  • ***
  • Posts: 301
I'm afraid my power USB hub (Dipo Electronic 19 port 20A USB) doesn't work very nice with the moonlanders.
Bfgminer keeps detecting new USB ports until it crashes. The hub works ok with gridseeds.

Code: [Select]
[  476.532768] usb 1-1.2.3.4: new full-speed USB device number 31 using dwc_otg
[  476.657645] usb 1-1.2.3.4: New USB device found, idVendor=10c4, idProduct=ea60
[  476.657684] usb 1-1.2.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  476.657703] usb 1-1.2.3.4: Product: FutureBit MoonLander USB Scrypt Miner
[  476.657719] usb 1-1.2.3.4: Manufacturer: Silicon Labs
[  476.657734] usb 1-1.2.3.4: SerialNumber: FB1E0037
[  476.664801] cp210x 1-1.2.3.4:1.0: cp210x converter detected
[  476.665371] usb 1-1.2.3.4: cp210x converter now attached to ttyUSB11
[  479.445779] cp210x ttyUSB11: usb_serial_generic_read_bulk_callback - urb stopped: -32
[  479.445825] cp210x ttyUSB11: usb_serial_generic_read_bulk_callback - urb stopped: -32
[  479.600791] usb 1-1.2.3-port4: disabled by hub (EMI?), re-enabling...
[  479.601006] usb 1-1.2.3.4: USB disconnect, device number 31
[  479.601754] cp210x ttyUSB11: cp210x converter now disconnected from ttyUSB11
[  479.601850] cp210x 1-1.2.3.4:1.0: device disconnected
[  479.862882] usb 1-1.2.3.4: new full-speed USB device number 32 using dwc_otg
« Last Edit: January 22, 2016, 07:34:43 PM by Mr. Jinx »

Offline jstefanop

  • Sr. Member
  • ****
  • Posts: 558
Yes that means the sticks are drawing more power than the hub supports so it cuts power to the port and restarts it. I would start with a few and see how many it can handle (it could be that it can't handle any if each individual port is current limited).

Edit: looking at that hub seems like they are limited to 500ma per port, which is right at the boundary of the stock setting current draw on the  Moonlanders. Try modifying the frequency down to 104 MHz, which is the lowest they will go and that should draw just under 500ma of current.
« Last Edit: January 22, 2016, 09:13:40 PM by jstefanop »

Offline AmDD

  • Full Member
  • ***
  • Posts: 486
  • I like coins
No matter what I try I can only get 2 of these sticks to mine at one time. I thought it was the hub so I tried a different one, then I tried two hubs and even then only 2 stick will mine.

Win7 laptop using your drivers and miner.
5 sticks
10 port USB 2.0 hub - rosewill 4amp total (I know this wont run them all)
7 port DLink DUB-H7 - better hub, used to run 6 BEMiners plus fan (still cant run them all)

The only thing I changed was lowering the speed to 104, this did nothing to help me.
Ideas?

Offline Mr. Jinx

  • Full Member
  • ***
  • Posts: 301
I also tried different usb 2.0 hubs without luck. Usb2 is max 500 mA but the hubs may have some extra protection that kicks in.
Right now I am going to test a new usb 3 hub. That should work.

It was possible to run 2 sticks on a raspberry pi (without hub). This works fine at 104mhz and a 2amp power adaptor.

Offline jstefanop

  • Sr. Member
  • ****
  • Posts: 558
No matter what I try I can only get 2 of these sticks to mine at one time. I thought it was the hub so I tried a different one, then I tried two hubs and even then only 2 stick will mine.

Win7 laptop using your drivers and miner.
5 sticks
10 port USB 2.0 hub - rosewill 4amp total (I know this wont run them all)
7 port DLink DUB-H7 - better hub, used to run 6 BEMiners plus fan (still cant run them all)

The only thing I changed was lowering the speed to 104, this did nothing to help me.
Ideas?

Both those hubs are limited to 500ma. One has 3a power adapter and other one is 4 amp. Thats just not enough current to run all of them at once. For your 5 sticks you'd need at least 5 amps for the lowest settings. So those hubs wont even run 3 sticks if you only have 3 plugged in @104 mhz?

Also keep in mind that when you try to start all sticks at once on a USB hub its going to tax whatever power supply is running it as all the sticks will instantly ask for 1amp of power, and if the power supply can't meet that the sticks will not start up properly or will get stuck in a power cycle loop.

Try starting one stick at a time with a different bfgminer instance, that might work on lower power hubs. You will need to edit the .bat file and put in \\.\COMx (where x is the com number for that stick) in place of the "all" start up bgminer then repeat it for the rest of the sticks.

I will see if I can code in a start up delay in the driver for you hub users which might help out with this. If you can please add -D 2>log.txt at the end of the .bat file and post the log.txt file for me so I can see exactly whats going on.
« Last Edit: January 26, 2016, 09:03:11 PM by jstefanop »

Offline AmDD

  • Full Member
  • ***
  • Posts: 486
  • I like coins
No matter what I try I can only get 2 of these sticks to mine at one time. I thought it was the hub so I tried a different one, then I tried two hubs and even then only 2 stick will mine.

Win7 laptop using your drivers and miner.
5 sticks
10 port USB 2.0 hub - rosewill 4amp total (I know this wont run them all)
7 port DLink DUB-H7 - better hub, used to run 6 BEMiners plus fan (still cant run them all)

The only thing I changed was lowering the speed to 104, this did nothing to help me.
Ideas?

Both those hubs are limited to 500ma. One has 3a power adapter and other one is 4 amp. Thats just not enough current to run all of them at once. For your 5 sticks you'd need at least 5 amps for the lowest settings. So those hubs wont even run 3 sticks if you only have 3 plugged in @104 mhz?

Also keep in mind that when you try to start all sticks at once on a USB hub its going to tax whatever power supply is running it as all the sticks will instantly ask for 1amp of power, and if the power supply can't meet that the sticks will not start up properly or will get stuck in a power cycle loop.

Try starting one stick at a time with a different bfgminer instance, that might work on lower power hubs. You will need to edit the .bat file and put in \\.\COMx (where x is the com number for that stick) in place of the "all" start up bgminer then repeat it for the rest of the sticks.

I will see if I can code in a start up delay in the driver for you hub users which might help out with this. If you can please add -D 2>log.txt at the end of the .bat file and post the log.txt file for me so I can see exactly whats going on.

Sure, I'll try that log file when I get home. I was under the impression that at the lowest setting each stick would only draw 500ma.

Offline jstefanop

  • Sr. Member
  • ****
  • Posts: 558
If they are at 104mhz and .75v they should be under 500mA. The issue is the initial startup current which most of the crappy USB Hub power supplies can't handle. Your asking for nearly max output instantly for all 5 sticks and that just wont work. Thats why I say 1A per port just to be safe.

Here is my hub setup with 3 sticks using an Anker USB 3.0 hub: https://www.youtube.com/watch?v=nj-y4QvoWx4

All 3 sticks run almost full speed with no issues. That hub has 36 watt rating. The 3 sticks use about 20 watts but as soon as I try and add a fourth stick either half wont start or a few sticks stop hashing after a minute or two. These hubs are just overrated on how much clean power they can produce. I can run all 4 sticks fine if I lower frequency/voltage and keep power draw to under 30 watts.

Unfortunately its just a lot of trial and error with these hubs and tuning the sticks to what a particular hub can handle.
« Last Edit: January 27, 2016, 06:51:40 AM by jstefanop »