Pages:
Author

Topic: NanoFury Project - Open Source Design - page 24. (Read 75414 times)

hero member
Activity: 924
Merit: 1000
October 30, 2013, 05:26:09 AM
#3
Nice work.

How much would you like us to kick back to you if we fab out your NF's... or should I PM you?
vs3
hero member
Activity: 622
Merit: 500
October 30, 2013, 05:17:00 AM
#2
reserved
vs3
hero member
Activity: 622
Merit: 500
October 30, 2013, 05:16:50 AM
#1
NanoFury Open Source Project

I'm opening a thread to discuss my work on the the NanoFury project and general design questions regarding the Bitfury ASIC.

The project home is at: https://github.com/nanofury/NanoFury

Project Summary:
Interface: USB 2.0
Power Requirements: 2.5W when being operated within USB2.0 specs, up to 3.5W when using a powered hub
Performance: Approx 2GH/s when within the USB2.0 specs, up to about 2.5GH with passive cooling
Dimensions: 25x42.5mm
ASIC: 1x Bitfury chip

PCB/CAD software: KiCAD

This is how everything looked while designing it :


And how the real ones ended up:


There are more images and galleries at: http://nanofury.imgur.com/

Project Status

Hardware:
As of version 0.6 of the PCB everything seems to work and be pretty stable. If you're looking to try out the design - start from that version.

Software:
Even though we started with cgminer that one needs a lot more work and has not been checked in into github yet.

Luke-Jr however did wonders and his bfgminer works beautifully! Luke - thanks one more time!!!

As part of the bfgminer's requirements each device needs to report a specific "Product String". I've put up a small test program that can exercise each device and also fix that string. Alternatively, you can tell bfgminer the individual serial numbers and in that case it won't care about that string. (although I think it's much easier to just set the product string Smiley). You can find the test program at https://github.com/nanofury/NanoFury_Init

Overclocking
I guess everyone's favorite topic Smiley

The board does support some overclocking as well as voltage tweaks (e.g. "pencil mod").

In order to meet the USB2.0 requirements bfgminer defaults the bitfury chip to speed of 50 bits which results in about 2.5W and around 2GH or just below.

Most computers would actually tolerate slightly over-spec devices and won't shut the port down. For such cases you can experiment by overriding the number of speed bits and find out where the limits of your hardware are.

Also, keep in mind that no two bitfury chips are the same - each board may perform slightly differently.

And I guess it comes without saying that some cooling will be required. Start with at least a small heatsink to the back of the board.
If you want to go a bit more aggressive - add a heatsink to the bitfury chip and the inductor.
And you can't go wrong by adding some active cooling (like a small fan).

WARNING: THOSE BOARDS WILL RUN HOT! AND I MEAN VERY HOT - 80-85C! HANDLE THEM WITH CARE!!!

If your boards overheat you may see the hashrate dropping significantly (like 0.3-0.6GH instead of 2.4). Sometimes the USB port will start dropping the voltage and instead of 5V it may go down to 4V or even 3.5V. Once it goes below 3.6V this may interfere with the USB communication, so you'll likely lose communication with that board. In such case you will have to unplug the board and plug it back again.


Future plans:

- Converting the design to a two-chip one would be a very easy task. It just needs more power and an extra bitfury chip. On the other hand, power consumption would most likely exceed USB3 specs ... that's unless you have a powered USB hub providing 1-1.2A per port. It will also produce a lot of heat. So a heatsink will be a must.

