2015-01-28 01:22 larsc has quit [Remote host closed the connection] 2015-01-28 01:32 sb0 has joined #qi-hardware 2015-01-28 01:57 atommann has joined #qi-hardware 2015-01-28 02:32 viric has quit [Ping timeout: 256 seconds] 2015-01-28 02:39 viric has joined #qi-hardware 2015-01-28 02:44 fengling_ is now known as fengling 2015-01-28 02:44 xiangfu has joined #qi-hardware 2015-01-28 03:25 hey wpwrak_ DocScrutinizer05 2015-01-28 03:25 so there's a circuit like this: https://pbs.twimg.com/media/B8aAls9CEAIlrhs.png:large 2015-01-28 03:25 when SW1 is closed, the MCU input connected to SW2 (normally open) trips spuriously 2015-01-28 03:28 hmm 2015-01-28 03:29 the solenoid at the right is actually a pinball machine flipper 2015-01-28 03:29 http://stevechannel.com/eos.htm 2015-01-28 03:29 (sorry, sick. maybe there's some old slivers where my brain should be) 2015-01-28 03:29 what I don't really understand is, 2015-01-28 03:29 even if the high transient currents in the wiring to the solenoid induce voltage elsewhere 2015-01-28 03:29 ooh pinball, now you got my full attention 2015-01-28 03:29 it shouldn't happen to a wire that is essentially floating 2015-01-28 03:29 and pulled down on the MCU side (10k on-chip resistor) 2015-01-28 03:31 it will 2015-01-28 03:31 how'd that even work? you do not have a closed path 2015-01-28 03:32 i mean, there's probably some parasitic capacitance between that wire and MCU ground 2015-01-28 03:32 a few dozen pF at most 2015-01-28 03:32 and it IS pulled down, not just floating 2015-01-28 03:32 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 2015-01-28 03:32 yep, that much I gathered 2015-01-28 03:32 it should consume 8A@30V for a few ms 2015-01-28 03:33 (unrelated mostly to the problem here) 2015-01-28 03:33 :nod: 2015-01-28 03:33 the layout is 2015-01-28 03:33 gnarly 2015-01-28 03:33 http://zacaj.com/screenshots/2015-01-27_21-57-28.jpg 2015-01-28 03:34 but i guess that's inevitable 2015-01-28 03:35 yep 2015-01-28 03:36 so, any ideas what can be done to fix the spurious SW2 trips? 2015-01-28 03:37 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 2015-01-28 03:38 ok, so what i suggested to her wasn't wrong... 2015-01-28 03:38 that's RF interference, not capacitive phantom current 2015-01-28 03:38 hmm 2015-01-28 03:38 SW1 creates lots of RF noise 2015-01-28 03:38 actually EOS switch, not sw1 2015-01-28 03:39 putting a snubber on EOS switch also didn't do anything to mitigate this 2015-01-28 03:39 apparently 2015-01-28 03:40 sb0 has quit [Quit: Leaving] 2015-01-28 03:40 RF capacitor where? 2015-01-28 03:40 across the solenoid? 2015-01-28 03:41 bead and 47pF on MCU input 2015-01-28 03:41 right 2015-01-28 03:42 also consider the magnetic field of solenoid 2015-01-28 03:53 whitequark: what is sw1? 2015-01-28 03:54 I assumed it was related/mounted to flipper solenoid. Maybe it's not at all? 2015-01-28 03:54 err sw2, sorry 2015-01-28 03:54 arhuaco has quit [Remote host closed the connection] 2015-01-28 03:54 sw2 is a button on the photo 2015-01-28 03:55 ? 2015-01-28 03:55 http://zacaj.com/screenshots/2015-01-27_21-57-28.jpg 2015-01-28 03:55 so it's not mounted on solenoid 2015-01-28 03:55 which button? 2015-01-28 03:55 see the red wire at bottom? 2015-01-28 03:56 yes 2015-01-28 03:57 well, "wire" 2015-01-28 03:57 it closes red/green (ignore blue, it doesn't exist) 2015-01-28 03:57 and so switches on the solenoid 2015-01-28 03:57 sw2? 2015-01-28 03:58 sw2 yes 2015-01-28 03:58 and what's sw1 then? 2015-01-28 03:59 another unrelated switch elsewhere 2015-01-28 03:59 err 2015-01-28 04:00 so how does sw2 switch on the solenoid? 2015-01-28 04:00 crap\ 2015-01-28 04:00 arhuaco has joined #qi-hardware 2015-01-28 04:00 i mixed these up 2015-01-28 04:01 SW1 is the red button on the photo 2015-01-28 04:01 SW2 is a switch elsewhere 2015-01-28 04:01 where? 2015-01-28 04:02 sec 2015-01-28 04:02 make sure neither of both contacts of SW2 has connection to any GND or huge metal area 2015-01-28 04:03 make sure the wiring from MCU to SW2 is twistet pair 2015-01-28 04:03 zacaj has joined #qi-hardware 2015-01-28 04:04 DocScrutinizer05: so, this is zacaj's pinball machine 2015-01-28 04:05 also make sure MCU and solenoid don't share GND wiring 2015-01-28 04:05 zacaj: where's SW1 located? 2015-01-28 04:05 er SW2 2015-01-28 04:05 the one connected to MCU input 2015-01-28 04:06 there's a whole bunch,\ all over the playfield 2015-01-28 04:06 roll over buttons? 2015-01-28 04:06 my MCU and my solenoids need to share GND at some point so that I can control them via MOSFETs 2015-01-28 04:06 or taget or sth 2015-01-28 04:07 yes, rollovers, targets, etc 2015-01-28 04:07 sure connect GND, but don't share wiring 2015-01-28 04:07 I have them connected at one point near the PSUs 2015-01-28 04:07 star topology 2015-01-28 04:07 no, not shared 2015-01-28 04:07 just wanted to clarify/make sure 2015-01-28 04:07 yep 2015-01-28 04:07 good 2015-01-28 04:08 you built MCU? 2015-01-28 04:08 or at least know it? 2015-01-28 04:08 it's an STM32F3DISCOVERY (http://www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF254044) 2015-01-28 04:08 what's the input ? 2015-01-28 04:08 what do you mean? 2015-01-28 04:09 GPIO with nothing else? opto coupler? relay coil? 2015-01-28 04:09 GPIO with added pull down resistor? 2015-01-28 04:10 it's just the wire running from the switch to the GPIO, with an internal pulldown 2015-01-28 04:10 eeek 2015-01-28 04:10 I tried adding a 10k external pulldown, and it didn't affect it at all 2015-01-28 04:11 add a 500R pulldown, and proper clamping diodes to + and GND, and from that a 10k to GPIO 2015-01-28 04:12 or 4k7 2015-01-28 04:12 GPIO are not made for that sort of input signals, really 2015-01-28 04:12 you need to add some protective and impedance matching gear 2015-01-28 04:13 ideally use opto couplers 2015-01-28 04:14 actually the contacts of SW2 *need* a certain minimum current to keep them clean 2015-01-28 04:14 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? 2015-01-28 04:14 yes 2015-01-28 04:16 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. 2015-01-28 04:16 honestly I strongly recommend using opto couplers for this. Particularly for this environment 2015-01-28 04:17 otherwise I wouldn't take bets on how long your chip will live 2015-01-28 04:17 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? 2015-01-28 04:17 it deteriorates from the harsh input signals you encounter in a high current + solenoids environment like this one 2015-01-28 04:18 generally try going low impedance design 2015-01-28 04:18 use capacitors everywhere to clamp high frequencies (on digital signals) 2015-01-28 04:19 use termination resistors in the range <1k on all inputs 2015-01-28 04:20 design for mechanical switches like SW2 at least dealng with 20mA load 2015-01-28 04:20 i.e. even lower termination resistors 2015-01-28 04:24 hm, clever 2015-01-28 04:25 alright, thanks. I'll give some of that a shot 2015-01-28 04:28 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 2015-01-28 04:29 "open" as in "not sealed" 2015-01-28 04:30 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" 2015-01-28 04:34 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 2015-01-28 04:35 you might test the conductivity (Ohms) of SW2 and see if it has some increased R_closed already 2015-01-28 04:37 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 2015-01-28 04:38 I tested with SW2 disconnected completely from the GPIO and I'd still get glitches 2015-01-28 04:39 Haswell has joined #qi-hardware 2015-01-28 04:40 ((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 2015-01-28 04:40 ((still glitches)) ooh on MCU? 2015-01-28 04:41 i.e. the MCU glitches even on GPIO that are not connected to any wires? 2015-01-28 04:41 yes 2015-01-28 04:41 if yes, you need to test of it still does when you short the input to GND 2015-01-28 04:42 and you should consider proper shielding of your MCU PCB 2015-01-28 04:42 short the switch, or the GPIO? 2015-01-28 04:43 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 2015-01-28 04:44 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 2015-01-28 04:46 that's the brute force low inpedance design ;-) When it still sees glitches even when GPIO grounded, we face another problem 2015-01-28 04:47 if grounding fixes the problem, it's clearly cause by electromagnetic interference and can get fixed by appropriate measures 2015-01-28 04:47 like low impedance termination, i.e. a 470R from GPIO input to GND 2015-01-28 04:48 220R maybe, to give the contacts something to work with (self cleaning) 2015-01-28 04:49 assuming this 3.3V in that drawing is correct 2015-01-28 04:49 yeah, 3.3v 2015-01-28 04:50 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 2015-01-28 04:51 hmm, rather place the 100nF parallel to SW2 2015-01-28 04:52 close to sw2 2015-01-28 04:52 iow at far end of the twisted pair wire 2015-01-28 04:54 'real GPIO'? 2015-01-28 04:54 but still such design has a lot of "antennas" feeding all sort of noise to your MCU GND 2015-01-28 04:55 CHIP GPIO <-10kR-> C-toGND, R-to-GND <---wire------ 2015-01-28 04:56 (noise to MCU GND) or to VDD 3V3 in your case 2015-01-28 04:56 k, that's what I thought 2015-01-28 04:57 opto couplers are a sure bet to fix all issues of such design 2015-01-28 04:58 just use "separate" GND and VDD for external side of couplers 2015-01-28 04:59 and same solution for MOSFETs 2015-01-28 04:59 ideally yes 2015-01-28 05:01 k, thanks. I'm off to bed 2015-01-28 05:02 zacaj has quit [Quit: ChatZilla 0.9.91.1 [Firefox 35.0/20150108202552]] 2015-01-28 05:08 tumdedum has quit [Ping timeout: 264 seconds] 2015-01-28 05:08 tumdedum has joined #qi-hardware 2015-01-28 05:48 archang has quit [Ping timeout: 264 seconds] 2015-01-28 06:00 archang has joined #qi-hardware 2015-01-28 06:20 atommann has quit [Ping timeout: 240 seconds] 2015-01-28 06:26 jekhor__ has joined #qi-hardware 2015-01-28 06:37 atommann has joined #qi-hardware 2015-01-28 06:41 sb0 has joined #qi-hardware 2015-01-28 06:50 xiangfu has quit [Remote host closed the connection] 2015-01-28 07:34 fengling has quit [Ping timeout: 244 seconds] 2015-01-28 07:43 fengling has joined #qi-hardware 2015-01-28 07:52 atommann has quit [Ping timeout: 264 seconds] 2015-01-28 08:06 wej has quit [Ping timeout: 272 seconds] 2015-01-28 08:09 atommann has joined #qi-hardware 2015-01-28 08:11 wej has joined #qi-hardware 2015-01-28 08:47 atommann has quit [Ping timeout: 276 seconds] 2015-01-28 08:59 atommann has joined #qi-hardware 2015-01-28 09:10 pcercuei_ has joined #qi-hardware 2015-01-28 09:18 jekhor__ has quit [Ping timeout: 265 seconds] 2015-01-28 09:18 pcercuei_ is now known as pcercuei 2015-01-28 09:19 wolfspraul has joined #qi-hardware 2015-01-28 09:38 lars_ has joined #qi-hardware 2015-01-28 09:51 lars_ is now known as larsc 2015-01-28 09:55 jekhor__ has joined #qi-hardware 2015-01-28 10:08 whitequark has quit [Ping timeout: 272 seconds] 2015-01-28 10:08 whitequark has joined #qi-hardware 2015-01-28 10:29 xiangfu has joined #qi-hardware 2015-01-28 10:34 fengling has quit [Quit: WeeChat 1.0] 2015-01-28 10:36 xiangfu has quit [Remote host closed the connection] 2015-01-28 10:42 whitequark & wpwrak_ : https://www.kickstarter.com/projects/1133560316/black-swift-tiny-wireless-computer 2015-01-28 11:12 jekhor_ has joined #qi-hardware 2015-01-28 11:16 jekhor__ has quit [Ping timeout: 264 seconds] 2015-01-28 11:24 Haswell has quit [Quit: Saliendo] 2015-01-28 11:38 atommann has quit [Ping timeout: 264 seconds] 2015-01-28 11:48 lars_ has joined #qi-hardware 2015-01-28 12:34 jekhor__ has joined #qi-hardware 2015-01-28 12:37 jekhor_ has quit [Ping timeout: 252 seconds] 2015-01-28 12:47 atommann has joined #qi-hardware 2015-01-28 12:49 methril has quit [Ping timeout: 245 seconds] 2015-01-28 12:49 nicksydney: cute ;-) and even open hw. btw, you should make a kickstarter project to create a taxonomy of all those little boards :) 2015-01-28 12:50 wpwrak_: heheheh.....no need http://www.cnx-software.com/ already have the list :) 2015-01-28 12:52 but you could format it nicely :) break it down into tables comparing features, etc. that's more work that one may think 2015-01-28 13:03 methril has joined #qi-hardware 2015-01-28 13:04 kyak has quit [Quit: Lost terminal] 2015-01-28 13:06 wolfspraul has quit [Ping timeout: 264 seconds] 2015-01-28 13:14 wpwrak_: maybe i should start a wiki page for that 2015-01-28 13:14 will do that in qi-hardware website later 2015-01-28 13:16 wolfspraul has joined #qi-hardware 2015-01-28 13:27 pcercuei has quit [Ping timeout: 276 seconds] 2015-01-28 13:28 pcercuei has joined #qi-hardware 2015-01-28 14:07 atommann has quit [Quit: Leaving] 2015-01-28 14:10 methril has quit [Ping timeout: 252 seconds] 2015-01-28 14:12 methril has joined #qi-hardware 2015-01-28 14:17 methril has quit [Ping timeout: 252 seconds] 2015-01-28 14:22 methril has joined #qi-hardware 2015-01-28 14:41 sb0 has quit [Quit: Leaving] 2015-01-28 14:51 sb0 has joined #qi-hardware 2015-01-28 14:51 porchao has quit [Quit: Leaving...] 2015-01-28 15:43 https://www.sparkfun.com/products/13167 2015-01-28 15:43 sb0 2015-01-28 15:44 "optionally, could support a Si Avalanche Photo-Diode (APD)" 2015-01-28 15:44 are those going to be less expensive? 2015-01-28 15:47 dont know 2015-01-28 15:52 jekhor_ has joined #qi-hardware 2015-01-28 15:56 jekhor__ has quit [Ping timeout: 256 seconds] 2015-01-28 16:22 jekhor__ has joined #qi-hardware 2015-01-28 16:25 jekhor_ has quit [Ping timeout: 246 seconds] 2015-01-28 16:43 wej has quit [Ping timeout: 245 seconds] 2015-01-28 16:48 wej has joined #qi-hardware 2015-01-28 16:51 sb0 has quit [Quit: Leaving] 2015-01-28 17:34 pcercuei has quit [Ping timeout: 272 seconds] 2015-01-28 17:46 kyak has joined #qi-hardware 2015-01-28 17:46 kyak has joined #qi-hardware 2015-01-28 18:07 shinobi has joined #qi-hardware 2015-01-28 18:34 Jay7x has quit [Read error: Connection reset by peer] 2015-01-28 18:42 pcercuei has joined #qi-hardware 2015-01-28 18:50 jekhor__ has quit [Ping timeout: 256 seconds] 2015-01-28 19:04 shinobi has left #qi-hardware ["Konversation terminated!"] 2015-01-28 19:47 wolfspraul has quit [Quit: leaving] 2015-01-28 19:57 pcercuei has quit [Ping timeout: 265 seconds] 2015-01-28 19:57 pcercuei has joined #qi-hardware 2015-01-28 20:04 jekhor__ has joined #qi-hardware 2015-01-28 20:19 Jay7 has joined #qi-hardware 2015-01-28 20:51 methril has quit [Quit: Leaving] 2015-01-28 20:57 FDCX_ has joined #qi-hardware 2015-01-28 21:05 porchao has joined #qi-hardware 2015-01-28 21:07 roh has quit [Ping timeout: 252 seconds] 2015-01-28 21:12 roh has joined #qi-hardware 2015-01-28 21:15 larsc has quit [Remote host closed the connection] 2015-01-28 21:33 larsc has joined #qi-hardware 2015-01-28 21:49 larsc has quit [Ping timeout: 264 seconds] 2015-01-28 21:55 larsc has joined #qi-hardware 2015-01-28 22:38 jekhor__ has quit [Ping timeout: 256 seconds] 2015-01-28 23:04 wej has quit [Ping timeout: 250 seconds] 2015-01-28 23:12 wej has joined #qi-hardware 2015-01-28 23:34 FDCX_ has quit [Ping timeout: 245 seconds] 2015-01-28 23:42 wej has quit [Ping timeout: 245 seconds] 2015-01-28 23:42 Textmode has joined #qi-hardware 2015-01-28 23:46 pcercuei has quit [Ping timeout: 276 seconds] 2015-01-28 23:57 wej has joined #qi-hardware