IRC log for #qi-hardware on 20150128

01:32.44*** join/#qi-hardware sb0 (~sb0@123202036015.ctinets.com)
01:57.10*** join/#qi-hardware atommann (~atommann@58.250.80.106)
02:39.29*** join/#qi-hardware viric (~viric@unaffiliated/viric)
02:44.24*** join/#qi-hardware xiangfu (~xiangfu@106.120.178.13)
03:25.14whitequarkhey wpwrak_ DocScrutinizer05
03:25.20whitequarkso there's a circuit like this: https://pbs.twimg.com/media/B8aAls9CEAIlrhs.png:large
03:25.40whitequarkwhen SW1 is closed, the MCU input connected to SW2 (normally open) trips spuriously
03:28.29DocScrutinizer05hmm
03:29.00whitequarkthe solenoid at the right is actually a pinball machine flipper
03:29.01whitequarkhttp://stevechannel.com/eos.htm
03:29.10DocScrutinizer05(sorry, sick. maybe there's some old slivers where my brain should be)
03:29.19whitequarkwhat I don't really understand is,
03:29.37whitequarkeven if the high transient currents in the wiring to the solenoid induce voltage elsewhere
03:29.42DocScrutinizer05ooh pinball, now you got my full attention
03:29.45whitequarkit shouldn't happen to a wire that is essentially floating
03:29.59whitequarkand pulled down on the MCU side (10k on-chip resistor)
03:31.30DocScrutinizer05it will
03:31.54whitequarkhow'd that even work? you do not have a closed path
03:32.07whitequarki mean, there's probably some parasitic capacitance between that wire and MCU ground
03:32.12whitequarka few dozen pF at most
03:32.19whitequarkand it IS pulled down, not just floating
03:32.33DocScrutinizer05actually EOS is to force high current through solenoid until it moved to end position. Then the contact opens to reduce current flowing through solenoid
03:32.49whitequarkyep, that much I gathered
03:32.56whitequarkit should consume 8A@30V for a few ms
03:33.07DocScrutinizer05(unrelated mostly to the problem here)
03:33.16DocScrutinizer05:nod:
03:33.56whitequarkthe layout is
03:33.57whitequarkgnarly
03:33.58whitequarkhttp://zacaj.com/screenshots/2015-01-27_21-57-28.jpg
03:34.07whitequarkbut i guess that's inevitable
03:35.06DocScrutinizer05yep
03:36.48whitequarkso, any ideas what can be done to fix the spurious SW2 trips?
03:37.04DocScrutinizer05have the pair(!) of wires from MCU to sw2 twisted, keep them away from other high current wires. Increase load (inside MCU) to 1k or less, add a RF capacitor and naybe a ferrite bead
03:38.12whitequarkok, so what i suggested to her wasn't wrong...
03:38.12DocScrutinizer05that's RF interference, not capacitive phantom current
03:38.18whitequarkhmm
03:38.32DocScrutinizer05SW1 creates lots of RF noise
03:38.54DocScrutinizer05actually EOS switch, not sw1
03:39.09whitequarkputting a snubber on EOS switch also didn't do anything to mitigate this
03:39.11whitequarkapparently
03:40.19whitequarkRF capacitor where?
03:40.28whitequarkacross the solenoid?
03:41.30DocScrutinizer05bead and 47pF on MCU input
03:41.47whitequarkright
03:42.37DocScrutinizer05also consider the magnetic field of solenoid
03:53.24DocScrutinizer05whitequark: what is sw1?
03:54.07DocScrutinizer05I assumed it was related/mounted to flipper solenoid. Maybe it's not at all?
03:54.32DocScrutinizer05err sw2, sorry
03:54.58whitequarksw2 is a button on the photo
03:55.08DocScrutinizer05?
03:55.12whitequarkhttp://zacaj.com/screenshots/2015-01-27_21-57-28.jpg
03:55.30whitequarkso it's not mounted on solenoid
03:55.37DocScrutinizer05which button?
03:55.44whitequarksee the red wire at bottom?
03:56.52DocScrutinizer05yes
03:57.13DocScrutinizer05well, "wire"
03:57.30whitequarkit closes red/green (ignore blue, it doesn't exist)
03:57.40whitequarkand so switches on the solenoid
03:57.59DocScrutinizer05sw2?
03:58.29whitequarksw2 yes
03:58.50DocScrutinizer05and what's sw1 then?
03:59.11whitequarkanother unrelated switch elsewhere
03:59.22DocScrutinizer05err
04:00.13DocScrutinizer05so how does sw2 switch on the solenoid?
04:00.47whitequarkcrap\
04:00.52*** join/#qi-hardware arhuaco (~arhuaco__@181.61.62.24)
04:00.53whitequarki mixed these up
04:01.03whitequarkSW1 is the red button on the photo
04:01.10whitequarkSW2 is a switch elsewhere
04:01.15DocScrutinizer05where?
04:02.02whitequarksec
04:02.41DocScrutinizer05make sure neither of both contacts of SW2 has connection to any GND or huge metal area
04:03.20DocScrutinizer05make sure the wiring from MCU to SW2 is twistet pair
04:03.46*** join/#qi-hardware zacaj (~chatzilla@zacaj.com)
04:04.33whitequarkDocScrutinizer05: so, this is zacaj's pinball machine
04:05.25DocScrutinizer05also make sure MCU and solenoid don't share GND wiring
04:05.35whitequarkzacaj: where's SW1 located?
04:05.44whitequarker SW2
04:05.54whitequarkthe one connected to MCU input
04:06.28zacajthere's a whole bunch,\ all over the playfield
04:06.43DocScrutinizer05roll over buttons?
04:06.54zacajmy MCU and my solenoids need to share GND at some point so that I can control them via MOSFETs
04:06.57DocScrutinizer05or taget or sth
04:07.01zacajyes, rollovers, targets, etc
04:07.22DocScrutinizer05sure connect GND, but don't share wiring
04:07.23zacajI have them connected at one point near the PSUs
04:07.32DocScrutinizer05star topology
04:07.33zacajno, not shared
04:07.41zacajjust wanted to clarify/make sure
04:07.51zacajyep
04:07.51DocScrutinizer05good
04:08.10DocScrutinizer05you built MCU?
04:08.25DocScrutinizer05or at least know it?
04:08.39zacajit's an STM32F3DISCOVERY (http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF254044)
04:08.45DocScrutinizer05what's the input ?
04:08.57zacajwhat do you mean?
04:09.39DocScrutinizer05GPIO with nothing else? opto coupler? relay coil?
04:09.55DocScrutinizer05GPIO with added pull down resistor?
04:10.13zacajit's just the wire running from the switch to the GPIO, with an internal pulldown
04:10.22DocScrutinizer05eeek
04:10.31zacajI tried adding a 10k external pulldown, and it didn't affect it at all
04:11.23DocScrutinizer05add a 500R pulldown, and proper clamping diodes to + and GND, and from that a 10k to GPIO
04:12.11DocScrutinizer05or 4k7
04:12.33DocScrutinizer05GPIO are not made for that sort of input signals, really
04:12.53DocScrutinizer05you need to add some protective and impedance matching gear
04:13.06DocScrutinizer05ideally use opto couplers
04:14.36DocScrutinizer05actually the contacts of SW2 *need* a certain minimum current to keep them clean
04:14.38zacajso this level of spikes and interference from the coils is standard, (eg best I'm going to get) and I should be attempting to smooth it off in various ways at the inputs, instead of trying to lower the source of the interference?
04:14.57DocScrutinizer05yes
04:16.11zacajalright..  some of my inputs go through a shift register, and they seem to work fine, so for the inputs I guess I could just re-route all my GPIO ones through that.
04:16.18DocScrutinizer05honestly I strongly recommend using opto couplers for this. Particularly for this environment
04:17.00DocScrutinizer05otherwise I wouldn't take bets on how long your chip will live
04:17.34zacajI'm also having trouble with my LED driver chips 'randomizing' sometimes when I flip, is there anything besides sticking some decoupling capacitors on I could do for that?
04:17.34DocScrutinizer05it deteriorates from the harsh input signals you encounter in a high current + solenoids environment like this one
04:18.02DocScrutinizer05generally try going low impedance design
04:18.50DocScrutinizer05use capacitors everywhere to clamp high frequencies (on digital signals)
04:19.25DocScrutinizer05use termination resistors in the range <1k on all inputs
04:20.16DocScrutinizer05design for mechanical switches like SW2 at least dealng with 20mA load
04:20.38DocScrutinizer05i.e. even lower termination resistors
04:24.53whitequarkhm, clever
04:25.03zacajalright, thanks.  I'll give some of that a shot
04:28.32DocScrutinizer05and check about "self cleaning current" of contacts. I dunno if I vcan find the right wiki article right away. generally open contacts need a certain minimum current they have to switch, so any oxide etc will "burn away". Otherwise they eventually start failing
04:29.11DocScrutinizer05"open" as in "not sealed"
04:30.41DocScrutinizer05a reed contact in a glass tube with inert gas has few requirements like those. The contacts you deal with in your pinball cabinet need some tens of mA at least to stay "fresh"
04:34.18DocScrutinizer05oooh, btw: those glitches on sw2 even might be triggered by mechanical vibration, particularly when the contacts have insufficient load as elaborated in lines above. This would be a typical problem of contacts building up issues without self cleaning
04:35.35DocScrutinizer05you might test the conductivity (Ohms) of SW2 and see if it has some increased R_closed already
04:37.08DocScrutinizer05this would be a noisy effect seen every now and then, so a single short time test may not tell much, you need to probe the thing several times, opening and closing it slowly and gently. Ideally using a scope to see excessive bouncing etc
04:38.32zacajI tested with SW2 disconnected completely from the GPIO and I'd still get glitches
04:39.26*** join/#qi-hardware Haswell (~Haswell@unaffiliated/haswell)
04:40.05DocScrutinizer05((trouble with my LED driver chips 'randomizing')) use proper 47pF 22nF supply voltage buffering next to the chips. Consider shielding of the whole circuit, eg. with a alu coated carton you place on the soldering side of PCB and connect the ALU to GND
04:40.48DocScrutinizer05((still glitches)) ooh on MCU?
04:41.25DocScrutinizer05i.e. the MCU glitches even on GPIO that are not connected to any wires?
04:41.54zacajyes
04:41.59DocScrutinizer05if yes, you need to test of it still does when you short the input to GND
04:42.26DocScrutinizer05and you should consider proper shielding of your MCU PCB
04:42.39zacajshort the switch, or the GPIO?
04:43.31DocScrutinizer05and make sure your power supply is clean: place some huge ferrite bead on VDD wire, next to the MCU, and a buffer capacitor behind that
04:44.44DocScrutinizer05you said the GPIO is not connected to any wires and still gets glitches. So short to GND the PCB connection point where wire would go
04:46.11DocScrutinizer05that's the brute force low inpedance design ;-) When it still sees glitches even when GPIO grounded, we face another problem
04:47.14DocScrutinizer05if grounding fixes the problem, it's clearly cause by electromagnetic interference and can get fixed by appropriate measures
04:47.58DocScrutinizer05like low impedance termination, i.e. a 470R from GPIO input to GND
04:48.45DocScrutinizer05220R maybe, to give the contacts something to work with (self cleaning)
04:49.05DocScrutinizer05assuming this 3.3V in that drawing is correct
04:49.26zacajyeah, 3.3v
04:50.40DocScrutinizer05in addition you want a 47pF and a 100nF parallel to that 220R. And optimum would be a 10kR from all that to the real GPIO
04:51.59DocScrutinizer05hmm, rather place the 100nF parallel to SW2
04:52.38DocScrutinizer05close to sw2
04:53.00DocScrutinizer05iow at far end of the twisted pair wire
04:54.42zacaj'real GPIO'?
04:54.43DocScrutinizer05but still such design has a lot of "antennas" feeding all sort of noise to your MCU GND
04:55.30DocScrutinizer05CHIP GPIO <-10kR-> C-toGND, R-to-GND <---wire------
04:56.30DocScrutinizer05(noise to MCU GND) or to VDD 3V3 in your case
04:56.35zacajk, that's what I thought
04:57.41DocScrutinizer05opto couplers are a sure bet to fix all issues of such design
04:58.11DocScrutinizer05just use "separate" GND and VDD for external side of couplers
04:59.12whitequarkand same solution for MOSFETs
04:59.20DocScrutinizer05ideally yes
05:01.54zacajk, thanks.  I'm off to bed
05:09.00*** join/#qi-hardware tumdedum (~tumdedum@unaffiliated/espiral)
06:00.48*** join/#qi-hardware archang (~archang@148.109.128.122.static.ximdns.com)
06:26.12*** join/#qi-hardware jekhor__ (~jek@nat-minsk-pool-46-53-200-14.telecom.by)
06:37.36*** join/#qi-hardware atommann (~atommann@58.250.80.106)
06:41.28*** join/#qi-hardware sb0 (~sb0@123202036015.ctinets.com)
07:43.13*** join/#qi-hardware fengling (~fengling@106.120.178.13)
08:09.16*** join/#qi-hardware atommann (~atommann@113.87.142.196)
08:11.43*** join/#qi-hardware wej (~j@2001:1af8:4010:a027:21::4e)
08:59.30*** join/#qi-hardware atommann (~atommann@116.24.82.221)
09:10.36*** join/#qi-hardware pcercuei_ (~paul@137.71.226.54)
09:19.22*** join/#qi-hardware wolfspraul (~wolfsprau@brln-4d0c8b7c.pool.mediaWays.net)
09:38.29*** join/#qi-hardware lars_ (~lars@eisbaer.ursus-maritimus.org)
09:55.26*** join/#qi-hardware jekhor__ (~jek@port-207-adslby-pool42.infonet.by)
10:08.56*** join/#qi-hardware whitequark (whitequark@fehu.whitequark.org)
10:29.35*** join/#qi-hardware xiangfu (~xiangfu@123.125.212.79)
10:42.39nicksydneywhitequark & wpwrak_ :  https://www.kickstarter.com/projects/1133560316/black-swift-tiny-wireless-computer
11:12.56*** join/#qi-hardware jekhor_ (~jek@port-207-adslby-pool42.infonet.by)
11:48.52*** join/#qi-hardware lars_ (~lars@eisbaer.ursus-maritimus.org)
12:34.04*** join/#qi-hardware jekhor__ (~jek@port-207-adslby-pool42.infonet.by)
12:47.24*** join/#qi-hardware atommann (~atommann@58.250.80.106)
12:49.56wpwrak_nicksydney: cute ;-) and even open hw. btw, you should make a kickstarter project to create a taxonomy of all those little boards :)
12:50.35nicksydneywpwrak_: heheheh.....no need http://www.cnx-software.com/ already have the list :)
12:52.10wpwrak_but you could format it nicely :) break it down into tables comparing features, etc. that's more work that one may think
13:03.52*** join/#qi-hardware methril (~methril@189.120.82.109)
13:14.26nicksydneywpwrak_: maybe i should start a wiki page for that
13:14.35nicksydneywill do that in qi-hardware website later
13:16.42*** join/#qi-hardware wolfspraul (~wolfsprau@brln-4d0c8b7c.pool.mediaWays.net)
13:28.20*** join/#qi-hardware pcercuei (~paul@137.71.226.54)
14:12.07*** join/#qi-hardware methril (~methril@189.120.82.109)
14:22.54*** join/#qi-hardware methril (~methril@201.83.162.233)
14:51.04*** join/#qi-hardware sb0 (~sb0@123202036015.ctinets.com)
15:43.01kristianpaulhttps://www.sparkfun.com/products/13167
15:43.06kristianpaulsb0
15:44.42sb0"optionally, could support a Si Avalanche Photo-Diode (APD)"
15:44.49sb0are those going to be less expensive?
15:47.15kristianpauldont know
15:52.51*** join/#qi-hardware jekhor_ (~jek@port-207-adslby-pool42.infonet.by)
16:22.27*** join/#qi-hardware jekhor__ (~jek@port-207-adslby-pool42.infonet.by)
16:49.00*** join/#qi-hardware wej (~j@2001:1af8:4010:a027:21::4e)
17:46.55*** join/#qi-hardware kyak (~kyak@unaffiliated/kyak)
18:07.10*** join/#qi-hardware shinobi (~shinobi@78.176.134.54)
18:42.21*** join/#qi-hardware pcercuei (~pcercuei@2a02:810d:1b40:1118::2)
19:04.41*** part/#qi-hardware shinobi (~shinobi@78.176.134.54)
19:57.48*** join/#qi-hardware pcercuei (~pcercuei@2a02:810d:1b40:1118:1af4:6aff:fec5:1c8f)
20:04.15*** join/#qi-hardware jekhor__ (~jek@nat-minsk-pool-46-53-200-14.telecom.by)
20:19.39*** join/#qi-hardware Jay7 (jay@128-73-158-2.broadband.corbina.ru)
20:57.00*** join/#qi-hardware FDCX_ (~fdcx@84.232.210.144)
21:05.24*** join/#qi-hardware porchao (~quassel@218.231.154.233.eo.eaccess.ne.jp)
21:12.55*** join/#qi-hardware roh (~roh@yamato.hyte.de)
21:33.35*** join/#qi-hardware larsc (~lars@eisbaer.ursus-maritimus.org)
21:55.21*** join/#qi-hardware larsc (~lars@eisbaer.ursus-maritimus.org)
23:12.56*** join/#qi-hardware wej (~j@2001:1af8:4010:a027:21::4e)
23:42.32*** join/#qi-hardware Textmode (~boneidle@adsl-1-au-2-174.ozonline.com.au)
23:57.57*** join/#qi-hardware wej (~j@2001:1af8:4010:a027:21::4e)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.