- Use the design for a zero-chip board to serve as an adapter to be used with the existing 8-chip and 16-chip boards (such as punin's and buzzdave's ) for those that would prefer to run the mining software on a PC (and those that for whatever reason don't have or don't want to use an M-board).
It would be a USB-to-HCard adapter.
There are several designs of H-card clones that use 8 chips (including buzzdave and tytus's new 8-chip boards) so that may be a good fit for pre-starter kits.

bfgminer already has the necessary support and will discover the more than one-chip-per-port situation.

Some history:

I got initially the idea of the NanoFury as I didn't like having to buy a Raspberry Pi in order to use Bitfury's chips. I wanted something that I can just plug in my laptop. I even joined some of the Avalon and BFL preorders (what a disaster after a disaster!). Then I discovered bitfury's thread ([ANN] Bitfury is looking for alpha-testers of first chips! FREE MONEY HERE!) and things started getting interesting ... but no chips though...

And what happened next is all tytus' fault! I got a message that he'll be sending me few sample chips! And a few days later I got them! And I promptly lost sleep Smiley

Unfortunately to this day there is no documentation for bifury's chip. I started digging trough the forums and collecting various bits from here and putting the pieces together. I've put all of those notes in a wiki article - which uses the "docuwiki" format, and github wants the "mediawiki" format, so on my to-do list is to start reworking that. If there are any volunteers to help with that or know how to easily convert it - please PM me.
Thanks to z3phyreo who is porting that documentation we already have some of it available here: https://github.com/nanofury/NanoFury/wiki/The-missing-bitfury-chip-documentation .

My very first idea was to make it an Arduino shield. But that would've been an overkill for most people.

So, for the pre- v0 of the board I picked Microchip's MCP2210 chip - it seemed like a good candidate. Except that after wasting a week combing through the documentation I could not find a way to bitbang the SPI pins, which is a must for bitfury's RESET sequence. Which lead me to abandoning that chip.

So, version 0 of the board was made around the FT232R chip. I picked that one specifically as it claimed that it has a built-in 3.3V regulator, and that it operates at down to 1.8V - just perfect for interfacing with bitfury's chip which also works at 1.8V. It is also a very popular chip - especially among hobbyists. I probably have a dozen boards with it around - various rs232/serial and custom adapters.
The FT232R chip however is really an asynchronous interface, so the SPI required quite a lot of work. And worst of all - it is very slow when doing bitbang kind of operations - I couldn't reliably squeeze out more than 1-2kHz out of it. I had almost given up when I noticed that it can work as a pseudo-parallel interface, in which case it would use the /RD and /WR buses and do a send, then receive sequentially. That way I could make the individual pins of the SPI interface be simulated via the 8 data bus pins. I got 50-100kHz that way, and it also took care of the RESET sequence. The CPU however would have to serialize and de-serialize all the communication.
This was a bit of a hack, and a rather ugly solution, and I had spotted another (better!) chip which seemed like a more appropriate candidate!

I started working on v0.1 of the board using Cypress' CY7C65211 chip. Luckily I wasn't too far into that when both Cypress and Digikey (and Avnet a bit later) said that those are on back order...

And while discussing the various solutions and options one of them was:
The next option I looked at was MCP2210. But you can't switch the SPI pins into GPIO. I can tweak the SCK pin (by switching the phase) but I can't do anything about the MOSI one. The only (cheap) solution was going to be to sort of short-circuit it with another GPIO pin via a small resistor like

So that became v0.1 of the board, back with MCP2210. At that time it was unclear how much power does the bitfury chip draw from the 1.8V, so I picked a rather bulky LDO. Meanwhile it got clarified that it is a lot less.

Which became v0.2 of the board. But I had forgotten about those 0402 components - they are tiny!!!! And it was just too much pain to deal with them, and on top of everything else there was plenty of room on the board, so not really necessary to go that small.

In v0.3 of the board I changed everything to 0805 - nice and big! Smiley Actually so big that for some components it was getting too cramped ...

And v0.4 was born with most components back to 0603. While I was waiting for the v0.4 to arrive I noticed that I had overlooked the MCP2210 specs - it didn't like 1.8V signals ... so I had to add a voltage converter. Some of the ideas that were floated used a cheap bipolar transistor, but I wasn't quite sure how the extra currents floating through it would affect the bitfury chip, so I picked the MOSFET option. I had a bunch of them laying around, so I just grabbed the first one and started testing ... and it did not work. I had almost gone back to a plan NPN one when I figured out what was wrong with mine - 1.8V wasn't enough for it to switch - it needed over 2.5V. I dug out one with a gate-source threshold of 1.4V and - bingo!

Which lead to v0.5 of the board. I also decided to ditch the printed USB-a connector for a number of reasons - PCB had to be thicker (read: more expensive), then that connector needed to be gold-plated (read: more money), then the boards needed some special cuts for that connector (read: even more money) also my sample boards seemed a bit flaky in the USB slots and contact wasn't always as good, etc.
So I put a proper USB-A connector which was also a relatively cheap one. Except that I messed up the pin numbers - they were in reverse order.

Which resulted in PCB version 0.6.

Software in the mean time was quite a pain too. Microchip only had a .NET version of that DLL .. so any linux-support hopes were a bit foggy. Luckily I found Kerry Wong's library. Which was meant mostly for linux usage. (Did I mention that I'm more of a Windows fan? Smiley)

Eventually, after many many hours of fiddling with it (thanks Val!) we finally got something working on Windows and I started debugging. As it turned out that there was a bug in the library, which I fixed in the nanofury fork (https://github.com/nanofury/MCP2210-Library).

And as they say - the rest is history Smiley



Acknowledgments and other information:

* This project was inspired to a great extent by BKKCoins' Klondike K1 Nano Open Source Board and I'm very grateful for all his work and I'll continue to support that project down the road as I can!

* I've reused the same physical dimensions to as much as possible (including heatsink holes size and position) with the goal that if necessary both projects may share the same plastic hosing and/or heatsink.

* Several people contributed to the development of this project and I'd like to say Thank You one more time for the dedicated work! You can find more details on the github page.


Usage
I guess for most people that's the most important question Smiley

First - start by downloading KiCad: http://www.kicad-pcb.org

Get the project files, and open the project from within KiCAD.

When you open either the schematic or PCB documents KiCAD may want to start with its own libraries. Remove them from the list - the NanoFury project includes a lib folder with all libraries that you may need. Just add all files from the NanoFury/NF1/kicad/lib folder. (this also would prevent the issue when KiCAD wants to use its own library for a given component instead of the one from the project which may result in bad schematic or PCB)

From within KiCAD then you can print the schematic documents and generate all files needed by the PCB and factories.

And that's all - it is really that simple! Smiley

I guess many of you will have questions, so feel free to post on this thread and I'll try to get back to you as soon as possible.


Donations

If you found this project helpful and wanted to donate some bitcoins please send them to 1AHvViTD5wohPywNYHi8NZ8uPhbY9dZXCY. All donations are much appreciated! Smiley

If you end up using the NanoFury designs for manufacturing of any boards for sale/resale or otherwise for profit -  I'd like to ask that you consider adding a few bucks "design donation" to the first few hundred boards (or as much or many as you feel appropriate) to help recoup some of the several thousand dollars that went into the development of this project (not mentioning the countless man-hours of work).


Finally:

And most importantly - HAVE FUN! And Happy Mining! Smiley
Pages:
Jump to: