Posts Tagged ‘advice’

h1

Call for Proposals

December 4, 2014

The embedded systems conference (finally renamed the “Embedded Systems Conference”, yay!) and O’Reilly’s Solid conference have opened their call for proposals (Solid’s and ESC’s). After telling everyone that I’m tired of giving conference presentations, tired of attending conferences without talks that I want to see, that presentations take way too much time to prepare, presenting leads to no goodness for me, I have nothing to talk about, and I have way more fun (and reach more people) on the podcast, I’ve put in three proposals.

Faker to Maker in 30 Minutes

The Maker revolution is obviously here.

What does that mean for those of us who aren’t Makers? We worked hard for these engineering degrees and now sometimes feel daunted (even intimidated?) by the free sharing, open source, do anything, tinker in their obviously copious spare time hackers.

Wait, weren’t hackers the bad guys? (Sometimes, semantics change.)

Will there still be a space for careful, professional engineering? (Hint: yes.)

Most importantly, how can we join forces to get the best of both worlds?

Low Power Strategies for Wearables (and Everything Else)

Sleep early and often. Reduce your clock speed. Turn off your IOs and unneeded subsystems.

Excellent tactical advice only goes so far, this talk will help you understand how to architect software to reduce power usage. Focusing on ST’s Cortex-M0 and Atmel’s ATMega328, Elecia White will describe how to start from a clean slate to get great results and how to utilize some of these techniques on to existing code bases.

Intro to Inertial Sensors: From Taps to Gestures to Location

What is the difference between an accelerometer, a gyroscope, and a magnetometer? What would you use each for? If you aren’t sure, let me explain.

The entertaining host of the Embedded.fm podcast, Elecia White will explain the differences and each sensor’s best uses, on their own and in combination. She will detail the most common ways to put them together and help you determine which are the best choices for your products.

The talk will discuss how to replace buttons with accelerometers, how that leads to gesture recognition, and why integrating to get location is a more difficult problem that it sounds. While you might not be able to implement a Kalman filter by the end of the talk, you will know why it matters.

***

What do you think? One fluffy and two technical. I had a third technical one but it seemed like an awful lot of prep work:

How to Choose a Micro for Your Application

Price, performance, and power war for supremacy. We all want the cheapest, lowest-power processor for our application. But at the beginning of development, we may not know how much performance we truly need. Choosing the wrong processor may lead to a complete redesign, a time to market disaster. How to estimate which family of processors is the best for your application?

Unaffiliated with any chip or compiler vendors, Elecia White is an experienced embedded systems consultant and host of the Embedded.fm podcast. She will explain her methodology, using examples across consumer applications.

The talk will tackle such estimation issues as where to start if you need to run WiFi—that often means running an Ethernet (TCP/IP) stack which means you probably need an RTOS. If you need an RTOS, you probably don’t want an 8-bit ATMega (not that it isn’t possible, just that it isn’t likely to be timely). Start with a Cortex-M3 range and look for the next set of requirements. Power might push you down to a cramped Cortex-M0 or heavy processing might sends you up to the Cortex-M4 (or a dual processor DSP/C-M0 option).

There are tradeoffs everywhere; this road map will help you choose a path.

***

That one also seems like one hundred thousand ways to be wrong since someone will always disagree. I can offer my opinion but I’m sure to frustrate some developer with a crush on PICs. (Because PICs are my least favorite processor. I don’t know why you’d choose a PIC over an ATTiny or an MSP430. Ok, I said it. AVR Freaks unite!)

Anyway, the proposals have been submitted on the idea that I should want to speak, that I should do my part for women-in-tech (bleah), and that I want more listeners for the podcast (which I should remember to mention this time, not like the last presentation I gave, urk).

The proposal deadlines are Jan 9th and 12th so get yours in. I’m only going to the conferences if there is someone I want to see speak. Go propose something amusing and informative, please.

 

 

h1

Wandering Silicon Valley looking for techy fun

August 2, 2014

