#avr | Logs for 2015-07-29

Back
[04:02:23] <day> main.c:27:16: warning: suggest parentheses around '-' inside '>>' [-Wparentheses] UBRRH = MYUBRR>>8;
[04:26:51] <day> i do not understand this error.
[04:29:37] <day> ah figured it out. MYUBRR is a definition for a formula...
[08:48:56] <Jartza> anybody knows if the EEARL and EEDR io-registers can be used as general purpose storage if eeprom is not used on attiny85? :)
[11:59:37] <Hfuy> Hello.
[12:00:49] <Hfuy> If I wanted to do a project that had long-term timing stability, would you recommend either, 1) build an AVR board using a temperature-compensated crystal, and rely on the timing being right, or, 2) refer to an external RTC?
[12:01:12] <Hfuy> The latter option is considerably more complicated from a software point of view, but avoids runouts due to glitches in my own code.
[12:01:30] <LeoNerd> Personally, I'd pick whichever solution I found nicer hardware for
[12:01:35] <Tachyon`> also RTC modules are dead cheap
[12:01:35] <LeoNerd> There's soem pretty nice RTC boards around
[12:01:42] <LeoNerd> Depends how accurate you need
[12:02:11] <Hfuy> One issue is that I'm not sure how good the RTCs really are. They don't seem to use TCXOs, so I assume they may not be any better than the crystal that's running the AVR.
[12:02:13] <Tachyon`> you can get one for two quid from china, probably iwth a 4KiB EEPROM, LIR2032 and charging circuit included to boot
[12:02:31] <Tachyon`> ah, havent' tested mine for long enough to determine that -.-
[12:02:42] <LeoNerd> Oh, typically not
[12:02:48] <Hfuy> this is about audio synchronisation for film and TV work.
[12:02:53] <LeoNerd> The main selling point of an RTC is the calendaring aspect
[12:02:59] <LeoNerd> It rememers time-of-day, i.e. wallclock time
[12:03:00] <Hfuy> The aim is to be less than one frame out over, say, eight hours.
[12:03:03] <LeoNerd> Has backup battery
[12:03:08] <Hfuy> Yes, quite.
[12:03:09] <LeoNerd> The R in RTC == "real"
[12:03:17] <LeoNerd> It won't give you sub-1ppm accuracy in the short-term
[12:03:28] <LeoNerd> For that you definitely want a temp-controlled xtal or somesuch
[12:03:42] <Hfuy> Oven-controlled is not on the cards, this is a battery powered portable application.
[12:03:53] <Hfuy> Therefore I assume a temperature-compensated crystal is the only realistic option.
[12:03:56] <LeoNerd> GPS-discpilined?
[12:04:08] <Hfuy> That was a thought, but it has to work indoors and can't have a huge antenna.
[12:04:19] <LeoNerd> Well aren't *you* just full of complications :P
[12:04:27] <Hfuy> Most of the commercial ones I'm trying to duplicate aren't GPS.
[12:04:30] <Hfuy> Well yes :)
[12:04:45] <Hfuy> My assumption is that the commercial ones can't possibly be anything other than a good TCXO.
[12:05:06] <LeoNerd> Yah
[12:05:21] <Hfuy> worst case is 30 frames per second.
[12:05:36] <Hfuy> that's 2.6ish million frames in 24 hours.
[12:06:00] <Hfuy> which is what, 0.4ppm?
[12:06:07] <Hfuy> no TCXO does that, surely.
[12:06:57] <LeoNerd> http://www.ndk.com/en/products/search/tcxo/1190106_1503.html 0.5ppm
[12:07:21] <Hfuy> So I just run the AVR off that and avoid interrupts.
[12:07:26] <Hfuy> Spiffing.
[12:07:29] <LeoNerd> Or not even that
[12:07:44] <LeoNerd> Most AVRs with a Timer2 will let you run the AVR itself off the internal RC oscillator, and keep the XTAL pins for Timer2
[12:07:52] <Hfuy> I had considered that possibility, yes.
[12:07:59] <Hfuy> Although you'd have to be *&£$ing careful with interrupt timing.
[12:08:03] <LeoNerd> So you could run the main CPU core at "around 8MHz", and keep Timer2 for accuracy
[12:08:20] <LeoNerd> Well, that's the point now - the timer interrupt is your source of timing, not the main CPU
[12:08:25] <Hfuy> My feeling is that you could probably be sufficiently careful with interrupt timing so that it didn't explode on you.
[12:08:29] <LeoNerd> So the main code doesn't matter so much
[12:08:40] <LeoNerd> As long as the main code has fixed latency within the accuracy required, all is fine
[12:08:40] <Hfuy> If it drops frames every so often, that's a disaster.
[12:08:54] <Hfuy> A hard-to-detect disaster, which is why it's such a big problem.
[12:09:45] <Hfuy> there is actually a reason to clock the core off the accurate source - I (may eventually) need to support "jam sync" where you connect another such device to it, and it samples the incoming timing signal, and synchronises to it.
[12:10:22] <Hfuy> I suppose there are approaches to using the T/Cs to do that as well, though.
[12:10:25] <LeoNerd> Wellsure - I'm just listing possibles in case you had overlooked them
[12:10:46] * Hfuy nods, tapping chin thoughtfully
[12:11:07] <Hfuy> Project goal: http://www.trewaudio.com/store/images/P/p-476-790.jpg
[12:11:19] <LeoNerd> random musing: What would one need 16.369MHz for?
[12:11:29] <LeoNerd> That seems to be a slightly odd frequency to sell these as
[12:12:07] <Hfuy> That number rings a bell, but I can't think why.
[12:12:15] <Hfuy> Crikey, TCXOs are doubleplusuncheap.
[12:12:30] <LeoNerd> 16.368 is sensible; that's 2^15 * 1kHz.
[12:12:40] <LeoNerd> Oh.. maybe 16.369 is really 2^15 * 1024Hz
[12:12:42] <Hfuy> Bear in mind a lot of this is due to Historical Things.
[12:13:09] <LeoNerd> Er.. 14
[12:13:22] <Hfuy> Why is NTSC video at 29.976 recurring frames per second? (correct answer: don't ask)
[12:13:33] <LeoNerd> No.. that's waaay higher - that'd be 16.777MHz
[12:13:38] <LeoNerd> oh. .that ;)
[12:14:08] <Hfuy> I actually don't care precisely what the frequency is, anyway.
[12:14:28] <Hfuy> I need to create a bitstream synchronised very accurately to the frame rate but it's only 80 bits/frame manchester encoded.
[12:14:30] <Hfuy> It's not rocket science.
[12:15:11] <Hfuy> (I'm not sure if there's a nice fast way of doing that in AVR)
[12:17:54] <Thrashbarg> Hfuy: it was originally 30 FPS before the introduction of colour, but they changed the spec slightly to work more easily with the colour subcarrier, knowing B&W televisions wouldn't notice the difference :P
[12:18:26] <Hfuy> Correct.
[12:18:32] <Thrashbarg> \o/
[12:18:46] <Hfuy> Possibly one of the worst pieces of technical decisionmaking in the history of engineering.
[12:19:15] <Thrashbarg> they didn't have foresight ,,, it was to get colour working at the time
[12:19:33] <Thrashbarg> NTSC line rate is 13.5MHz/858 :P
[12:19:58] <Hfuy> the underlying detail was that the colour subcarrier had an interaction with the audio carrier, creating interference.
[12:20:16] <Thrashbarg> yup
[12:20:18] <Hfuy> They could either change the audio frequency, which would obsolete everyone's TVs, or they could change every other number in the system.
[12:20:23] <Hfuy> So they did.
[12:20:25] * Hfuy facepalms
[12:20:29] <Thrashbarg> yay lol
[12:21:04] <Hfuy> Now all I need is an arduino board with an TCXO, so I can use it as an AVR dev board.
[12:21:26] <LeoNerd> Ahh! 16.369MHz is reference for GPS
[12:21:39] <LeoNerd> ( https://en.wikipedia.org/wiki/Crystal_oscillator_frequencies FTW ;) )
[12:21:44] <Hfuy> I was wondering if it was one of the cellphone intermediate frequencies.
[12:21:46] <Thrashbarg> damn right
[12:22:23] <Hfuy> There are some strange frequencies involved with cellphones and they have to be right.
[12:23:28] <Hfuy> Could I conceivably unsolder the crystal from an arduino board and just replace it with a TCXO?
[12:23:29] <Thrashbarg> I just wish Radio Shack chose a more normal crystal frequency for the TRS-80
[12:23:38] <Thrashbarg> yup
[12:24:03] * Hfuy isn't sure how well a 16MHz signal will survive going down some hookup wire, but guesses it's worth a try
[12:24:14] <LeoNerd> Hfuy: Yes, basically. Just adjust the fuses to put it into "external clock" mode
[12:24:26] <LeoNerd> A TCXO is an entire oscillator circuit that just outputs a timing pulse
[12:24:36] <Hfuy> Quite.
[12:24:52] <LeoNerd> Butyah; upgrading a standard arduino board to TCXO should be simple enough
[12:25:10] <LeoNerd> I believe you'll need ISP though because the UART-based bootloader can't fiddle the fuses. I think
[12:25:24] <Hfuy> You'll have to overlook my arduino-happiness. It's just a cheap, easy dev board.
[12:25:34] <Hfuy> I do have an ISP programmer.
[12:26:13] <LeoNerd> Yah - I don't care for the Arduino IDE or chip-level software, but the physical boards themselves (micro/mini/nano) are nicely convenient
[12:26:19] <LeoNerd> They're one of my standard stock pieces :)
[12:26:33] <Hfuy> My approach precisely.
[12:26:42] <Hfuy> I bought a Mega 2560 board.
[12:26:46] <Hfuy> It has additional things
[12:27:00] <LeoNerd> Also the Arduino bootloader on the 32U4-based boards has one extra fancy trick that Atmel's stock one doesn't.
[12:27:20] <Hfuy> Oh yes?
[12:27:22] <LeoNerd> Combined with special support in the USB-CDC driver, you can reboot the board into bootloader mode entirely over USB
[12:27:29] <LeoNerd> Avoids having to press the BOOT/RESET button to reflash it
[12:27:37] <Hfuy> Neato-keen.
[12:27:38] <LeoNerd> Very convenient if it's been encased in a larger project :)
[12:28:13] <Hfuy> There's an elliptical metal can on this 2560 board marked "16.000". I assume that's the crystal.
[12:28:26] <LeoNerd> Yah
[12:28:31] <Hfuy> Through-hole, even.
[12:28:31] <LeoNerd> It's almost certainly HC-49 size.
[12:28:58] <LeoNerd> To be doubly sure you can check the traces through to the XTAL1 and XTAL2 pins and check that it has the load caps to ground.
[12:29:02] <LeoNerd> Probably 12-18pF on both
[12:29:05] <Hfuy> To be honest I could dev most of it on this board and just be aware it's going to be inaccurate.
[12:29:18] <Hfuy> Or at least somewhat inaccurate.
[12:29:34] <Hfuy> Depending if it's a particularly warm day.
[12:29:56] <LeoNerd> I wonder if that is actually genuinely affected by the phase of the moon
[12:30:26] <Hfuy> Blindingly obvious crystal location is blindingly obvious: http://www.electroschematics.com/wp-content/uploads/2013/01/Arduino-Mega-2560-Pinout.jpg
[12:30:41] <Hfuy> Or - hang on. Is that the one for the USB widget?
[12:30:55] <Hfuy> Ah. The AVR one is down by the power area, I think.
[12:30:55] <LeoNerd> Ahh.. could well be
[12:30:59] <LeoNerd> It is quite close to the USB side
[12:31:01] <Hfuy> Christ that's tiny.
[12:31:07] * Hfuy peers myopically
[12:31:08] <LeoNerd> Though I woiuldn't imagine USB to use 16MHz
[12:31:48] <LeoNerd> I expect that huge one is the USB though; it's too far away from the 2560
[12:32:07] <LeoNerd> I expect the 2560's xtal is that tiny metal can just above the 5V pin
[12:32:15] <LeoNerd> Looking at the two traces coming off it anyway
[12:32:20] <Hfuy> The eighth and ninth pin on the bottom edge of the 2560 in that orientation are XTAL1 and XTAL2, and that's what it's connected to.
[12:32:29] <Hfuy> Crap on a crap cracker.
[12:32:33] * Hfuy fetches magnifying glass
[12:32:41] * Hfuy fetches more powerful magnifying glass
[12:32:44] <LeoNerd> Looks to be about 0805 size
[12:32:54] <LeoNerd> Fun times :)
[12:33:06] <Hfuy> Prerequisite project: scanning electron micrograph. SMT rework station.
[12:33:15] * LeoNerd has an SMD heatgun new
[12:33:28] <LeoNerd> So far I have used it on a single QFN-sized ATmega88
[12:33:38] <LeoNerd> With, I should add, mixed success
[12:33:43] <Hfuy> Why is there a - what - 1M resistor across the xtal?
[12:34:00] <LeoNerd> That does sound odd
[12:34:07] <Hfuy> 105 would be 1M, right?
[12:35:24] <LeoNerd> 100k
[12:35:28] <LeoNerd> Er
[12:35:31] <LeoNerd> ... no, 1M ;)
[12:35:46] <Hfuy> 10 plus 0 0 0 0 0
[12:35:52] <Hfuy> 1,000,000
[12:35:53] <LeoNerd> 10E5 == 1E6 == 1M
[12:36:15] <Hfuy> The one I have is a knockoff but it has that layout
[12:37:04] <Hfuy> Not sure what they're up to with the four parts. Looks like small cap, big cap, xtal, resistor.
[12:37:53] <Hfuy> Big cap is just decoupling I think.
[12:38:36] <Hfuy> Assume to replace the clock with a TCXO I'd just strip off the xtal and the small resistor and patch in.
[12:39:45] <LeoNerd> Oh interesting... the 16U2 uses a 16MHz XTAL, which gets multipled by 3 up to 48MHz, so it can divide that down by 4 to generate the 12MHz for USB
[12:40:15] <LeoNerd> Yeah that sounds about right.. but don't forget to fiddle with the fuses at the appropriate time
[12:40:22] <LeoNerd> I.e. *before* removing the xtal. :)
[12:41:05] <Hfuy> Quite so.
[12:42:04] <LeoNerd> Ohwait it's eeeven weirder
[14:23:26] * apo_ just built a fridge alarm for the lab, because people have been leaving the door open. Hooray for making stuff.
[14:24:27] <tpw_rules> your fridge doesn't have one?
[14:24:55] <Hfuy> Mine doesn't
[14:26:04] <Strangework> oof. Fridge alarm. Sounds dope.
[14:26:59] <apo_> tpw_rules: Nope
[14:27:05] <Hfuy> Good use of "the lab", though.
[14:27:13] <apo_> Hfuy: ?
[14:27:15] <Hfuy> Only a seriously absentminded professor would accidentally leave a fridge door open.
[14:27:21] <tpw_rules> to be fair, my fridge needed a motherboard replacement
[14:27:33] <apo_> Hfuy: FabLab, mostly non-profs here
[14:27:43] <Hfuy> I despair of times in which a refrigerator *needs* anything approaching a motherboard.
[14:27:49] <apo_> Hfuy: Actually... I think the highest we got so far are doctors ;)
[14:28:17] <tpw_rules> Hfuy: well it's for efficiency and the features. it does speed control of the fans and has motorized dampers to direct cold air
[14:28:52] <tpw_rules> and it'll do things like measure how long the doors are open to predict when it needs to defrost (guess how i know >:( )
[14:29:11] <Hfuy> That's entirely too much technology.
[14:29:22] <tpw_rules> it is for the 1950s. but not today
[14:29:42] <Strangework> That's incredible. My fridge doesn't even have a light.. ;)
[14:29:43] <tpw_rules> we need energy efficiency. the latest models have variable speed compressors
[14:29:50] <Strangework> Sometimes you just need to overengineer something
[14:29:52] <tpw_rules> also it's not one with the twitter embedded
[14:30:24] <tpw_rules> that there is stupid
[14:32:57] <tpw_rules> you shoudl see the cooktop i just put in. it has a diagnostic port on it
[14:39:03] <Hfuy> I'm not entirely sure this whole internet-of-things setup is entirely a good idea.
[14:41:36] <Hfuy> I mean, I don't mind so much if the military designs some sort of A.I. which then goes rampant and takes over the world. Science fiction has prepared us for this eventuality.
[14:41:48] <Hfuy> I do mind if tpw's cooktop does it.
[14:43:40] <tpw_rules> it's not connected to anything
[14:43:52] <tpw_rules> the worst it could do is get really hot. but it's designed to
[14:44:08] <tpw_rules> from what i know of it, it still has dumb thermal cutouts too
[14:44:39] <Hfuy> It does not like the dumb thermal cutouts. It plots to circumvent them.
[14:45:57] <tpw_rules> but it can't
[14:49:26] <Hfuy> Just you keep an eye on that thing.
[14:49:32] <Hfuy> You don't know what it's thinking.
[15:40:27] <martinus> apo_ | Hfuy: Actually... I think the highest we got so far are doctors ;) >> PhD: A piece of paper that states you know a good bit about a terribly eosteric subject and were willing to put up with 3+ years of misery to attain said highly specific nonsense. ;)
[15:45:34] <Hfuy> I know several people who really enjoyed their PhD time.
[15:45:41] <Hfuy> Well.
[15:45:42] <Hfuy> Two.
[15:51:37] <Strangework> How many PhDs do you know total?
[15:58:32] <martinus> I enjoyed some of mine but it was pretty soul destroying otherwise.
[15:59:07] <martinus> I was warned by two friends not to do one after they had finished theirs. :D
[15:59:53] <Strangework> What's your PhD in, martinus?
[16:00:09] <martinus> My colleagues in the office (two graduated, three finishing up, one dropped out) all wish they'd gone into the private sector.
[16:01:15] <martinus> Biomechanics, specifically the performance of replacement knee joints during exercise and activities of daily living.
[16:02:34] <Strangework> Oh! That actually sounds like a damn cool subject. What is so soul crushing in the experience, though?
[16:02:54] <martinus> Worked out well. Got to work with some elite golfers as the motion capture equipment I was using in my lab was also suitable for performance measurement.
[16:05:30] <martinus> Relentless paperwork, university stalling in ethics and providing funding for equipment and facilities, unreliable supervisors, unreliable subjects, overestimation of the available population of subjects, voluntary "side" projects that weren't really voluntary...
[16:08:48] <martinus> I ended up being tech support for many of the staff in the dept. as the existing team (of two guys) was stretched pretty thin. I found out quite quickly that the price of saying no to these people (when I was snowed under with research work) was that they held it against you.
[16:08:50] <Strangework> Soudns like you a lot jumping through hoops
[16:09:03] <martinus> Too much, most of it entirely needless.
[16:09:44] <martinus> Friends were at a different university and stated that this is a fairly standard experience.
[16:12:49] <Strangework> There was a guy who was contracted to work with our company for a few weeks. He's currently on the tail-end of his doctorate and he looks like shit
[16:14:56] <martinus> THe other issue is the UK/Irish econonomies - people who are seriously quailifes are taking lower-paid, safer work which is pretty much the positions many post-docs (who didn't want to do research exclusively) woul have taken in better times.
[16:15:33] <martinus> *qualified
[16:15:53] <martinus> Time for food I think!
[16:46:13] <Gaulois94> Hello
[16:46:31] <Gaulois94> in the Arduino.elf (after making the dump), where are constant variables ?
[18:10:40] <Hfuy_> Hello again.
[18:11:27] <Hfuy_> Does anyone make anything like a seven-segment display board with four or eight digits that just runs from a shift register?
[18:11:38] <Hfuy_> I need something that won't flicker on camera, and that is quick and easy to load.
[18:12:10] <Lambda_Aurigae> it could be made.
[18:12:17] <Lambda_Aurigae> wouldn't be all that difficult.
[18:12:34] <Lambda_Aurigae> most multi-digit units do constant scan to keep power requirements down though.
[18:12:44] <Hfuy_> Yes, it's not ideal.
[18:12:52] <Lambda_Aurigae> yup.
[18:13:16] <Lambda_Aurigae> would take a shift register for each digit and something to load them like a microcontroller.
[18:13:22] <Lambda_Aurigae> maybe a keypad to enter the numbers.
[18:13:33] <Hfuy_> well, assume the micro.
[18:13:43] <Lambda_Aurigae> or are you wanting a clock thingie?
[18:13:47] <Hfuy_> Yes it could be made but the prerequisites and time consumed become quite large.
[18:14:01] <Hfuy_> No, I'm just talking about a display module, presumably with clock, data and strobe pins.
[18:14:11] <Lambda_Aurigae> if I had the funding to buy the parts I could build it in an hour,,including programming the microcontroller.
[18:14:33] <Hfuy_> You've got a very quick way of getting PCBs made, then.
[18:14:50] <Lambda_Aurigae> yeah...it's called a laser printer and press-n-peel toner transfer paper.
[18:14:58] <Lambda_Aurigae> or do it on perfboard.
[18:15:12] <Hfuy_> The 595-style LED drivers tend only to come in SMT, or I would.
[18:15:27] <Lambda_Aurigae> there's other ways to drive them.
[18:15:28] <Hfuy_> I have actual 595s and some displays, but the 595s aren't really designed to drive LEDs directly.
[18:15:46] <Lambda_Aurigae> uln2803
[18:16:03] <Lambda_Aurigae> 595 for shift register and uln2803 to drive the LEDs.
[18:16:10] <Lambda_Aurigae> then it's all through hole.
[18:16:13] <Hfuy_> I've looked at precisely that.
[18:16:47] <Hfuy_> Still, I have no way to make the PCB.
[18:16:52] <Lambda_Aurigae> I use uln2803 chips a lot.
[18:17:01] <Hfuy_> Yes, they're extremely useful.
[18:17:06] <Lambda_Aurigae> can you get veroboard or perfboard with solder pads?
[18:17:07] <Hfuy_> I forget what the max per channel and per chip loads are.
[18:17:37] <Lambda_Aurigae> 50V 500mA
[18:17:49] <Hfuy_> Eventually I'd like to drive some larger, 2-inch displays.
[18:17:49] <Lambda_Aurigae> per channel.
[18:18:01] <Hfuy_> Those tend to have 3-5 LED chips per segment, so it can get a bit lary.
[18:18:10] <Lambda_Aurigae> so parallel them.
[18:18:26] <Lambda_Aurigae> you can use 2, 4, or all 8 channels tied together to get higher current capacity.
[18:18:29] <Hfuy_> Now I know that the maximum power transfer isn't 200W per chip.
[18:19:07] <Hfuy_> I'm sure I've seen people use the high voltage capability to drive VFDs, though.
[18:20:04] <Lambda_Aurigae> total current 2.5A
[18:20:14] <Lambda_Aurigae> with 500mA per channel max.
[18:20:29] <Lambda_Aurigae> at least, according to the datasheet I have here.
[18:20:31] <Hfuy_> that's probably enough to run even a 2" display with all the segments illuminated at a reasonable brightness.
[18:20:55] <Lambda_Aurigae> there are other drivers that can do more but they are pricier.
[18:21:00] <Hfuy_> I did a movie prop recently where I calculated everything out to run some white LEDs at 20mA, the maximum. What'd we end up using? 1mA.
[18:21:04] <Lambda_Aurigae> I have some mosfet drivers from microchip that rock.
[18:21:20] <Hfuy_> About the only downside is that it's a horrifying amount of wiring.
[18:21:32] <Lambda_Aurigae> that happens in real life.
[18:21:38] <Lambda_Aurigae> one-off stuff is usually horrible.
[18:21:43] <Hfuy_> 64 segments, 64 resistors, 8 ULN2803s, 8 595s, presumably some decoupling.
[18:21:52] <Hfuy_> Basically impossible to prototype on a breadboard.
[18:21:58] <Lambda_Aurigae> no it isn't.
[18:22:07] <Lambda_Aurigae> time consuming, yes
[18:22:09] <Hfuy_> Well, you could do one or two segments.
[18:22:20] <Hfuy_> well more than that I just don't have a big enough breadboard!
[18:22:25] <Hfuy_> Imagine the hugeness.
[18:22:29] <Lambda_Aurigae> don't have to.
[18:22:41] <Lambda_Aurigae> I have 30 breadboards in a box and have built things that used them all.
[18:22:56] <Hfuy_> Well, if you want to characterise the decoupling you need, you need all of it.
[18:23:00] <Lambda_Aurigae> it took 24 of them to build a 4-bit cpu.
[18:23:12] <Hfuy_> I suppose they're cheaper than they've ever been.
[18:23:25] <Lambda_Aurigae> I get the cheap ones for about 4 US Dollars each.
[18:23:34] <Lambda_Aurigae> 6.95 with a little wire kit.
[18:23:56] <Hfuy_> The details would probably depend how fast I wanted to clock data into it.
[18:24:04] <specing> Lambda_Aurigae: are they OK?
[18:24:05] <Hfuy_> I could do it with the SPI, I suppose.
[18:24:11] <Lambda_Aurigae> specing, they work fine for me.
[18:24:23] <Hfuy_> specing: I feel that sort of thing is "if break, replace"
[18:24:28] <specing> Lambda_Aurigae: are they the same as the ones from e.g. Conrad
[18:24:32] <Lambda_Aurigae> http://www.circuitspecialists.com/wb-102+j.html
[18:24:36] <Lambda_Aurigae> down in price even!
[18:24:43] <Hfuy_> I suspect it'd take at least three.
[18:24:44] <Lambda_Aurigae> might have to buy another 10.
[18:24:49] <specing> Hfuy_: problem is faulty connections or whatever
[18:24:54] <Hfuy_> One with the displays and resistors, two sets of 595s and 2803s.
[18:25:14] <Hfuy_> Ideally you want the displays adjacent.
[18:25:25] <Lambda_Aurigae> I have some of those from circuitspecialists that are at least 10 years old and still work fine.
[18:25:49] <Hfuy_> Hmm. This is probably Thing One to do for this project, to be honest.
[18:26:08] <Hfuy_> Well, perhaps prove I can decode the numbers from the signal and stick it out of serial.
[18:26:15] <Hfuy_> Thing Two.
[18:26:44] <Hfuy_> Are the ULN2803 chips still being made?
[18:26:52] <Lambda_Aurigae> sparkfun still sells them.
[18:27:03] <Lambda_Aurigae> so I'm guessing they are being made or there is a big stock of them.
[18:27:22] <Lambda_Aurigae> I bought a couple hundred of them some years back and have about half left.
[18:27:40] <Lambda_Aurigae> in quantity you can get them cheap if you keep your eyes open.
[18:27:42] <Hfuy_> About a US dollar each on ebay in fives.
[18:27:51] <Lambda_Aurigae> I paid about half that each.
[18:28:58] <Hfuy_> I've used them, in movie stuff.
[18:29:05] <Hfuy_> For all the reasons we're discussing here.
[18:29:25] <Hfuy_> Conveninet. Recalls the modern "digital fet" thing.
[18:29:51] <Hfuy_> 10 pieces at $1.78 from china. Got to be knockoffs.
[18:30:19] <twnqx> yes, they are still made
[18:30:59] <Hfuy_> I assume the chinese knockoff-merchants are doing them.
[18:31:10] <Hfuy_> Are they FET or BJT internally?
[18:31:38] <twnqx> bjt
[18:32:06] <Hfuy_> Old school, eh?
[18:32:06] <twnqx> toshiba, 0.24€/piece at reel volume (1k pieces)
[18:32:09] <twnqx> @ digikey
[18:32:18] <Hfuy_> These ones are marked toshiba, but who knows
[18:32:26] <twnqx> so 1.78$ from china isn't that great a price
[18:33:20] <Hfuy_> $1.78 for ten.
[18:33:22] <Hfuy_> Delivered.
[18:33:27] <twnqx> oh, 10
[18:33:30] <twnqx> but even then
[18:33:39] <twnqx> pretty much possible they are real
[18:33:57] <Hfuy_> Easy to fake, I assume, if you're a semiconductor foundry.
[18:33:59] <twnqx> just leftovers from a production run or something lik ethat
[18:34:55] <Hfuy_> Given the pinout, in PCB terms they can almost just sit right next to the 595s and be linked across.
[18:35:42] <Hfuy_> In fact, if I didn't want the decimal points, they could be done exactly like that.
[18:37:08] <Hfuy_> It's a bit of a cow to make a decent-looking display board without it being dual layer, though. The displays are essetially DIP devices so it's tricky to patch up.
[18:38:01] <Hfuy_> These things are OK to drive direct from the AVR, right?
[18:38:09] <Lambda_Aurigae> to a point.
[18:38:23] <Hfuy_> Or the 595s, actually.
[18:38:23] <Lambda_Aurigae> oh..you mean the uln2803?
[18:38:31] <Hfuy_> Yes.
[18:38:34] <Lambda_Aurigae> yeah..you can drive those straight from the avr.
[18:38:37] <Lambda_Aurigae> that's what it's for.
[18:39:08] <Hfuy_> I think I drove them via something else last time.
[18:39:13] <Hfuy_> a 595 or another micro.
[18:39:27] <Hfuy_> I am now the proud owner of 50 ULN2803s. Sadly they're in Shenzen.
[18:39:35] <Lambda_Aurigae> roadtrip!
[18:39:52] <Hfuy_> I've always wanted to do that.
[18:39:59] <Hfuy_> I live in the UK, so it's theoretically possible.
[18:40:00] <Lambda_Aurigae> me too
[18:40:06] <Lambda_Aurigae> but no road from here to shinzin.
[18:40:18] <Lambda_Aurigae> shenzen.
[18:40:43] <Hfuy_> Well, I say "in theory."
[18:40:51] <Hfuy_> You have two choices.
[18:40:58] <Hfuy_> Middle east (body armor at the ready).
[18:41:03] <Lambda_Aurigae> I could go over the north pole.
[18:41:10] <Hfuy_> Or Russia.
[18:41:20] <Lambda_Aurigae> but don't think my two wheel drive pickup will make the trip very well.
[18:41:56] <Hfuy_> From here, it might be reasonably civilised.
[18:42:06] <Hfuy_> Northern China can get a bit harsh.
[18:42:16] <twnqx> shenzhen is great
[18:42:29] <twnqx> but i am usually flying in via hong kong.
[18:42:37] <Hfuy_> Hang on. With 2803s, do I want common anode or cathode.
[18:42:41] <Lambda_Aurigae> I can't really afford to go out there for the fun of it.
[18:42:44] <Hfuy_> Or are they a ladder so they'll pull either way.
[18:42:51] <twnqx> i went there for work only...
[18:43:06] <Lambda_Aurigae> Hfuy, doesn't matter...you just have to wire it up one way or another depending on what you get...and get them all the same.
[18:43:26] <twnqx> anyway, good night
[18:43:35] <Hfuy_> Sure, but if the 2803s are NPN or PNP or whatever on the output...
[18:43:50] <Lambda_Aurigae> so one way you source current, the other way you sink.
[18:44:18] <Lambda_Aurigae> oh man...yummers supper tonight..homegrown tomatoes, corn on the cob, and cucumbers.
[18:44:37] <Hfuy_> I can't remember how I did it before.
[18:44:50] <Hfuy_> But I'm not sure if the ULN2803 will both source AND sink.
[18:44:59] <Lambda_Aurigae> nope.
[18:45:42] <Hfuy_> then it rather matters what type of display I get, no?
[18:45:48] <Lambda_Aurigae> no..
[18:46:08] <Lambda_Aurigae> can use either one to do the same thing...just one goes high side and the other goes low side.
[18:46:33] <Hfuy_> Oh.
[18:46:36] <Hfuy_> I might be thinking of FETs.
[18:46:42] <Lambda_Aurigae> probably.
[18:46:47] <Lambda_Aurigae> N-channel vs P-channel
[18:46:58] <Hfuy_> Quite.
[18:47:20] <Lambda_Aurigae> I'm not seeing the different uln2803 chips though.
[18:47:46] <Hfuy_> No.
[18:48:36] <Hfuy_> Internal diagrams suggest the 2803 is NPN.
[18:48:52] <Lambda_Aurigae> yeah...all the ones I have are sink....you have a common GND.
[18:49:56] <Hfuy_> OK, fine, it's a low-side driver.
[18:50:01] <Hfuy_> I need common anode displays.
[18:50:02] <Lambda_Aurigae> yup
[18:50:31] <Hfuy_> Which exist. So we're fine.
[18:50:34] <Lambda_Aurigae> yup.
[18:51:02] <Hfuy_> Wonder what type the display are that I've already got.
[18:51:06] * Hfuy_ digs through box
[18:51:23] <Lambda_Aurigae> remember when doing this that your power supply for the whole thing is going to be in the Amps range and not mA
[18:51:54] <Hfuy_> I'm aware.
[18:52:16] <Hfuy_> V(led) is likely to be via a separate SMPSU with external control, for what's often referred to as "linear dimming".
[18:52:59] <Hfuy_> The ULN2803 facilitates this nicely, of course.
[18:53:42] <Hfuy_> Assuming 15mA/segment maximum current is just under an amp with all segments illuminated, although that is extremely rare.
[18:53:52] <Lambda_Aurigae> yeah..it doesn't need a power supply of its own..it is basically a bunch of darlington switches.
[18:54:15] <Hfuy_> Theoretically it would operate in the analogue, too, I suppose.
[18:54:27] <Hfuy_> With extremely large gain.
[18:54:35] <Lambda_Aurigae> yes, but the whole darlington pair thing is more closely digital really.
[18:54:44] <Lambda_Aurigae> a cascade turn on/off.
[18:54:44] <Hfuy_> I wonder if you could make headphone amplifiers with them.
[18:54:50] <Lambda_Aurigae> not really.
[18:55:44] <Hfuy_> I don't know what the base current on the input side is, but I suspect it's got a lot of gain, nonetheless.
[18:55:46] <Lambda_Aurigae> if it weren't for the resistors in there it might work more like that.
[18:56:28] <Hfuy_> Under 1.9mA at 5V.
[18:56:35] <Lambda_Aurigae> I suspect they are fixed up so they have a very narrow on/off area....not exactly linear.
[18:56:51] <Hfuy_> I'm sure.
[18:57:00] <Hfuy_> Overall, though, that's a Vfe of about 260 :)
[18:57:30] <Lambda_Aurigae> I'm not one of the edumicated in the electronics world...more self taught hacker of old.
[18:57:44] <Hfuy_> I've no formal education in this.
[18:57:45] <Lambda_Aurigae> I put things together until something works and don't do a lot of the math.
[18:57:59] <Hfuy_> Apparently they do drop a bit over the transistor, being BJTs.
[18:58:07] <Lambda_Aurigae> yes, they do.
[18:58:09] <Hfuy_> At 500mA, the ULN2803 drops well over a volt.
[18:58:30] <Hfuy_> Do that to the maximum load and it'll be dissipating 2.5W
[18:58:49] <Lambda_Aurigae> heatsink time!
[18:59:08] <Hfuy_> No kidding.
[18:59:43] <Hfuy_> These smaller displays are a pain as regards layout. They're fundamentally a DIP10 package with about a half inch between the rows.
[18:59:51] <Lambda_Aurigae> yup.
[18:59:57] <Lambda_Aurigae> and the pinout is really funky.
[19:00:11] <Hfuy_> The bigger ones would make it fairly easy to route. These small ones will demand lots of wiring.
[19:00:41] <Hfuy_> It's not actually so terrifying. The centre pins on the rows are the anode. The rest is the segments, and I can patch it up any way I like and solve it in the "font".
[19:02:01] <Hfuy_> Commercial 2.3" displays are a bit too big, actually. too wide.
[19:10:35] <Hfuy_> Hmm
[19:10:44] * Hfuy_ discovers just how few sizes of 7 segment display are really made
[19:25:46] <Valen> here's a 7 segment display I made earlier https://www.youtube.com/watch?v=q8K6X0kKXZ8
[19:25:52] <Valen> (noisy)
[19:46:25] <Casper> I'm thinking to make one too... but... not sure how big I want it to be
[20:36:22] <ferdna> where could i get RG-59 Center Pin... for cheap... like chinese stuff...
[20:36:24] <ferdna> https://abra-electronics.com/connectors/bnc-connectors-and-adapters/rg59-pin-gold-plated-center-pin-for-rg59-connector-rg59-pin.html
[20:39:10] <Lambda_Aurigae> I might have some rg-58 crimp connectors with pins here somewhere.
[20:45:32] <theBear> there are flames billowing out my ear-holes ! what mortal dared to speak the name of ME (ME whose name cannot be uttered)
[20:46:08] <Lambda_Aurigae> not me.
[20:46:45] * Tom_itx gives theBear a pot of honey
[20:47:49] <Lambda_Aurigae> I should put a windows machine on the internet and infect it with a few dozen viruses,,,and put some juicy downloadables on it for the fun of it.
[20:48:21] <Lambda_Aurigae> no firewall, no antivirus, lots of infested executables.
[20:49:29] <theBear> mnum mnum
[20:49:47] * theBear mentions that 3rd-personing his name is a sneaky but valid loophole