whitequark changed the topic of #glasgow to: glasgow debug tool · code https://github.com/GlasgowEmbedded/Glasgow · logs https://freenode.irclog.whitequark.org/glasgow
zkms has joined #glasgow
zkms has quit [Ping timeout: 240 seconds]
zkms has joined #glasgow
movax has quit [Ping timeout: 246 seconds]
cr1901_modern1 has joined #glasgow
cr1901_modern has quit [Ping timeout: 245 seconds]
cr1901_modern has joined #glasgow
cr1901_modern1 has quit [Ping timeout: 246 seconds]
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
futarisIRCcloud has joined #glasgow
jevinskie has joined #glasgow
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
jevinskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jevinskie has joined #glasgow
modrobert has quit [Quit: so long]
Jasjar has quit [Ping timeout: 250 seconds]
_whitelogger has joined #glasgow
bgamari has quit [Ping timeout: 250 seconds]
bgamari has joined #glasgow
futarisIRCcloud has joined #glasgow
modrobert has joined #glasgow
jevinskie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bgamari has quit [Ping timeout: 250 seconds]
bgamari has joined #glasgow
_whitelogger has joined #glasgow
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
Jasjar has joined #glasgow
utzig has joined #glasgow
utzig has quit [Ping timeout: 246 seconds]
zkms has quit [Quit: zkms]
jevinskie has joined #glasgow
<electronic_eel> I just verified a somewhat reasonable solution to protect logic pins like on the glasgow from +-30V
<electronic_eel> I use two depletion fets (BSS139) back to back
<whitequark> hmm
<electronic_eel> They limit the current to about 50mA at 30V
<whitequark> can you elaborate?
<electronic_eel> And stay reasonable warm
<electronic_eel> Here is the circuit and thermal image: https://postimg.cc/gallery/dudhlpt4/
<electronic_eel> This could be something to put on an protection addon for Glasgow
<whitequark> hmm
<whitequark> what about capacitance?
<electronic_eel> Haven't measured capacitance yet
<electronic_eel> my lcr meter tells me z is the same as r and a phase of about 0
<electronic_eel> I don't think there is much way extra capacitance can come in, except through the BAT54
<electronic_eel> But the BAT54 is not essential to the circuit, could be replaced by some extra low cap diode
<whitequark> hmm
<whitequark> i wonder what frequency can this work at? 1, 10, 100 MHz?
<electronic_eel> Just ran a signal through, scope channel 1 input, channel 2 output, math to 1-2 -> just noise
<electronic_eel> was a square signal from my 20 MHz siggen
<electronic_eel> If you zoom in a lot you begin to see the extra 30odd ohms + some capacitance
<electronic_eel> would need to do a proper sweep with a network analyzer
<electronic_eel> don't have one at hand right now, but can get access next week or so
<whitequark> ack
<whitequark> sounds great
<electronic_eel> The 5V limit on the Glasgow was a point always bugging me
<electronic_eel> Means you have to be careful
<electronic_eel> +-30V is waaaay more relaxed
<electronic_eel> and this is just a thermal limit, the BSS139 is specced to 200V, so even 48V would work for a few secs
<electronic_eel> unfortunately mains voltage is a completely different beast though
<electronic_eel> but a galvanic isolation addon would be possible, against ground loops and the like
<electronic_eel> unfortunately you'd need direction lines for that
<electronic_eel> so either half the channels lost or you need external access to the dir lines of the shifters
<whitequark> yep
<whitequark> actually i did talk to someone on twitter about galvanic isolation
<whitequark> but it was to float the entire glasgow
<electronic_eel> I think there is one obscure chip that can do isolation at usb 480 speed
<electronic_eel> the common ones are just limited to usb 12
<whitequark> yeah, which obscure chip?
<electronic_eel> the manufacturer doesn't publish a datasheed and you can't order it at a distributor, IIRC
<electronic_eel> let me see if I can find it
<whitequark> oh
<tnt> silana ?
<whitequark> electronic_eel: https://pro.intona.eu/en/products/buy/7054/
<electronic_eel> yes, I think Silanna is the manufacturer
<electronic_eel> thanks
<electronic_eel> I can't find any info on this ic on their website
<electronic_eel> like when I first found info on this last year or so
<electronic_eel> so I'm not so sure if floating the entire Glasgow is a reasonable approach
<electronic_eel> you can get 100MHz isolators for less than a dollar per line
<electronic_eel> and ti has proper ones who are rated for >5000V and reinforced isolation
<electronic_eel> so you can use them for permanent connections to mains voltage levels
<whitequark> a few options
<tnt> Use a laptop not connected to mains and float your entire test setup :p
<tnt> (a platic one preferrably :p)
<whitequark> nooooooo
<tnt> I was obviously jk.
<electronic_eel> thats right next to cutting the earth line of your scope...
<electronic_eel> I compared the concept of the Glasgow to the GreatFET
<electronic_eel> They have a base board with just the microcontroller and about 80 "dumb" io lines
<electronic_eel> you are expected not to directly connect to them, but put one of different addons on it
<electronic_eel> Such a isolation addon would fit right in there and still have enough io after the dir lines
<electronic_eel> The Glasgow has a basic usable set of functions built in
<electronic_eel> but it is harder to add stuff like the isolation, analog mux board and so on onto it
<electronic_eel> Not sure which one is the better concept io/addon wise
<electronic_eel> Using an fpga + fx2 is the better solution than a fast micro I think though
<whitequark> yep, different goals
<electronic_eel> hmm, don't know if the end goals differ that much
<electronic_eel> it is just the way of reaching them
<electronic_eel> and how you value ready-out-of-the-box vs. expandability
<whitequark> yes
<whitequark> ready-out-of-the-box is a goal for glasgow
<whitequark> well
<electronic_eel> but if you sell the fx2&fpga-baseboard as a standard package together with the shifter board
<whitequark> that's revE, basically
<electronic_eel> then you still have ready-out-of-the-box but add the ability of easy addon boards
<whitequark> addon boards are never easy.
<whitequark> you get combinatorial explosion of complexity
<electronic_eel> ;)
<whitequark> very few people seem to value managing long-term complexity in a project.
<whitequark> it's always "oh we can just extend this".
<whitequark> i'm not happy
<whitequark> a large part of why i'm not happy is that most of my glasgow work involves looking at consequences of things that were "just extended"
<whitequark> it really drives in the importance of careful evolution
<sorear> managing long-term complexity always strikes me as closely related to "clearly understanding the eventual scope of a project, and being willing to say 'X is out of scope' "
<electronic_eel> yes, a good long term management is what a lot of projects fail at
<electronic_eel> especially commercial ones
carl0s has joined #glasgow
<electronic_eel> they just want to sell new stuff to the existing customers
<whitequark> glasgow has the *possibility* of managing addons like this
<whitequark> but that possibility has to be carefully explored
<whitequark> we don't even have the base case covered yet.
<electronic_eel> but going out and expanding the user base soonish is a good idea IMO
<whitequark> i'd actually rather have a version with individual isolated outputs than addon boards
<whitequark> inputs/outputs
<whitequark> sure, you want addon boards. you're also not the one stuck as the maintainer of the project.
<whitequark> so you don't really have insight into the amount of work required to make this happen that will have to be expended forever
<whitequark> if something i feel like the goals might be too ambitious as they are
<whitequark> look. if that sounds as a downer, consider this
<whitequark> you have 8 repositories on github. i have almost 200. a lot of these need regular attention. a lot of these i've been giving attention for the better part of ten years
<whitequark> this is not to say that you're underqualified or anything. this is to say that open source maintainers all eventually end up getting stuck between a rock and a hard place
<whitequark> honestly, i advise not being in my position if at all possible
<electronic_eel> don't get me wrong, I'm all for very careful evaulation of any addon concepts
<whitequark> i think the kind of addon board i would be most open to, is the addon board that could be reused with revE
<electronic_eel> and I don't want all possible addons now
<whitequark> that'd use samtec connectors and have dir/io lines on them
<whitequark> since, well, the plan is to go to one of those eventually anyway
<electronic_eel> and an isolation addon board is either very limiting (half ios) or intrusive
<electronic_eel> so I think it is not a good candidate to start with
<electronic_eel> but the +-30v io protection is a different thing
<whitequark> i think the ±30V IO protection board is super exciting.
<electronic_eel> this could be done on a per-port basis and wouldn't need software interaction
<whitequark> i am completely and entirely in favor of prototyping, qualifying and (if it works well) producing them as soon as possible.
<sorear> how loosely coupled can an addon board be?
<whitequark> i would use the hell out of it.
<whitequark> sorear: i have addons like a passive cable that's a floppy adapter
<whitequark> or a resistor pack used for connecting to gameboy
<electronic_eel> I got the depletion fets in the mail yesterday and tried them today, so happy that it worked right from the start
<whitequark> electronic_eel: i admit, i don't entirely understand how it works
<whitequark> as you may have realized, i am much better at software/gateware than analog design
<whitequark> i think i see the general idea
<electronic_eel> will need to think more about the exact connections
<electronic_eel> may need to make sense to connect to the 5v rail
<electronic_eel> may make sense..
<sorear> unfortunately FETs are 4-terminal devices and it is very difficult for me to visualize an I/V curve in 4D space
<electronic_eel> the trick are that these are not normal fets, but special depletion fets
<electronic_eel> they are on by default and if the vgs voltage goes down, the current is cut off
<electronic_eel> so they work essentially like constant current devices
<whitequark> and you use a resistor to set the current, right
<electronic_eel> you could leave the resistor in the middle out
<electronic_eel> but then the current would be higher
<whitequark> and only rely on FET resistance?
<electronic_eel> means higher loss at higher voltages -> temp gets too high
<sorear> is it not possible to do pinch-off with an enhancement mode?
<electronic_eel> sorear: yes, but you need some active logic to do that
<electronic_eel> and that gets complicated quickly if you also consider the negative voltage case
<whitequark> it's a really clever trick, i think
<electronic_eel> you'd have a bunch of comparators, voltage level shifters and so on for each pin
<electronic_eel> these depletion fets are a bit of a rarity
<electronic_eel> I stumbled over them a while ago when searching for something else
<electronic_eel> microchip also makes some
<electronic_eel> but they are higher resistance (like 1k or so)
<electronic_eel> the point I'm currently not sure about yet is how to burn the excess voltage
<electronic_eel> in the demo I used the TL431 for it
<electronic_eel> and set it to 6.something volts
<electronic_eel> so the current goes through the fets, gets limited there, but there are still 50ma going through
<electronic_eel> they will go through the diode and into the power rail
<whitequark> you might not need D1?
<electronic_eel> the power rail will then rise and needs to be limited
<electronic_eel> D1 is for redirecting the current from the logic gate into the power rail
<electronic_eel> or for the negative case to provide a path to ground
<whitequark> yeah, there is a protection diode to ground
<whitequark> actually two
<electronic_eel> you mean in the logic gate too?
<electronic_eel> these are usually very sensitive and you probably don't want to push 50ma through them
<whitequark> 50 mA is a bit too much
<electronic_eel> What I'm not sure about is how the shifters will react
<whitequark> anyway, yeah, a protection addon really should feature its own protection diodes
<electronic_eel> lets say they are outputting something to the pin, vio is at 3.3
<electronic_eel> I gues the current will flow in reverse through the shifter into the 3v3 rail
<electronic_eel> if you now have 8 ports with 50ma each, the current has to go somewhere
<whitequark> no
<whitequark> the shifter does not have a protection diode to vcc
<whitequark> or vio in this case
<electronic_eel> yes, it doesn't.
<electronic_eel> but it has a pfet that is enabled
<electronic_eel> it should be open in both directions
<whitequark> hmmm
<electronic_eel> the protection diode is just a thing for input mode
<whitequark> yes
<whitequark> you're right
<electronic_eel> so there must be something that burns this current and makes sure it doesn't rise a bit above of what is set as vio
<whitequark> yep
<whitequark> tl431 works...
<electronic_eel> the tl431 needs it's voltage to be set
<whitequark> worse yet
<whitequark> it wouldn't work at 1V8 Vio
<electronic_eel> exactly
<whitequark> AP432?
<whitequark> uhh that's NRND
<electronic_eel> isn't that just a 431 in different pinout?
<whitequark> it's 1.24V
<electronic_eel> like the tlv431, but in 432 pinout
<electronic_eel> won't help
<electronic_eel> I think I need a different voltage source and get the set-voltage from vio
<whitequark> why wouldn't it help?
<electronic_eel> vio is changing to whatever you set it to
<whitequark> sure
<whitequark> needs to get set-voltage from vio, indeed
<electronic_eel> you need it as a reference
<whitequark> oh i see what you mean
<electronic_eel> you can't feed the excess current into it
<electronic_eel> then you'll lose your reference point
<whitequark> yeah you need both inputs of the internal comparator
<whitequark> not just one
<electronic_eel> but I think I could use a stepup regulator to create a voltage a bit above 5v
<electronic_eel> and then use some opamp circuit to set the reference to something a bit above vio
<electronic_eel> will need to think about this and test it out
<whitequark> mhm
<electronic_eel> whitequark: do you think +-30v is enough?
<electronic_eel> I also ordered some depletion fets in sot-223
<electronic_eel> as it is mostly a thermal limit they could probably go much higher
<electronic_eel> but take much more board space of course
<whitequark> electronic_eel: that's a lot
<whitequark> the range that is
<electronic_eel> the stuff I think to use glasgow on has 24v max
<electronic_eel> (except mains of course)
<whitequark> yup
<whitequark> 48V is well
<whitequark> gruetzkopf might be interested :D
<whitequark> especially -48V
<electronic_eel> yeah, telco stuff
<electronic_eel> 48v will most probably burn the bss139 in a few sec
<gruetzkopf> Well, 60V nominal (72V peak) is more interesting
<gruetzkopf> German Telco and rail stuff is 60V
<electronic_eel> ah, the old phone idle voltage
<electronic_eel> will all be gone like next year or so
<electronic_eel> or do you have old telco stuf at home?
<electronic_eel> like your own isdn Vermittlungsstelle?
<electronic_eel> I think I'll do the network analyzer test and think about vio-sense logic first
<electronic_eel> then I can test the voltage limits of both fet types
<electronic_eel> I mean the thermal ones
<electronic_eel> and then decide if the extra space for the sot-223 is worth it
<gruetzkopf> Yes to isdn
<gruetzkopf> Also yes to step-by-step
<electronic_eel> isdn just on the phone line?
<sorear> do you have to budget extra voltage for inductive kicks created by the interlocking relays
<electronic_eel> then it would be current limited
<electronic_eel> or power rails for isdn phone exchanges?
<electronic_eel> sorear: the limit on the fets is thermal, the fet is rated for 200v.
<electronic_eel> so inductive kicks could be burnt by extra tvs diodes
<whitequark> electronic_eel: if it's several secnds
<whitequark> you could just add a polyfuse there
<whitequark> better yet if you stick it in the middle it'll give you positive feedback
<daveshah> There'll be positive feedback two ways if it picks up heat from the FETs too
<electronic_eel> are there polyfuses that begin to heat at about 50ma?
<electronic_eel> the lowest ones I have here are about 200ma rated
<daveshah> Pretty sure I've seen "data" polyfuse in the past
<electronic_eel> they break at about 350
<bgamari> whitequark, I could only find support for iCE40's differential outputs in migen
<bgamari> AFAICT there's not input support
<bgamari> I started fixing this but then ran out of time
<whitequark> bgamari: someone just posted a PR for fixing that
<whitequark> check out that one
<whitequark> it might need nextpnr chanes
<bgamari> wow
<bgamari> wow
<bgamari> whoops
<bgamari> great timing
<electronic_eel> I found some low value polyfuses, but they have very high off-resistance (about 400 ohms)
<electronic_eel> that would be too high for general usage
<gruetzkopf> nono, multiple installs
<electronic_eel> gruetzkopf: you are talking about the phone lines - then I'm sorry but I don't understand
<gruetzkopf> We have one isdn exchange and then a bunch of older fully analog stuff
<electronic_eel> ah, ok, so you'd not just work with the phone lines going out, but with the exchange circuits too
<electronic_eel> so then protection for 60v would indeed make sense
<electronic_eel> I just found another nice component to add: SMTPA62
<electronic_eel> telco protection thyristor, trips at about 80 volts
<electronic_eel> put a polyfuse before it and you are protected as high as the polyfuse goes
<electronic_eel> the depetion fet logic would have to work up to the 80 v. so that would probably need the sot-223 ones
thaytan has quit [Ping timeout: 245 seconds]
thaytan has joined #glasgow
futarisIRCcloud has joined #glasgow
carl0s has quit [Ping timeout: 256 seconds]