A podcast listener, Brian, asked an interesting question- he’s been traveling to San Jose and San Francisco for work, he enjoyed stopping by HSC/Halted. If you’ve never been there, it is very amusing. It is a warehouse where electronics go after they’ve been bought, resold, taken apart, and then resold again. It is a fun to visit, looking at power supplies from the 60s, radio cabinets from the 40s, and disk drives from the 80s. He planned to visit Weird Stuff in Sunnyvale, a similar sort of store. He asked if there were other places I could recommend checking out. My response:

***

Have you been to Hacker Dojo in Mountain View? People go there to hang out, get together at meetups, and sometimes to work. You can walk in for free and walk around asking people what they are working on. People apparently don’t mind. (I’ve only worked there once and we had a pretty strong don’t-bug-us vibe.) Being a member lets you schedule rooms and get a key to use the site in off hours. You don’t have to be a member to grab a table and have folks come by to talk to you.

There are a few hacker spaces, many of them are very friendly. I’d search for you goal zip code and “hacker space”.

There is also the Tech Shop. There is one in downtown SJ (also SF and a couple others). Tours are free, classes can get expensive. You don’t have to be a member to take classes and while you are there for the class, they usually let you roam. (You can just go in to use tools you are rated on for ~$10 or the monthly/annual fee.)  The Tech Museum is more for kids but can be amusing (and is downtown SJ so you can do that and the Tech Shop in one day).

More in the HSC/Weird stuff range, have you been to Saturday De Anza Electronics swap meet? Imagine you got to wander every electronics hoarder’s garage. Some say the people are very nice (it is one of those “if you are social, they are social” things that I tend to fail at).

It seems like there is a conference every week at Santa Clara, San Jose, and SF’s Moscone convention centers. (Seriously? The World Flash Memory Summit? Why?) These sometimes cost money but you may be surprised how quickly they’ll give you a pass if you say “I have a blog” or “I want to see what it is about so I can let my boss know”.

Is this what you were looking for? There is also meetup.com which has a ton of meetups: robots, auto hacking, ham radio, etc.

Oh, right, don’t forget to hit HRO when you are near HSC.

I’ve also found wandering the Google campus on the weekends to be nice, they have a strange set of buildings (and I like architecture). The Computer History is in Mountain View too. Make sure you see the Babbage Engine go, it makes calculation stunningly beautiful.

I don’t know as much in SF, I usually go that way for culture more than tech. But there is a ton of tech there (and meetup.com will help with finding that).

***

From his happy response, I went into more detail than expected. And, of course, he’ll be in town for the Flash Memory Summit.

 

h1

Elementary school programming

July 30, 2014

An embedded.fm listener (Mike) is working on starting a program for a local elementary school that introduces Engineering with a main focus on programming and electronics. He wanted to know if I had any suggestions.

For programming for almost any age, Scratch is awesome. It can be web based or on a Raspberry Pi. It is very well design to introduce programming concepts (and it is fun to make little movies of avatars). I’ve used it for 2nd graders (and 11th graders).

For 3rd-6th grade, Minecraft is a good way to get some kids interested in programming, they end up wanting to run their own servers and create worlds. (Though it tends to be a bit boy-centric. My godsons have adored it since they were in 2nd and 4th grade (now they are 5th and 7th)).

For electronics, the LightUp system is pretty intuitive and very neat to play with. They have kindergarten stories. The kits are a bit expensive and they are only from MakerShed (big kits aren’t available yet).

In the meantime, I have a friend who picks up Snap Circuits at garages sales. His 5 year old is building amazing things (making mods on the existing plans already!). I haven’t played with those but am amused by the pics I’ve seen.

So what would you suggest?

h1

My checklist for debugging insurmountable issues

June 21, 2014

I listen to the Amp Hour podcast. Last week, they were talking about ways engineers fail and about checklists as a way to be more disciplined in avoiding preventable errors.

I try to learn from my mistakes so I do have a checklist of sorts when I reach the “it’s all broken and never, ever going to work again” stage of debugging. Of course, when I get to that point, the symptoms are usually different. Still, some parts of the path are relatively common.

1. Having you tried turning it off and back on again?

It is a joke, a very well seasoned joke. But it is only funny because it is so horribly true. This isn’t a good way to debug a horrible problem but it does provide the circumstances the problem happens under. I often start from scratch to reproduce issues because there is often a clue in the process. So, turning it off and back on again is a way to make sure that I start from a well-understood starting point.

