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.14 | whitequark | hey wpwrak_ DocScrutinizer05 |
03:25.20 | whitequark | so there's a circuit like this: https://pbs.twimg.com/media/B8aAls9CEAIlrhs.png:large |
03:25.40 | whitequark | when SW1 is closed, the MCU input connected to SW2 (normally open) trips spuriously |
03:28.29 | DocScrutinizer05 | hmm |
03:29.00 | whitequark | the solenoid at the right is actually a pinball machine flipper |
03:29.01 | whitequark | http://stevechannel.com/eos.htm |
03:29.10 | DocScrutinizer05 | (sorry, sick. maybe there's some old slivers where my brain should be) |
03:29.19 | whitequark | what I don't really understand is, |
03:29.37 | whitequark | even if the high transient currents in the wiring to the solenoid induce voltage elsewhere |
03:29.42 | DocScrutinizer05 | ooh pinball, now you got my full attention |
03:29.45 | whitequark | it shouldn't happen to a wire that is essentially floating |
03:29.59 | whitequark | and pulled down on the MCU side (10k on-chip resistor) |
03:31.30 | DocScrutinizer05 | it will |
03:31.54 | whitequark | how'd that even work? you do not have a closed path |
03:32.07 | whitequark | i mean, there's probably some parasitic capacitance between that wire and MCU ground |
03:32.12 | whitequark | a few dozen pF at most |
03:32.19 | whitequark | and it IS pulled down, not just floating |
03:32.33 | DocScrutinizer05 | actually 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.49 | whitequark | yep, that much I gathered |
03:32.56 | whitequark | it should consume 8A@30V for a few ms |
03:33.07 | DocScrutinizer05 | (unrelated mostly to the problem here) |
03:33.16 | DocScrutinizer05 | :nod: |
03:33.56 | whitequark | the layout is |
03:33.57 | whitequark | gnarly |
03:33.58 | whitequark | http://zacaj.com/screenshots/2015-01-27_21-57-28.jpg |
03:34.07 | whitequark | but i guess that's inevitable |
03:35.06 | DocScrutinizer05 | yep |
03:36.48 | whitequark | so, any ideas what can be done to fix the spurious SW2 trips? |
03:37.04 | DocScrutinizer05 | have 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.12 | whitequark | ok, so what i suggested to her wasn't wrong... |
03:38.12 | DocScrutinizer05 | that's RF interference, not capacitive phantom current |
03:38.18 | whitequark | hmm |
03:38.32 | DocScrutinizer05 | SW1 creates lots of RF noise |
03:38.54 | DocScrutinizer05 | actually EOS switch, not sw1 |
03:39.09 | whitequark | putting a snubber on EOS switch also didn't do anything to mitigate this |
03:39.11 | whitequark | apparently |
03:40.19 | whitequark | RF capacitor where? |
03:40.28 | whitequark | across the solenoid? |
03:41.30 | DocScrutinizer05 | bead and 47pF on MCU input |
03:41.47 | whitequark | right |
03:42.37 | DocScrutinizer05 | also consider the magnetic field of solenoid |
03:53.24 | DocScrutinizer05 | whitequark: what is sw1? |
03:54.07 | DocScrutinizer05 | I assumed it was related/mounted to flipper solenoid. Maybe it's not at all? |
03:54.32 | DocScrutinizer05 | err sw2, sorry |
03:54.58 | whitequark | sw2 is a button on the photo |
03:55.08 | DocScrutinizer05 | ? |
03:55.12 | whitequark | http://zacaj.com/screenshots/2015-01-27_21-57-28.jpg |
03:55.30 | whitequark | so it's not mounted on solenoid |
03:55.37 | DocScrutinizer05 | which button? |
03:55.44 | whitequark | see the red wire at bottom? |
03:56.52 | DocScrutinizer05 | yes |
03:57.13 | DocScrutinizer05 | well, "wire" |
03:57.30 | whitequark | it closes red/green (ignore blue, it doesn't exist) |
03:57.40 | whitequark | and so switches on the solenoid |
03:57.59 | DocScrutinizer05 | sw2? |
03:58.29 | whitequark | sw2 yes |
03:58.50 | DocScrutinizer05 | and what's sw1 then? |
03:59.11 | whitequark | another unrelated switch elsewhere |
03:59.22 | DocScrutinizer05 | err |
04:00.13 | DocScrutinizer05 | so how does sw2 switch on the solenoid? |
04:00.47 | whitequark | crap\ |
04:00.52 | *** join/#qi-hardware arhuaco (~arhuaco__@181.61.62.24) |
04:00.53 | whitequark | i mixed these up |
04:01.03 | whitequark | SW1 is the red button on the photo |
04:01.10 | whitequark | SW2 is a switch elsewhere |
04:01.15 | DocScrutinizer05 | where? |
04:02.02 | whitequark | sec |
04:02.41 | DocScrutinizer05 | make sure neither of both contacts of SW2 has connection to any GND or huge metal area |
04:03.20 | DocScrutinizer05 | make sure the wiring from MCU to SW2 is twistet pair |
04:03.46 | *** join/#qi-hardware zacaj (~chatzilla@zacaj.com) |
04:04.33 | whitequark | DocScrutinizer05: so, this is zacaj's pinball machine |
04:05.25 | DocScrutinizer05 | also make sure MCU and solenoid don't share GND wiring |
04:05.35 | whitequark | zacaj: where's SW1 located? |
04:05.44 | whitequark | er SW2 |
04:05.54 | whitequark | the one connected to MCU input |
04:06.28 | zacaj | there's a whole bunch,\ all over the playfield |
04:06.43 | DocScrutinizer05 | roll over buttons? |
04:06.54 | zacaj | my MCU and my solenoids need to share GND at some point so that I can control them via MOSFETs |
04:06.57 | DocScrutinizer05 | or taget or sth |
04:07.01 | zacaj | yes, rollovers, targets, etc |
04:07.22 | DocScrutinizer05 | sure connect GND, but don't share wiring |
04:07.23 | zacaj | I have them connected at one point near the PSUs |
04:07.32 | DocScrutinizer05 | star topology |
04:07.33 | zacaj | no, not shared |
04:07.41 | zacaj | just wanted to clarify/make sure |
04:07.51 | zacaj | yep |
04:07.51 | DocScrutinizer05 | good |
04:08.10 | DocScrutinizer05 | you built MCU? |
04:08.25 | DocScrutinizer05 | or at least know it? |
04:08.39 | zacaj | it's an STM32F3DISCOVERY (http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF254044) |
04:08.45 | DocScrutinizer05 | what's the input ? |
04:08.57 | zacaj | what do you mean? |
04:09.39 | DocScrutinizer05 | GPIO with nothing else? opto coupler? relay coil? |
04:09.55 | DocScrutinizer05 | GPIO with added pull down resistor? |
04:10.13 | zacaj | it's just the wire running from the switch to the GPIO, with an internal pulldown |
04:10.22 | DocScrutinizer05 | eeek |
04:10.31 | zacaj | I tried adding a 10k external pulldown, and it didn't affect it at all |
04:11.23 | DocScrutinizer05 | add a 500R pulldown, and proper clamping diodes to + and GND, and from that a 10k to GPIO |
04:12.11 | DocScrutinizer05 | or 4k7 |
04:12.33 | DocScrutinizer05 | GPIO are not made for that sort of input signals, really |
04:12.53 | DocScrutinizer05 | you need to add some protective and impedance matching gear |
04:13.06 | DocScrutinizer05 | ideally use opto couplers |
04:14.36 | DocScrutinizer05 | actually the contacts of SW2 *need* a certain minimum current to keep them clean |
04:14.38 | zacaj | so 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.57 | DocScrutinizer05 | yes |
04:16.11 | zacaj | alright.. 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.18 | DocScrutinizer05 | honestly I strongly recommend using opto couplers for this. Particularly for this environment |
04:17.00 | DocScrutinizer05 | otherwise I wouldn't take bets on how long your chip will live |
04:17.34 | zacaj | I'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.34 | DocScrutinizer05 | it deteriorates from the harsh input signals you encounter in a high current + solenoids environment like this one |
04:18.02 | DocScrutinizer05 | generally try going low impedance design |
04:18.50 | DocScrutinizer05 | use capacitors everywhere to clamp high frequencies (on digital signals) |
04:19.25 | DocScrutinizer05 | use termination resistors in the range <1k on all inputs |
04:20.16 | DocScrutinizer05 | design for mechanical switches like SW2 at least dealng with 20mA load |
04:20.38 | DocScrutinizer05 | i.e. even lower termination resistors |
04:24.53 | whitequark | hm, clever |
04:25.03 | zacaj | alright, thanks. I'll give some of that a shot |
04:28.32 | DocScrutinizer05 | and 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.11 | DocScrutinizer05 | "open" as in "not sealed" |
04:30.41 | DocScrutinizer05 | a 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.18 | DocScrutinizer05 | oooh, 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.35 | DocScrutinizer05 | you might test the conductivity (Ohms) of SW2 and see if it has some increased R_closed already |
04:37.08 | DocScrutinizer05 | this 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.32 | zacaj | I 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.05 | DocScrutinizer05 | ((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.48 | DocScrutinizer05 | ((still glitches)) ooh on MCU? |
04:41.25 | DocScrutinizer05 | i.e. the MCU glitches even on GPIO that are not connected to any wires? |
04:41.54 | zacaj | yes |
04:41.59 | DocScrutinizer05 | if yes, you need to test of it still does when you short the input to GND |
04:42.26 | DocScrutinizer05 | and you should consider proper shielding of your MCU PCB |
04:42.39 | zacaj | short the switch, or the GPIO? |
04:43.31 | DocScrutinizer05 | and 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.44 | DocScrutinizer05 | you 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.11 | DocScrutinizer05 | that's the brute force low inpedance design ;-) When it still sees glitches even when GPIO grounded, we face another problem |
04:47.14 | DocScrutinizer05 | if grounding fixes the problem, it's clearly cause by electromagnetic interference and can get fixed by appropriate measures |
04:47.58 | DocScrutinizer05 | like low impedance termination, i.e. a 470R from GPIO input to GND |
04:48.45 | DocScrutinizer05 | 220R maybe, to give the contacts something to work with (self cleaning) |
04:49.05 | DocScrutinizer05 | assuming this 3.3V in that drawing is correct |
04:49.26 | zacaj | yeah, 3.3v |
04:50.40 | DocScrutinizer05 | in 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.59 | DocScrutinizer05 | hmm, rather place the 100nF parallel to SW2 |
04:52.38 | DocScrutinizer05 | close to sw2 |
04:53.00 | DocScrutinizer05 | iow at far end of the twisted pair wire |
04:54.42 | zacaj | 'real GPIO'? |
04:54.43 | DocScrutinizer05 | but still such design has a lot of "antennas" feeding all sort of noise to your MCU GND |
04:55.30 | DocScrutinizer05 | CHIP GPIO <-10kR-> C-toGND, R-to-GND <---wire------ |
04:56.30 | DocScrutinizer05 | (noise to MCU GND) or to VDD 3V3 in your case |
04:56.35 | zacaj | k, that's what I thought |
04:57.41 | DocScrutinizer05 | opto couplers are a sure bet to fix all issues of such design |
04:58.11 | DocScrutinizer05 | just use "separate" GND and VDD for external side of couplers |
04:59.12 | whitequark | and same solution for MOSFETs |
04:59.20 | DocScrutinizer05 | ideally yes |
05:01.54 | zacaj | k, 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.39 | nicksydney | whitequark & 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.56 | wpwrak_ | nicksydney: cute ;-) and even open hw. btw, you should make a kickstarter project to create a taxonomy of all those little boards :) |
12:50.35 | nicksydney | wpwrak_: heheheh.....no need http://www.cnx-software.com/ already have the list :) |
12:52.10 | wpwrak_ | 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.26 | nicksydney | wpwrak_: maybe i should start a wiki page for that |
13:14.35 | nicksydney | will 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.01 | kristianpaul | https://www.sparkfun.com/products/13167 |
15:43.06 | kristianpaul | sb0 |
15:44.42 | sb0 | "optionally, could support a Si Avalanche Photo-Diode (APD)" |
15:44.49 | sb0 | are those going to be less expensive? |
15:47.15 | kristianpaul | dont 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) |