Avatar for DrAzzy


Member since Feb 2014 • Last active May 2020

I'm Spence Konde aka Dr. Azzy

I live and work in the People's Republic of Cambridge, near Boston, MA. I test the web gateway and web development framework for a database software firm for my day job, and sell PCBs and do electronics stuff on the side. I also own pinball machines, with all the maintenance that entails, and have made modifications to them as well.

In addition to Espruino, I do a lot of work with the Arduino platform and maintain a core that supports almost all ATTiny microcontrollers for the Arduino IDE.

I'm not a real doctor (I'd be happy to write you a prescription - but it'll be on the back of a cocktail napkin, and it'll be for a cocktail);

In a past life when I played Ragnarok Online, I wrote the AzzyAI homunculus and mercenary AI, which was used by thousands of players worldwide (ie, I'm that Azzy)

Most recent activity

  • in Pico / Wifi / Original Espruino
    Avatar for DrAzzy

    Damn, I've been away so long...

    Once it gets going, the popularity is self-sustaining because everyone and their mom is making them in uber-mega-bulk. If you see a garbage-can shaped crystal in basically anything you scrap, you're basically guaranteed that it will be that frequency, even the el-cheapo ones from china with no markings on them. I think I have only twice (out of pulling like 20-30 of those things) found ones that weren't, and those had the frequency clearly marked. Also, the black 4-pin SMD ones (you know the ones I'm talking about) that you see all over the place are also, almost always, 32.768k too - just depending on whether their process is better suited to SMD. You also see garbage-cans on their side with the pins bent into a shape such that they can be surface mounted pretty often too (though I wouldn't use one in a board I designed - I'd use a black 4-pin one (note that there are only two unique pins - I forget whether they're tied together in pairs, or if two are NC - they're not a powered oscillator like many of the flat ones with 4 pins and that distinct shiny metal case (though some of those are just crystals too; for a while I used to pull those - they're surprisingly expensive, actually). But since I started making and selling boards, I have turned against using pulls - literally the only time I will use pulls now is if something mission critical failed, and I had no choice. Like the time I brought everything I needed to do a bunch of AVR development over my 1 week summer vacation, specifically some stuff regarding external crystals - but then realized I'd forgotten the 22pf caps for the crystals! So we went to the dump and raided the e-waste trailer (we = my father and I... thinking back, I'll bet back then he was just getting into his obsessive focus on SMPS's, so he wanted to get stuff to examine the SMPS modules anyway - dear god, at one point he literally had 30 computer power supplies stacked up. Eventually he decided he understood it well enough after obsessing for a year or so, and disassembling a dozen or two SMPS's - the computer supplies are kind of boring, because they're all the same inside anyway - what was a lot more interesting was random consumer electronics), and tore them apart when we got home, and I found my pair of 22pf caps and proceeded with my project... or the time when I was going from the summer place straight to my first job interview, but we lost the charger for my shaver... so we pulled a pot and a 5v supply and manually adjusted it while monitoring voltage to charge the battery so I could look sharp for the interview... (now we have a stash of parts there, of course - including at least one Espruino!)

    And yeah, the fact that a binary counter can be used with them and easily convert to seconds is HUGE.

    The one annoying thing is that there are 1000ms in a second instead of 1024; I do one thing where I prescale the clock by 32, then (since it's on an 8-bit AVR - no hardware division (like, I was thanking my lucky stars we had hardware multiplication :-P), so in a timing function, doing that to an unsigned long is right out the window! I think I right-shifted it 6 places, subtracted that from the original, then rightshifted the already right-shifted one one more place, and subtracted it again, and that gave me my millis() implementation...
    But what was interesting when I tested it... it was WAY off, and I deduced that the half-assed way in which I;d connected the crystal was killing the accuracy because the stray capacitance was way wrong. That's one thing I wish I had a heuristic for, calculating how much stray capacitance I have, so I know what value caps to use (the datasheet warns several times of the importance of getting the capacitance right - at least for parts I'm working with now) - since I'm now making and selling boards, I kind of want to not completely bung it!

    And the final aside I was getting to... the part I am focusing on now, it doesn't have a high-speed external crystal, it's internal oscillator only (atmel-now-microchip's AVR team broke up with MHz crystals a couple of years ago), but obviously they have watch crystals, and a proper 16-bit RTC timer now so they can use them (instead of the old atmega halfassery with the async 8-bit timer2)... naturally, customers buying their new flagship product want accurate clocks... they have what they call "autotune" (lol) - you put a watch crystal on it, and it counts clocks, and dynamically recalibrates the internal oscillator! Haven't played with it, since I went down a rathole with programming tools that I'm just emerging from - but if it works, it's damned cool. My breakout boards for those take garbage-can-shaped through-hole ones (all I could route) but I really wish I was able to calculate whether I had the right caps on it...

    My god, why did I write this essay in a 2-week old thread, lol... I think I wanted a break from what I was doing (I feel bad for switching to Arduino for most tasks - I do still use Espruino for web stuff - but I'd have never gotten into the hobby and had all this fun if it weren't for Espruino. It is such a great way to get comfortable with how digital electronics work... but I've come to absolutely love the parts where I can work really close to metal, which requires the parts be simple enough that I can hold the concept of them in my head. Those who remember me may recall that quickly gravitated to getting low level within the Espruino VM....)

  • in Electronics
    Avatar for DrAzzy

    You will also probably have better luck with a PC instead of a mac. Macs are really picky about stuff, and they hate people doing anything other the basics with it.

    Also - how confident of your soldering to the mic wires? That kind of wire is insanely hard to solder to - the enamel on the wire is nigh impossible to remove.... we have tried chemicals, a guy I knew (for whom a sololution meant several thousand dollaert of otders) did a chloroform synth (where you mix pool shock solution and ice, in an ice bath, and slowly add acetone to it; if you keep it from getting so hot that it boils off the chloroform (it's highly exothermic solution), when you're done, there's chloroform at the bottom of reaction vessel). it didn't work - I have no idea what the now-banned enamel stripper contained (if anyone knows, please tell me), but whatever it was, it was good stuff!

    The only way that I know that will definitely work to strip it is to melt a pot of eutectic NaOH/KOH mixture and dip the ends in that; you of course need to make sure the container can hold it; it will attack almost anything, including glass (i worked with this doing my masters thesis - it would dissolve the glaze on the crucibles I tried to melt it in, and it trashed a YSZ crucible too). And of course, then you have a pot of molten lye on your desk (and, by the way, when not in use, you need to protect it from moisture in the air, as the hydroxides are extremely hygroscopic..... I have thought a lot about this, and it bites the big one.

  • in Pico / Wifi / Original Espruino
    Avatar for DrAzzy

    Waaaaay back in the day there was a long discussion about this, IIRC. I remember discussing this behavior on the original espruino board not long after I got it...

    I really wish the STM32 datasheets were a little easier to work with (I remember looking at it back then) where all the info you needed was in one document, with sections only present for the peripherals on that part, like Atmel's datasheets - the STM32 peripherals absolutely bury the ones on the AVRs, and they're not really more expensive or anything.

  • in Projects
    Avatar for DrAzzy

    If I had more time to work on my own projects, I would be using the hell out of that, heh... It's a really awesome tool. We gotta get more people using Espruino! Quite honestly, I think Espruino would be an amazing "my first hobby electronics platform" - the live console was just amazing when I was getting into electronics. I might well not have stuck with electronics long enough for it to get really fun, had I started with Arduino instead of Espruino - and that would have sucked, because I love electronics now.

    It's kind of a pain to build Espruino firmware myself, since I don't have a convenient linux machine in my apartment, so I have to ssh into a linux machine (I use one on AWS, as that's less work than sorting out my home linux machine so it's not such a pain in the arse to use)

  • in Bangle.js
    Avatar for DrAzzy

    "i don't always test my code but when i do i do it in production"

    That's how I do it :-P Lately on my Arduino cores, I've had 50/50 success rate with recent releases >.>

    I dislike testing software - I always assume because I do that for my job. When you have a large enough crop of users, they test everything for you!

  • in Interfacing
    Avatar for DrAzzy

    I never made it work back then. Never had much luck with the nrf's

  • in Pico / Wifi / Original Espruino
    Avatar for DrAzzy

    The 2-months ago was my assembly writing experience. I have no idea when Espruino got neopixel module builtin!

    TBH I haven't had a chance to work on any Espruino projects lately... I really want to finish up the two big projects for my room... I just came up with the perfect way to deal with the problem of generating patterns for my pingpong lights and deploying them. But I have a million other projects!

  • in Pico / Wifi / Original Espruino
    Avatar for DrAzzy

    There's now a neopixel module builtin? Man, kids these days... spoiled rotten I tell you!

    With firmware that old, you'd need to do it like we did back in my day (I'm sure there are some examples here) where you use an SPI peripheral and send4bit() or whatever it's called.

    That's how I did it back then, and lemme tell you junior, you never heard me complain!
    (heh, in terms of "back in my day" type things - a bit ago, I was modifying the hand tuned avr assembly code in adafruits arduino neopixel library to make it run on 20mhz and 10MHz parts for the new megaavr parts. Fun stuff, you feel like those guys in The Matrix who can look at the green symbols and see what the reality they decribe is. But that was only 2 months or so ago)

    But yeah - just update the f/w and you should be good. The newer firmware has all sorts of other goodies too.