The next questions:

Really? Are you sure?

But these are going to follow most of these checklist questions. As embedded system get more complicated, it is pretty easy to turn a part of the system off but not all of it. I don’t usually go from no-power-to-my-desk, I almost always start with my computer on. But sometimes, turning off all power is necessary (including restarting the debugger).

2. Does it have power?

This is different than the previous in that the “it” refers to all the things that may be broken: the processor, the debugger, the sensor or actuator, the level shifters, everything. This step usually requires a voltmeter (and is related to #5).

3. Is it running the code you think it is?

I sometimes have two or three code bases. If my development environment is pointed to the wrong one, I could easily be compiling over here but loading the image from over there. Or possibly, if the load process is difficult, I may think I’ve loaded the code and somehow missed a step.

I’m working on a big system now, a monitor of another system. When I compile the code, it goes through four machines before it gets to where I can try it out. The possibility that I typed cp instead of scp (or forgot the ending colon!), well, let’s just say it happens more often than I’d like.

This is the reason to have build numbers. But if you are really, really sure it is running the code you think, change something about the output and reload. Make sure you see the change.

4. Did you read the boot and debug output?

I write error logging features and always want a serial debug output. I love power on self tests. However, once the system is working, I stop looking at them. But sometimes, if a cable has loosened or hardware has failed, the system will tell me. But only if I am listening.

5. If it used to work, what changed?

Nothing changed, of course. It just stopped working. My minor code change could not possibly have caused something so catastrophic.

I’ve heard that. I’ve said it. That doesn’t make it true.

If nothing changed, then run the old code. If it fails, well, that’s interesting now, isn’t it? If it succeeds, well then, stop saying nothing changed, something obviously did.

This does require frequent commit to version control, to get back to a last-known-good image. But you were doing that anyway, right? And then you can binary search to determine where the error crept in.

Note that if the code change doesn’t explain it, compare the map files (even the binaries). Realizing that something crossed a boundary may give you inside. Oh, also, the makefile (or project file) may have changed: optimizations can have big ramifications.

6. Is there anything interesting in the map file?

Like many embedded engineers, I find the map file to be a bit of an illegible mess. Happily, I’m not afraid of them anymore. There is an amazing amount of information in the map file. And it provides a different perspective on the code, sometimes it will jog my memory.

7. Can you prove it is hardware?

Of course, at this point, it probably is. But you know hardware engineers, they can be feeble. They need proof. So what kind of proof can you offer? How can you break it down to show it cannot possibly be the software?

Seriously, I have had the privilege of working with some phenomenal hardware engineers. It is seldom hardware (but not never). The process of proving it is hardware is a good part of debugging. Plus, if you can make the difficult error repeatable for the hardware engineer, they’ll probably take you to lunch for making their jobs easier.

8. Can you explain the problem to another engineer?

When I tutored intro to CS, I asked people to explain their problem to a teddy bear outside my office before explaining them to me. I usually listened in. However, at least 50% of the people thanked the bear and left without talking to me. Ok, probably only 20% thanked the bear but most walked away because they never actually needed my help. They needed to get their thoughts in order, to explain it to themselves.

I do that now, talk to myself. Sometimes I try to explain it to a trusted colleague (or a junior engineer) in email, trying to figure out what questions they would ask me so the explanations is really good.  Occasionally, I even send the email after all that, if I still can’t figure out the problem.

9. Did you use the single line if again?

When I saw Apple’s goto Fail bug, I completely understood.  I avoid unbraced if statements because one month, I tallied up my most common coding mistakes and found that unbraced if statements caused a disproportionate number of my bugs. I vowed never to use them again.  Since this is a known failure point on my part, it makes my checklist.

 

h1

Have you met my friend Maxwell?

May 11, 2014

I love the manatee. But I’m about to get busy and I want to finish the tutorial before things come crashing down. And Elizabeth has been busy so… in the interest of taking away self-imposed obstacles, I moved forward on the are-you-ok plushie version. Don’t fear, the manatee (or maybe it will be a narwhal) will be back! Just not today.

Friday, I went to Target, looked around in their toy aisle for a suitable stuffed animal to disassemble. Then in their dog toy aisle. I figured the dog toys will have squeakers and my electronics can fit in that area (since, of course, I’d remove the squeaker). I came home with two items.

MaxAndDoggie

The octopus is a dog toy. The dog is a human toy. I’m sure this makes sense.

Surgery1Is it mean to make the other one watch? 

The next step was to remove the stuffing, remove the backing from the eyes so light can shine through, then affix the LED and accelerometer.

insideout

I’m a little worried about my LED.  Either I haven’t been consistent wiring up blue and green or they randomly change on a per-LED basis. (Ok, I am using two varieties of LED so it may be that.) That is wired according to the datasheet. But then when I wire the board, I end up needing to swap the blue and green. Sometimes.

Anyway… that is just to show the wires. The next step is to clip each one (leaving the others with their colors so as not to get confuse). The goal is to clip as short as possible but no shorter. So aim for three snips per since too-short is bad but too long isn’t.

clipLEDLeads

Then hotglue it all together. (CUE: Foreshadowing music.)

hotglueLED

I attached the LED with fishing line, trying to keep it centered on the face but a little free floating.

affixingTheLED

The fishing line is coiled around the LED, maybe a dot of hotglue, then tied at the head, and threaded through at the bottom. With some force, the LED can be shifted up and down but it stays where I leave it. I want the LED to stay where I put it but also float in the stuffing.

puttingOnTheAccelerometer

Next goal: when you pat the head of the octopus and the accel fires. Happily, the accel has two mounting holes. I used those and more fishing wire through the seams of the head. I also, characteristically, hotglued the metal bits and the cables on to the connector. Think of hotglue as the pauper’s potting substance.

Intelligent people would test all the electronics at this point. You know, before adding stuffing. But, of course, do as I say, not as a I do.

stuffingMax

Some stuffing, in the same role as screws in other projects, is expected to be leftover. They overdesign these things anyway.

Now, add batteries! I need to have a way for the user (the elderly neighbor) to change the batteries. And I need to have a way for the caregiver to do the annoying-as-all-getup BlinkUp to send the WiFi SSID and password to the Imp card. And yet we also need to have it all look nice and stay in place.

doublestickTapeAndImp

My only advice is to try it out a few times before making any decisions. There were many ways for it not to work and only one or two that it was possible. Double backed tape (the slightly foam-like stuff) is very useful, for those spots where hotglue isn’t.

finalBitsOfHotGlue

Finish the wiring, add hotglue, stick to the double back tape. Stand on battery box on end to show off hotglue, not realizing the sense of vertigo that might lead to.

Really, you have to test him before buttoning him up. Really, really.

glowingWithGuts2

 

Now, add some velcro to the battery compartment. Then to the flap of fabric on the bottom.

velcroBatteries

Shove it all into the plush body. Nicely of course. Possibly adding a bit more of that stuffing so there aren’t any lumps due to the electronics.

Put him somewhere that you walk by often. Pat him. Mine is a little slow to light but it is such a happy light that it is worth the wait.

maxwellHappyToMeetYou

Ok.

Now, this all looks pretty good, if I do say so myself.

But you maybe are thinking “well, these are instructions from an expert” but here’s the thing: This is the first time I’ve ever modified a plushie to take electronics.

Sure, I worked at Leapfrog, but they had real fabricators (they had the first 3d printer I ever heard of!). So. If you are thinking this is too hard, go out and buy a $5 dog toy and try it. I was pretty shocked at how not-hard it was.

Or you can do a $4 person toy.

doggieHeartLED

You didn’t think the dog was going to escape unmodified, did you?

This is plain thread, sewing the LED into the inner lining of the plush body (don’t want to see the stitches on the outside). I decided the doggie’s heart should light up. And I’m going to have to use 3 AAs or 4 AAAs to fit into the diminutive body, so it will need its batteries changed more ofent.

Of course, I just put my last accel (and Imp) into Maxwell so it will be a little bit before the fuzzie dog gets the rest of its gear. I should go push the buy button on Sparkfun. I am excited about the high potential for cuteness from the fuzzmonster.

Even without the hardware, now I can continue the tutorial. (Or go outside and play before the heatwave next week.)