Bicknellski
|
|
July 12, 2013, 03:38:55 PM Last edit: July 12, 2013, 04:12:50 PM by Bicknellski |
|
Is this correct?REVISED Thanks BKKCoins.
|
|
|
|
TomKeddie
|
|
July 12, 2013, 03:45:46 PM |
|
Today I've been trying to verify the Fan Control FET circuit so that the board can be finalized. So far it will only work at 100% duty cycle. I've tried different things but always partial duty cycles cause immediate restart/shutdown. I added a resistor from the PIC output to GND to ensure the FET gate drops to GND when off, but no better. I just have a generic cheapo 3 pin fan and usually they can be controlled with PWM, according to my reading online, but perhaps some are different. (Note I'm not talking about PWM control in the fan like 4 pin fans, but just switching the 12V line with PWM.) I based my circuit off another well known working one so this is odd. I'll keep working on it.
I did this in my miner with an optocoupler and a power transistor (2955 but that is overkill). PWM controls the cheapo fans just fine, I'm only use 2 pins per fan, relying upon temperature to set the PWM rate with no feedback.
|
|
|
|
BkkCoins (OP)
|
|
July 12, 2013, 03:56:24 PM Last edit: July 12, 2013, 04:08:15 PM by BkkCoins |
|
Is this correct?
Almost. I just measured a board here. Your 39mm is 36mm. The 25 is ok but when cut from a panel of 2 or 4 would probably be 24mm, depending on cutter blade loss. So that is determined by how you assemble them. Most PnP shops will want to put lots of those in one big panel because they're just too small to do one by one. edit - important:Keep in mind that the USB tab is not thick enough for correct insertion. It either needs a thickener as part of the casing/heat sink, or a 2mm board thickness should be used. I believe the USB spec calls for 2mm but often boards are ordered default as 1.6mm. *** I got the fan working. Turns out all these local *#@$! fans are garbage fakes. They don't actually have a Tach 3rd pin. They just feed back the voltage fed in, which of course is not right for the Tach reader circuit, it applies 12V to the 3.3V circuit when it should be an open collector/drain to GND that pulls down a connected resistor. Did that so many times here I'm lucky something didn't blow. But in the process of figuring this out I also determined that these crap Chinese cheap fans also don't put a Schottky diode in them to prevent back-EMF, which they should have. So the question arises - should I have a diode on board to protect against connecting a crap fan? The 3 I tried here didn't blow anything but they did unleash about 30V across the FET, which fortunately has it's own built in Schottky diode. Decent CPU fans have a diode in their "hub". One of my fans does have a Tach pin that works and seems to feed back a suitable signal to test with but it's a small 70mm fan that I won't be using except for tests until I buy a real-man's fan. (Which is a bit of a Thai pun... get it?). BTW my fridge and the small magnifier ring light both cause enough EMI on the power line here to cause a USB disconnect. Probably the source of much random noise. Half the time when the fridge turns on, cgminer re-inits the KLn device. They're on the same outlet circuit.
|
|
|
|
BkkCoins (OP)
|
|
July 12, 2013, 03:59:48 PM |
|
I did this in my miner with an optocoupler and a power transistor (2955 but that is overkill). PWM controls the cheapo fans just fine, I'm only use 2 pins per fan, relying upon temperature to set the PWM rate with no feedback.
Yup. If the code detects no Tach output it will just run open-loop and set a PWM signal for the fan. So 2 wires will work. I noticed that these cheap fans don't get much oomph below about 75%, and stall around 25%. I'd say only the top half is useful, but they're quiet up to about 80-905.
|
|
|
|
kwilliams
Member
Offline
Activity: 70
Merit: 10
|
|
July 12, 2013, 04:39:39 PM |
|
I vote for adding a diode on board to protect against fan malfunction. There's a lot of crap fans out there, some are outright evil....
|
Note to NSA: please note in my personal file that the above comment, as well as any and all communications dating back to AOL/1993, are wholly fictitious, and are to be regarded as such. The later statement is to remain in effect until reversed by me personally in a waterboard-free questioning.
|
|
|
Bicknellski
|
|
July 12, 2013, 04:41:56 PM |
|
I vote for adding a diode on board to protect against fan malfunction. There's a lot of crap fans out there, some are outright evil....
Agreed. +1 Note that roybitcoin sent me this message about the partial K1 length. Note for those sourcing heat sinks for Nanos. Re: (No subject) « Sent to: Bicknellski on: Today at 22:31:26 » « You have forwarded or responded to this message. »
I measured 35.88mm from the gerbers files.
|
|
|
|
BkkCoins (OP)
|
|
July 12, 2013, 05:12:27 PM |
|
I vote for adding a diode on board to protect against fan malfunction. There's a lot of crap fans out there, some are outright evil....
Agreed. +1 Note that roybitcoin sent me this message about the partial K1 length. Note for those sourcing heat sinks for Nanos. Re: (No subject) « Sent to: Bicknellski on: Today at 22:31:26 » « You have forwarded or responded to this message. »
I measured 35.88mm from the gerbers files. NOTE, on the K1 revision I will likely use the QFN PIC part# PIC16LF1459-I/ML or E/ML instead of the I/SS. I don't know if anyone has ordered the SS already but due to the small size the QFN is a much better fit, and it's also more readily available. Just a heads up for when I do the revision. On the K16 fan diode - I will add pads for a SL02 Schottky diode on board, next to the fan, and leave it up to vendors if they want to mount it or not. This diode can handle up to 1A which I'm sure will be adequate for any back-EMF. This is the same one used on the K1 power supply. The diode doesn't really do anything to protect the fan as it simply shorts back EMF through the fan windings. Rather it protects the board from the voltage spike caused. The NDS351 FET has a schottky diode built in for this purpose. However, the extra diode protects the 12V line from the spikes. If you're assembling boards with good quality fans then they should have a diode in them as part of their internal circuitry. I'm not sure at all how prevalent that is but I did notice on my cheap fans they had a space for a diode on the internal hub and no diode was mounted - cheap bastards, evey half-renminbi counts.
|
|
|
|
bitbeast
Member
Offline
Activity: 70
Merit: 10
|
|
July 12, 2013, 05:12:31 PM |
|
BTW my fridge and the small magnifier ring light both cause enough EMI on the power line here to cause a USB disconnect. Probably the source of much random noise. Half the time when the fridge turns on, cgminer re-inits the KLn device. They're on the same outlet circuit - If such a permanent issue exists, why not to invest in a good power line surge protector? My choice here always was the top device from the current APC SurgeArrest product line and I honestly must said that I never was disappointed. Modern APC SurgeArrest PER5, for example, offers 15 - 55 dB EMI / RFI noise rejection in 100 kHz to 10MHz frequency range, amongst the other useful features: http://www.apcmedia.com/salestools/ASTE-6Z7UZU/ASTE-6Z7UZU_R0_EN.pdf
|
Time is money mining.
|
|
|
BkkCoins (OP)
|
|
July 12, 2013, 05:18:14 PM |
|
BTW my fridge and the small magnifier ring light both cause enough EMI on the power line here to cause a USB disconnect. Probably the source of much random noise. Half the time when the fridge turns on, cgminer re-inits the KLn device. They're on the same outlet circuit - If such a permanent issue exists, why not to invest in a good power line surge protector? My choice here always was the top device from the current APC SurgeArrest product line and I honestly must said that I never was disappointed. Modern APC SurgeArrest PER5, for example, offers 15 - 55 dB EMI / RFI noise rejection in 100 kHz to 10MHz frequency range, amongst the other useful features: http://www.apcmedia.com/salestools/ASTE-6Z7UZU/ASTE-6Z7UZU_R0_EN.pdfYes, I should pick up something like that. Problem here is that that kind of thing I have to order from USA. What they sell here is either junk or triple price. Or maybe buy some parts for noise rejection and mount them in the one I have. Probably a website somewhere with how to do that.
|
|
|
|
freeworm
|
|
July 12, 2013, 05:29:02 PM Last edit: July 12, 2013, 06:32:40 PM by freeworm |
|
Are you guys both on Windows? I noticed that the Windows timeout values are defined much longer and I wonder if this is related. For Linux the timeout is 200mS but WIN32 is 999 mS. Note that I do all my testing on Linux and libusb could behave differently here.
I tested it first on Windows several days ago. KTest worked fine but CGMiner always gave timeout(-7) error so I changed the timeout to 999ms and the timeout error's gone but still had the stuck problem and low hashing rate. I moved to a real Linux box and there's no timeout error with 200ms setting but have CGMiner stuck problem until I added the "nmsleep(100);" as terrahash suggested. I tested it on both a laptop with Debian 7 and a desktop with Debian 6, all the same.
|
|
|
|
bitbeast
Member
Offline
Activity: 70
Merit: 10
|
|
July 12, 2013, 05:30:19 PM |
|
- 'Country selection' tool on APC site: http://www.apc.com/template/country_selection.cfmThey do offer models adopted for the different power line voltages (i.e. 110 V or 220 - 230 V) and national standards for wall outlets. Good luck!
|
Time is money mining.
|
|
|
cp1
|
|
July 12, 2013, 06:23:47 PM |
|
Maybe they have a used server UPS somewhere you could get? They usually have good power conditioning.
|
|
|
|
terrahash
Member
Offline
Activity: 86
Merit: 10
|
|
July 12, 2013, 06:28:17 PM Last edit: July 12, 2013, 07:08:57 PM by terrahash |
|
Your method works!!!
I added
nmsleep(100); \
and everything works like a charm.
128M ~ 8/m WU 256M ~ 17/m WU
BBKCoins, please be noticed. This might be a common issue.
Are you guys both on Windows? I noticed that the Windows timeout values are defined much longer and I wonder if this is related. For Linux the timeout is 200mS but WIN32 is 999 mS. Note that I do all my testing on Linux and libusb could behave differently here. I am on Ubuntu. Update: I changed the delay to 1 usec only (that is one micro sec), and its still working. Removing the delay again breaks it, and cgminer starts hanging for 1-2 minutes. I am quiet positive there is an issue with threading/locking. #define DEVLOCK(cgpu, _pth_state) do { \ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &_pth_state); \ nusleep(1); \ wr_lock(cgpu->usbinfo.devlock); \ } while (0)
|
|
|
|
freeworm
|
|
July 12, 2013, 07:31:18 PM |
|
I am on Ubuntu.
Update: I changed the delay to 1 usec only (that is one micro sec), and its still working. Removing the delay again breaks it, and cgminer starts hanging for 1-2 minutes. I am quiet positive there is an issue with threading/locking.
Confirmed on Debian 7.
|
|
|
|
BkkCoins (OP)
|
|
July 12, 2013, 07:32:36 PM |
|
I am on Ubuntu. Update: I changed the delay to 1 usec only (that is one micro sec), and its still working. Removing the delay again breaks it, and cgminer starts hanging for 1-2 minutes. I am quiet positive there is an issue with threading/locking. #define DEVLOCK(cgpu, _pth_state) do { \ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &_pth_state); \ nusleep(1); \ wr_lock(cgpu->usbinfo.devlock); \ } while (0)
Very odd. I'm on Ubuntu 12.04 and I don't have this problem. Or did you pull updates from cgminer github? I used 3.3.1 for mine but have not pulled down any updates since.
|
|
|
|
freeworm
|
|
July 12, 2013, 07:37:22 PM |
|
I am on Ubuntu. Update: I changed the delay to 1 usec only (that is one micro sec), and its still working. Removing the delay again breaks it, and cgminer starts hanging for 1-2 minutes. I am quiet positive there is an issue with threading/locking. #define DEVLOCK(cgpu, _pth_state) do { \ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &_pth_state); \ nusleep(1); \ wr_lock(cgpu->usbinfo.devlock); \ } while (0)
Very odd. I'm on Ubuntu 12.04 and I don't have this problem. Or did you pull updates from cgminer github? I used 3.3.1 for mine but have not pulled down any updates since. I cloned cgminer from github on July 11, 11:52 EDT(yesterday) on Debian 7 in a Thinkpad T500 laptop. I repeated this issue today on Debian 7 in VMWare player running on Windows(timeout 999ms).
|
|
|
|
BkkCoins (OP)
|
|
July 12, 2013, 07:40:28 PM |
|
I am on Ubuntu. Update: I changed the delay to 1 usec only (that is one micro sec), and its still working. Removing the delay again breaks it, and cgminer starts hanging for 1-2 minutes. I am quiet positive there is an issue with threading/locking. #define DEVLOCK(cgpu, _pth_state) do { \ pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &_pth_state); \ nusleep(1); \ wr_lock(cgpu->usbinfo.devlock); \ } while (0)
Very odd. I'm on Ubuntu 12.04 and I don't have this problem. Or did you pull updates from cgminer github? I used 3.3.1 for mine but have not pulled down any updates since. I cloned cgminer from github on July 11, 11:52 EDT(yesterday) on Debian 7 in a Thinkpad T500 laptop. I repeated this issue today on Debian 7 in VMWare player running on Windows. You might pull 3.3.1 release from github and build with that, or just run with the fix if it works. Maybe it will have to be pulled in anyway if I update and the newer cgminer versions all have the problem. Kano probably knows what's up with this as it's his area. Presumably the time doesn't matter and it's just that control is released to another thread at that point.
|
|
|
|
chaoztc
Newbie
Offline
Activity: 24
Merit: 0
|
|
July 13, 2013, 01:24:43 AM |
|
BTW my fridge and the small magnifier ring light both cause enough EMI on the power line here to cause a USB disconnect. Probably the source of much random noise. Half the time when the fridge turns on, cgminer re-inits the KLn device. They're on the same outlet circuit.
How have you connected the outer shield of the usb plug to gnd? I have often seen at various hubs - that the other shield is also connected via some ferrite beads to gnd.
|
|
|
|
ecliptic
|
|
July 13, 2013, 01:58:47 AM Last edit: July 13, 2013, 02:30:02 AM by ecliptic |
|
Reading through burnin's and others designs it looks like these chips probably exceed 2A each if you overclock more than a little bit. Have you had any results running say, 8 chips on a 16A regulator (or 16 on 2x 16A regulators) and overclocking/overvolting?
Your buck is at 600khz while avalon's is at 300kHz, both spec'd at 2A/chip, so you should have somewhat better OCability, unless the current is the first limit you hit.
|
|
|
|
southerngentuk
Sr. Member
Offline
Activity: 1316
Merit: 254
Sugars.zone | DatingFi - Earn for Posting
|
|
July 13, 2013, 04:30:34 AM |
|
BTW my fridge and the small magnifier ring light both cause enough EMI on the power line here to cause a USB disconnect. Probably the source of much random noise. Half the time when the fridge turns on, cgminer re-inits the KLn device. They're on the same outlet circuit - If such a permanent issue exists, why not to invest in a good power line surge protector? My choice here always was the top device from the current APC SurgeArrest product line and I honestly must said that I never was disappointed. Modern APC SurgeArrest PER5, for example, offers 15 - 55 dB EMI / RFI noise rejection in 100 kHz to 10MHz frequency range, amongst the other useful features: http://www.apcmedia.com/salestools/ASTE-6Z7UZU/ASTE-6Z7UZU_R0_EN.pdfYes, I should pick up something like that. Problem here is that that kind of thing I have to order from USA. What they sell here is either junk or triple price. Or maybe buy some parts for noise rejection and mount them in the one I have. Probably a website somewhere with how to do that. If there is anything you need that can be sourced in Australia, let me no.. Am flying to BKK on the 21st and can bring it with me...
|
SUGAR | | | | ██ ██
██ ██
██ ██
██ ██
██ ██
██ ██ | | | | | | | | | ██ ██
██ ██
██ ██
██ ██
██ ██
██ ██ | | ███████████████████████████ ███████████████████████████ ██████ ██████ ██████ ▄████▀ ██████ ██████▄▄▄███▀ ▄█ ██████ ██████████▀ ▄███ ██████ ████████▀ ▄█████▄▄▄██████ ██████▀ ▄███████▀▀▀██████ ██████ ▀▀▀▀▀▀▀▀▀ ██████ ██████ ██████ ███████████████████████████ ███████████████████████████ | . Backed By ZetaChain | | ██ ██
██ ██
██ ██
██ ██
██ ██
██ ██ | | | | ██ ██
██ ██
██ ██
██ ██
██ ██
██ ██ | | | |
|
|
|
|