azonenberg changed the topic of #scopehal to: libscopehal, libscopeprotocols, and glscopeclient development and testing | https://github.com/azonenberg/scopehal-cmake, https://github.com/azonenberg/scopehal-apps, https://github.com/azonenberg/scopehal | Logs: https://freenode.irclog.whitequark.org/scopehal
Degi has quit [Ping timeout: 256 seconds]
Degi has joined #scopehal
<azonenberg> Wellp
<azonenberg> i found some example code to run the LCD
<azonenberg> because the datasheet was useless
<azonenberg> turns out there is a bazillion undocumented registers you have to write to make it start up right
<azonenberg> why is it so hard to make something that just turns on and is ready to accept commands?
juli969 has quit [Quit: Nettalk6 - www.ntalk.de]
<azonenberg> rather than needing me to poke magic values into registers for temperature compensation, bias voltages, etc
<azonenberg> the chip has fuses on it, they're even mentioned in the datasheet
<azonenberg> all of this could have been fused in with the config needed to run the panel the controller is attached to
<_whitenotifier-b> [stm32-cpp] azonenberg pushed 1 commit to master [+0/-0/±3] https://git.io/JJkx7
<_whitenotifier-b> [stm32-cpp] azonenberg 94ac980 - Various fixes to SPI and timers
<_whitenotifier-b> [starshipraider] azonenberg pushed 1 commit to master [+4/-0/±2] https://git.io/JJkxd
<_whitenotifier-b> [starshipraider] azonenberg 8891f04 - Initial temp sensor and LCD bootup support
<azonenberg> I still have not figured out how to turn on the backlight
<azonenberg> Or if there even *is* a backlight
<azonenberg> The demo video they published shows it lit up
<azonenberg> but i havent found any commands to enable it
<azonenberg> Which makes me think it's supposed to be on all the time
<azonenberg> except i can't find any info on how that works
electronic_eel has quit [Ping timeout: 260 seconds]
electronic_eel has joined #scopehal
<monochroma> azonenberg: hmm most lcds have seperate cathode/anode connections to the backlight LEDs usually labeled K and A
<azonenberg> monochroma: yeah
<azonenberg> and thats what the one i use on MAXWELL does
<azonenberg> you tell me
<monochroma> i'm guessing that one does not have a backlight
<monochroma> ohhh
<monochroma> lain found something weird in the data sheet
<monochroma> page 5
<monochroma> there is a side view with an A and K
<monochroma> are there connections on the back of the LCD?
<azonenberg> wtf
<azonenberg> let me look
<azonenberg> wtaf
<azonenberg> there are little terminals there, i thought they were mounting attachments lol
<monochroma> pix!
<monochroma> yeah i havn't run into that before either
<azonenberg> see phone pic
<azonenberg> welp
<azonenberg> now i know how to light it up, lol
<azonenberg> i'll hook it up to a bench supply to test but i guess no backlight on hw rev 0.1
<monochroma> just solder some bodge wires :P
<monochroma> but yeah, that's not super clear in the datasheet lol
<monochroma> azonenberg: looks like there is a slightly different version of the lcd that has the LEDs connectorized
<azonenberg> ah ok yeah that amkes more sense
<azonenberg> i'll probably switch to that for the next revision
<azonenberg> anyway it works fine powered from a bench supply for the moment
<azonenberg> So i'll just do that for today
<azonenberg> i wasted waaay too much time trying to figure htat out lol
<monochroma> yeah that's goofy
<azonenberg> not seeing any other connector, and with the backlight documented
<azonenberg> i assumed it ran off vdd using an internal charge pump or something
<azonenberg> and was like "oh that's nice"
<azonenberg> then couldnt figure out how to turn it on
<azonenberg> Lol
<azonenberg> as if that isnt bad enough
<azonenberg> the interface for writing to memory on this thing is absolutely stupid
<azonenberg> There are a total of 38400 pixels (240x160)
<azonenberg> naively, you would expect one of two possible structures
<azonenberg> 1) 38400 bytes, with only one bit per byte valid
<azonenberg> 2) 4800 bytes, with one bit per pixel (8 pixels per byte)
<azonenberg> right?
* monochroma has written greyscale graphic LCD driver code before, those generic LCD driver ICs are nightmares
<azonenberg> What you probably would NOT expect is an absolutely absurd packing in which 2 bytes store 3 pixels of data at bit positions 0x8000, 0400, and 0010
<azonenberg> as far as i can tell this is an RGB565 controller being hacked into monochrome
<azonenberg> i think it supports shading not just on/off but have yet to figure out how that works
<monochroma> yeah, some of them have modes you can set to make them behave a little better for mono
<azonenberg> ok yeah it supports 5 bits of brightness intensity for grayscale mode if i set bit DC[3]
<azonenberg> now i have to figure out how that works...
<monochroma> the annoying part (for me anyways) was figuring out the fricken mapping that they used
<monochroma> the LCDs i wrote drivers for did /NOT/ give enough info to tell you how to configure the controller since it's generic and has some pin mapping configurations to do
<monochroma> (what "common" lines were used, what is the upper left corner, how are the quadrants arranged, etc -_-)
<azonenberg> yeah i'm figruing out that myself
<monochroma> iirc what i wound up doing was finding out that there was a page of the PDF datasheet that showed the actual ASIC's pads with name labels
<monochroma> and i zoomed in a ton to figure out what ones were bonded out
<azonenberg> lool
<monochroma> iirc they had some PIC example code, but it was written in ASM so... nothx >_>
<azonenberg> these guys had c for an unknown platform but the funciton call sequence wass enough for me to figure out the init sequence
<monochroma> do you have the ASIC's datasheet?
<azonenberg> yes
<monochroma> yay
<azonenberg> looovely
<azonenberg> the aspect ratio is derpy too
<azonenberg> Sooo the display is 240x160
<azonenberg> or wait, i'm even more confused now
<azonenberg> ok so yeah it looks like the block is 3 pixels in the X direction within a single scanline
<azonenberg> that's... tolerable i guess
<azonenberg> but when doing a block update you have to write pixels in the x-then-y ordering
<azonenberg> So i think at this point i understand enough to write to it
<azonenberg> the challenge now will be doing a halfway decent display on this thing, keeping in mind that a) I need to draw the text rotated because I want the text displayed next to the associated probe
<azonenberg> and b) I don't have enough RAM for a framebuffer on the stm32 :p
<azonenberg> I have 32 KB of flash and 4 KB of RAM
<azonenberg> If i model the display as portrait orientation, 160 cols x 240 rows, using say a 5x7 pixel font with 1 pixel of margin between characters (so 6x8 pixel cells)
<azonenberg> I'd have 30 rows of 26 characters
<azonenberg> or a 780 byte text framebuffer which would comfortably fit in my available ram
<azonenberg> for now i won't support anything fancy, just block updates of the whole screen when you change a channel name or something
<azonenberg> i also could use larger text since i only really need to fit 8 lines, but i want to allow fairly long signal names
<azonenberg> i guess i'll see how a 5x7 font looks on this thing and if it's too small to read?
<azonenberg> Hmmm
<azonenberg> monochroma: do you think a 1.5mm high font on an LCD is too small?
<monochroma> i would have to see it in person :P
<azonenberg> (see mms)
<azonenberg> that's with filled in character cells and no actual font
<azonenberg> just 5x7 filled squares
<azonenberg> At this size you get 30 rows of 26 columns which i think is overkill for signal naming
<lain> mmm probably workable but might go bigger depending on distance from lcd
<azonenberg> i mean this is something you will have on the bench in front of you while sitting there
<azonenberg> not something you'd read from a distance
<azonenberg> just to see which probe goes where
<azonenberg> Say I go with 8x16? size of the standard linux console font
<azonenberg> at that size i'd get 20 chars x 15 rows
<azonenberg> And no wasted sapce
<azonenberg> space*
<lain> sounds good
<azonenberg> much more reasonable
<lain> yeah that looks great
<azonenberg> now to convert this font to something i can actually process...
<azonenberg> So i looked around a bit and was unable to find a better option, and i dont want to spend too much time on a tool i likely won't use much
<azonenberg> my current workflow is...
<azonenberg> create 8x16 pixel image in gimp
<azonenberg> create text layer, select the font i'm using, type a single character
<azonenberg> export to a raw RGBA binary file
<azonenberg> run a 20 line C program to read that binary file and output a hex uint8_t[]
<azonenberg> paste that into table in my source file
<azonenberg> repeat for each character i want in the font
<azonenberg> it took ~20 mins to do everything but lowercase letters
<azonenberg> and i have the framebuffer rendering etc working perfectly. Uses only a few hundred bytes of ram and a couple kB of flash
<azonenberg> monochroma: also i realized why i didnt buy the display with the led pigtail
<azonenberg> it's nearly double the price
<azonenberg> $21.52 vs $12.24
<azonenberg> ... oh it's bigger, 3.9" diagonal
<azonenberg> So basically i'm stuck with this revision but i need to add a power connection and either series resistor or constant current sink for it
<azonenberg> I guess at this point the list of planned ECOs for MEAD are...
<azonenberg> make the enclosure walls thicker so it's less flimsy feeling, and/or make it out of something more solid than nylon (cnc aluminum would be ideal if i can get the price good)
<azonenberg> fix the SFF connector shell footprint to have all of the mounting pins
* monochroma would just use an off the shelf plastic enclosure and mill it but *shrug*
<azonenberg> add a power connector for the LCD
<azonenberg> move the mmcx connector cutout in the enclosure higher so the connectors actually fit properlyh
<azonenberg> so far no electrical issues but i also havent tested the dac or comparator subsystems yet
<azonenberg> monochroma: i really want to go cnc'd aluminum if i can for EMC, durability, heatsinking, and just general coolness reasons
<azonenberg> but there will be at least one more nylon iteration to get the dimensions right
<monochroma> oh so even more expensive saleae logic's ? ;)
<azonenberg> if saleae made a 4 Gbps capable LA, sure :p
<monochroma> (mainly refering to the fact that they mill their cases out of aluminum billet)
<azonenberg> But yes
<azonenberg> That sort of enclosure is what i was thinking of, i really like it
<azonenberg> Not a fan of saleae's software as much
<azonenberg> or the fact that it's usb
<azonenberg> But the hardware is beautiful
* monochroma isn't a fan of rounded corners on everything in the world these days :P
<azonenberg> oh
<azonenberg> yeah i was going to be nice and box
<azonenberg> just chamfered enough you wont hurt yourself on the edges
<azonenberg> nice and boxy*
Famine_ has joined #scopehal
Famine- has quit [Ping timeout: 244 seconds]
<azonenberg> monochroma: oh and also the cutout in the lid for the LCD is too big
<azonenberg> the viewing area is a fair bit smaller than the glass so if i make the hole smaller i have more space to tape it in place
<azonenberg> oh and the enclosure should be a bit shorter, the mmcx's are recessed too much
<azonenberg> Tomorrow will probably be mechanical engineering day for me. I need to send out a respun enclosure design as well as a final prototype of the probe shell with the second cutout for the other tip socket
<_whitenotifier-b> [starshipraider] azonenberg pushed 1 commit to master [+0/-0/±3] https://git.io/JJIUE
<_whitenotifier-b> [starshipraider] azonenberg bfb9619 - Continued work on MEAD LCD controller driver
<azonenberg> woop, ok the font is done and i have text looking great. With 15 lines i can do a line of text for each input port then have a blank line between them
<azonenberg> if i want to be really fancy i can do pixel tuning of the spacing of those lines so that they're more precisely lined up with the connectors, but that's for later
<azonenberg> I think i can use 3.3V and ground test points around the MCU to power the LED for the display, i just need a 10 ohm series resistor to get close to the target current
<azonenberg> so i should be able to bodge something up quick enough for this rev
<azonenberg> the uart is working, the temp sensors are working, the display is now working, so about the only major thing left to bring up on the firmware side is the DAC for setting input Vt, followed by some glue to parse uart commands and configure it/write to the LCD
<azonenberg> Hopefully i can get that all done tomorrow and have the pod firmware basically complete
<azonenberg> then i'll start doing some testing on the fpga side to see how the pod performs with some fastish signals
<electronic_eel> nice progress
<azonenberg> the first test i'm going to do is a 1 GHz sinewave, ac coupled, with Vt=0
<azonenberg> See if i can get a 1 GHz squarewave out
<azonenberg> if it's remotely square then right there we have a minimum 2 Gbps pod
<electronic_eel> the lcd backlight pinout was already confusing in the ds...
<azonenberg> Lol there wasnt a pinout
<azonenberg> because it wasnt on the connector
<azonenberg> That answered a looot of questions
<azonenberg> now that we understand how to use it, though, it looks like a halfway decent panel
<electronic_eel> yeah
<electronic_eel> can you show a picture with some text?
<azonenberg> it's reasonably cheap, decent image quality, graphics capable although for now i'm only using it in text mode
<monochroma> they are very similar
<monochroma> iirc that same model is sold on digikey for ~$40 :P
<azonenberg> also my current font is just B&W
<azonenberg> but the display has 5 bit grayscale
<azonenberg> So we can do antialiasing if we want, although this will make the font table larger
<monochroma> but very similar deal, the pixel array doesn't actually go all the way out to the edges
<electronic_eel> maybe something for your design review checklist: if a ds is confusing about how pins on the connector work, try them out on the real part before ordering the boards
<azonenberg> probably something we'd save for a bigger micro
<azonenberg> electronic_eel: i generally order parts + pcb at the same time, and i wasn't confused
<electronic_eel> I was confused and thought the power input of the lcd was somehow paralleled with the backlight
<azonenberg> i had a firm, though incorrect, belief that the backlight was derived by a boost converter or charge pump on the flex from the single 3.3V supply
<azonenberg> just like the lcd bias voltages
<azonenberg> it had to be, in my view, because there was no other source of power to the module
<azonenberg> it had a backlight and only one power input
<azonenberg> The idea of there being additional pins not listed in the pinout section of the datasheet never crossed my mind
<azonenberg> electronic_eel: sorry for potato but https://www.antikernel.net/temp/IMG_20200705_015304.jpg
<electronic_eel> nice, thx
<electronic_eel> how are you supposed to connect the lcd backlight pins? are you supposed to solder wires on?
<azonenberg> I believe so, yes
<electronic_eel> not very manufacturing friendly, they should have added it to the flex connector
<azonenberg> yes i agree
<electronic_eel> but was probably cheaper for them to do it this way if the backlight is a separate part for them
<azonenberg> yep
<azonenberg> why not have a pigtail like they do on the 3.9" version of this same display though?
_whitelogger has joined #scopehal
<azonenberg> The left comparator block is around 50C just from the heat of the two comparators and support passives. The sensor is between the two of them but Tj of the comparators is likely a decent bit higher
<azonenberg> the right temp sensor reads just shy of 60C which makes sens because it's next to the power supply which puts out a fair bit of heat , vs the other one is next to the MCU which doesnt even get warm
<azonenberg> I have some concerns as to whether it's going to get even hotter in an airtight plastic case
<azonenberg> Hence why i was looking at a metal enclosure. If the temp sensor is reading a board temp of 60C in that area, Tj of the PSU is likely higher
<azonenberg> The LM27761 (hottest part of the PSU according to my thermal camera) is rated for max 85C ambient and 125C Tj and i don't think it's getting that hot, but i'd like more margin
<azonenberg> Submitted an RFQ for the old enclosure design to emachineshop just to get a ballpark price for a cnc'd one-off. Shapeways wants $277 for a single 3d printed aluminum (SLM) part
<azonenberg> 3dhubs online quoter says $192 for a single CNC'd part
<electronic_eel> hmm, if the switched cap dc/dc is the hottest part (and not the comparators), you could consider replacing it with something else
<azonenberg> That's as machined, black hard coat anodizing brings that up to $206 which is practically nothing
<azonenberg> But still $200 for an enclosure (just the bottom half, too) is pretty steep
<electronic_eel> like a traditional dc/dc with inductor and a separate ldo postregulator
<azonenberg> i would hope that goes way down in volume
<azonenberg> the dcdc isnt much hotter than the comparators. I wanted better heatsinking of the whole board
<azonenberg> i knew these comparators ran hot from past experience
<electronic_eel> according to your measurements above, the dc/dc is heating the parts +10°C, that is a lot
<azonenberg> not just the dcdc
<azonenberg> the entire power supply
<azonenberg> There's three buck converters, the charge pump, and an LDO
<azonenberg> the charge pump is the hottest according to the FLIR, but by a small margin
<electronic_eel> ah, ok. so to reduce that would mean a big redesign of the whole psu
<electronic_eel> not just replacing the one charged cap dc/dc
<azonenberg> Yeah. The overall design is two pairs of comparators on either side of the center LCD+SFF spine
<azonenberg> then north of one side is the mcu and north of the other is the psu
<azonenberg> So it makes sense the psu side is hotter
<azonenberg> 10C temp rise for a PSU isnt bad at all
<azonenberg> it's just that thrown on top of the comparators it's pretty toasty
<electronic_eel> ok, so easy fix: write "must be used submerged in liquid nitrogen" into the manual, on the last page in a small light grey on white font
<azonenberg> lolol
<azonenberg> i always wanted to do the aluminum enclosure for EMI reasons anyway
<azonenberg> I just need to figure out how cheap i can do them in volume
<azonenberg> 3dhubs can do the current enclosure for $192.01 @ qty 1, but this drops to $51.59 @ qty 10, $25.52 @ qty 50, and $15.92 @ qty 200
<azonenberg> So as with PCBs, most of the cost in low volume is NRE
<electronic_eel> this is quite good, would have thought it won't go down that much
<azonenberg> most of the work is presumably in toolpath design
<azonenberg> So i think that this is going to be the way to go
<azonenberg> I'll also use self tapping screws, like i do in the plastic enclosure, to avoid paying for threading
<azonenberg> I still plan to do one more 3d printed nylon enclosure iteration ($25ish) before even thinking about doing an aluminum one
<electronic_eel> full milling it out of a al chunk means removing quite a lot of material. this is why a lot of al designs use extrusion and add milled front and end panels
<azonenberg> yeah i wanted to do a unibody for this because i wanted to have full shield cans in the final iteration
<azonenberg> but i may want to do some pcb tweaks for that too
<azonenberg> in particular the current design is one bottom cup-shaped piece and then a top solid plate to go on top
<azonenberg> if i want to do proper shielding I'd really want to move to top and bottom halves
<azonenberg> but then i'd need to figure out how to get the display in there
<azonenberg> The other option is to not worry about shielding and just have the metal enclosure for strength and heatsinking
<azonenberg> Which is the direction i'm leaning now
<azonenberg> i could do that with just a metal conversion of my current plastic enclosure
_whitelogger has joined #scopehal
m4ssi has joined #scopehal
juli969 has joined #scopehal
massi_ has joined #scopehal
m4ssi has quit [Ping timeout: 265 seconds]
massi_ has quit [Remote host closed the connection]
_whitelogger has joined #scopehal
bvernoux has joined #scopehal
_whitelogger has joined #scopehal
Famine- has joined #scopehal
Famine_ has quit [Ping timeout: 244 seconds]
Bird|ghosted has joined #scopehal
Bird|otherbox has quit [Read error: Connection reset by peer]
asy has quit [*.net *.split]
monochroma has quit [*.net *.split]
asy has joined #scopehal
monochroma has joined #scopehal
alexhw has quit [*.net *.split]
alexhw has joined #scopehal
smkz has quit [*.net *.split]
azonenberg has quit [*.net *.split]
hlzr has quit [*.net *.split]
sorear has quit [*.net *.split]
funkylab has quit [*.net *.split]
apo has quit [*.net *.split]
elms has quit [*.net *.split]
tnt has quit [*.net *.split]
smkz has joined #scopehal
sorear has joined #scopehal
azonenberg has joined #scopehal
hlzr has joined #scopehal
funkylab has joined #scopehal
apo has joined #scopehal
elms has joined #scopehal
tnt has joined #scopehal
bluezinc has quit [*.net *.split]
awygle has quit [*.net *.split]
awygle has joined #scopehal
bluezinc has joined #scopehal
anuejn has quit [*.net *.split]
agg has quit [*.net *.split]
noopwafel has quit [*.net *.split]
anuejn has joined #scopehal
agg has joined #scopehal
noopwafel has joined #scopehal
sorear has quit [Ping timeout: 260 seconds]
lain has quit [*.net *.split]
yourfate has quit [*.net *.split]
Implant has quit [*.net *.split]
kbeckmann has quit [*.net *.split]
Implant has joined #scopehal
kbeckmann has joined #scopehal
lain has joined #scopehal
yourfate has joined #scopehal
juli969 has quit [*.net *.split]
Kliment has quit [*.net *.split]
wbraun has quit [*.net *.split]
promach3 has quit [*.net *.split]
juli969 has joined #scopehal
Kliment has joined #scopehal
promach3 has joined #scopehal
wbraun has joined #scopehal
promach3 has quit [Max SendQ exceeded]
monochroma has quit [*.net *.split]
miek has quit [*.net *.split]
sorear has joined #scopehal
monochroma has joined #scopehal
miek has joined #scopehal
electronic_eel has quit [*.net *.split]
balrog has quit [*.net *.split]
laintwo has quit [*.net *.split]
sorear has quit [*.net *.split]
futarisIRCcloud has quit [*.net *.split]
lukego has quit [*.net *.split]
Stary has quit [*.net *.split]
laintwo has joined #scopehal
balrog has joined #scopehal
electronic_eel has joined #scopehal
futarisIRCcloud has joined #scopehal
sorear has joined #scopehal
lukego has joined #scopehal
Stary has joined #scopehal
balrog has quit [Excess Flood]
balrog has joined #scopehal
Ekho has quit [*.net *.split]
LeoBodnar has quit [*.net *.split]
gruetzkopf has quit [*.net *.split]
kc8apf has quit [*.net *.split]
Ekho has joined #scopehal
LeoBodnar has joined #scopehal
Ekho has quit [Max SendQ exceeded]
gruetzkopf has joined #scopehal
kc8apf has joined #scopehal
futarisIRCcloud has quit [Ping timeout: 244 seconds]
lukego has quit [Ping timeout: 244 seconds]
Ekho- has joined #scopehal
Error_404 has quit [*.net *.split]
deltab has quit [*.net *.split]
Pretzel4Ever has quit [*.net *.split]
vup has quit [*.net *.split]
Error_404 has joined #scopehal
Pretzel4Ever has joined #scopehal
deltab has joined #scopehal
vup has joined #scopehal
vup has quit [Max SendQ exceeded]
vup has joined #scopehal
lukego has joined #scopehal
promach3 has joined #scopehal
juli969 has quit [*.net *.split]
Kliment has quit [*.net *.split]
juli969 has joined #scopehal
Kliment has joined #scopehal
futarisIRCcloud has joined #scopehal
maartenBE has quit [Ping timeout: 256 seconds]
maartenBE has joined #scopehal
maartenBE has quit [Ping timeout: 272 seconds]
maartenBE has joined #scopehal
Ekho- is now known as Ekho
bvernoux has quit [Quit: Leaving]
<azonenberg> Decided to get back to MAXWELL for a bit before doing enclosure stuff
<azonenberg> Routing the STM32 now, down to 1945 unrouted nets