Posts Tagged ‘tech’

h1

Multiply by four and add two days

December 4, 2012

How long will it take you to complete that task? You know, that task you don’t know any details about and is just a block on the diagram that says “USB”. When, precisely, will you be finished with it?

Engineers hate schedules. We like puzzles. Hurrying us while we complete a puzzle just leads to annoyance all around. It takes the time it takes. Maybe if you stopped interrupting with stupid questions about deadlines we could focus and create a good solution.

Putting on my manager hat (oh, yeah, I totally have a hat specifically for thinking about manager-y things), knowing when software is going to get done is critical. In an embedded system, the software needs to correspond with the hardware and the manufacturing tasks. Letting everyone work at their own pace without any guidance just leads to disaster.

If you’ve never put together a schedule before, it can seem like magic. I’ll tell you how I do it. I’m pretty good at getting the project to come out when I predict.

Let’s start from the engineer perspective and then I’ll move to the project management side.

When asked how long I think something will take, I check my gut, it gives me a number (“ahh, that will take about two hours, if only people would leave me alone to concentrate”). This number has no debugging or anticipation of uncovering lower level problems. It doesn’t take into account interruptions, feature creep, or high priority interrupts coming to clear off my desk so I have to restart the intended task. My gut doesn’t worry about documentation or code reviews, it considers the puzzle only.

So I take that number (two hours) and multiple by four, then add two days. Thus, I tell the project manager that the task should take about three days. This isn’t padding… this is planning. Everyone has a multiplier and an adder. Many managers work to figure out what multiplier they need to apply to the engineering estimates they are given. In fact, it looks like MS Project has this concept of Baselines that let the project manager figure out what the multiplier should be as time goes by.

That is just me providing one estimate of a small task. My multiplier and adder are my own. You can use them but you really need to figure out if it is an over or under estimate.

But, what about if you are stating a project and need to sort out ten or twenty tasks? You can use the same method if you know enough about the tasks but my gut reaction tends to get worse as I think about all this work. And my estimates get ever larger as my brain gets tired.

Instead, I take the list and try to break down all the tasks I can think of… USB breaks down into many parts: a driver, an interface layer, and an application layer on the device. I also need a PC program for testing. Breaking tasks down is a tough process, easier done with another person. At the end, you have sixty or a hundred tasks so it feels like anti-progress.

Don’t fear, the next step is to go through the list of tasks and decide if each is easy, medium or hard. As you go through the list, you may find you need more granularity; I usually end up with a very hard and trivially easy. Remember, if you don’t know much about it, it is going to be harder because you’ll have to figure out how to do the work before you start, bump those unknowns up a level.

Now you’ve got a long list of tasks and whether they are easy, medium, hard, very hard, etc. I’d put these in a spreadsheet. But it’s recently come to my attention that I may depend too heavily on spreadsheets. Still, go for it.

Now you need to define what easy, medium, and hard mean. Think of a few of the easy tasks… ask your gut how long they’ll take. Multiply by four and add two days (or whatever you choose). Same for medium and hard… Don’t worry about how long everything will take. Don’t worry about the goal dates or when the CEO wants you to ship. Listen to your gut. Then use your brain to correct it.

Now, go home and sleep on it. In the morning, without looking at your old values, re-do the gut check for easy, medium, etc. If the values are very different, spend some time thinking about why that would be. I am more optimistic in the morning but sometimes I’ll realize the difference in values is because I’ve marked some medium things as easy so my average was off.

Anyway, take your two values for each category and average them (or sort out the discrepancies properly). Now you can apply it all of the tasks. Is it exact? No, of course not. Is it a reasonable first pass? Yes, very much so.

Now all of your task have duration values, maybe in engineer hours, maybe in engineer days. Sum up the duration and convert to 40 hour work weeks. Now you can say “with 1 engineering resource, the whole project should be completed by X”. Someone will squawk loudly at this. It always seems like too much time. But you aren’t just pulling a number out of a hat. If they want to argue, now you can show your work, maybe get some advice on what isn’t as difficult as you currently expect.

When you add resources (aka minions, coworkers, or other people), you don’t get to divide the time perfectly in half, there is overhead with talking to a team. The larger the team, the more time will be spent communicating and making sure everyone is pulling in the same direction. I put as a multiplier on my task durations. For a 4-6 person project, I usually use 10% for integration. It isn’t an exact science… ask yourself, how many hours a week do you currently spend in meetings versus the hours spent getting things done? That is integration time.

So, there you have it. My secrets to creating a schedule.

Oh, wait there is a little more to it, isn’t there?

Priorities help… assign each project a priority (0 is low, 1000 is high…. I know 10-0 would be better but  if your data is ever going to land in MS project, 0-1000 is the way to go). Tasks that are risky get higher priorities. If you can get the high-risk tasks out of the way early, you can be more assured of the project’s success.

Precedence is separate from priority but they are linked together. For example, if I need my USB driver in order to write the application layer, the driver is a predecessor to the application. The application may be riskier and it may be highly desired by marketing so it has a higher priority. In short, you’ll really need both, priorities and predecessors. Also, some of your predecessors may not be in your task list (ahem, can’t finish the USB driver until I get some hardware to start working with).

At this point, the schedule starts shaping up…  mentally, you should have a pretty good idea of what needs to happen sooner and what can wait until later. But it doesn’t really count until you have a Gantt chart.

I hate Gantt charts.

I also hate MS Project.

But I recently did a trawl to see what I could use instead. There is a Google docs gadget but that is going away and doesn’t work in Chrome, only in Firefox (snicker). There were some Mac options but no iPad options that didn’t need the Mac support stuff. I didn’t try Open Office. And it is going to pain me to pay for MS Project when my 60-day eval period is up. And yet, the powers-that-be for this project really want a Gantt chart. And it was the only way I could show them a major flaw in the current plan.

I’m not going to teach you how to use MS Project. At this point, with tasks, duration, predecessors, and priorities, all you need to do is add resources and push level and it sorts out when things happen. (Also, swear a bit because I’m leaving a bit out.) Then you muck about trying to make sure all the people have work they are likely to enjoy (and complete) and keep pushing level until the charts look the way you want them to.

But wait, don’t stop there, now you need to go to your resources and get your easy/medium/hard initial estimates re-evaluated by the people actually doing the work. So, gone on, ask them, “How long will it take you to complete that task?”

 

h1

I hate connectors

October 26, 2012

I’ve hinted about my personal project… I’m still not going to be specific about it but I will say that there are six pieces connected together via cables, fairly complicated cables.

I’ve been working with my single prototype, built by ordering parts from Sparkfun and laboriously put together, particularly given my soldering skills. It isn’t that I can’t solder, just that I don’t do it often so I tend to over-engineer my connections making each built circuit look like a tiny tank. Of solder.

Anyway, I need to move from one prototype for me to develop the idea to several prototypes to test the unit with actual users. I’d like to go to ten prototypes because that is what I’d ask for the firmware team if I was at a real company. You know, one with funding. Let’s just say the ten prototypes will be expensive and talk about funding another time.

What I want to discuss today is about connectors. By the title, you may already have clued in my feelings on said topic. But there is so much more to it than that. The only way to express the horror is to describe the whole process.

I started out with the number of wires I need to go to each piece of my system (five). For my prototype, I went to an electronics store and looked around for things about the right size. The resident helper-gnome sold me a wire crimper… Like some sort of medieval torture device a crimper puts a metal sleeve (terminal) on a wire so I can put it into the connector housing I’d chosen. Then I could attach my housing to the pins jutting out of the connector header on the board.

Got that? The housing is on the cable, the wires go in to it via crimped terminals. The board has a header that connects to the cables housing.

Crimping the wires requires a special tool. The usual cost for such a tool is between $400 and $2000 dollars. My head reels at what a scam that is.

The gnome helped me choose a $40 crimper tool that will work on most connectors of a certain size (0.1″ if you must know) and a certain wire gauge. Of course, I have to do three times more work than the expensive version but I’ve this is a labor of love. Right?

So I learned made cables with all this and it was difficult. By the end, I was near blind and my hands hurt.  Right now, I need to make a couple cables longer (which means remaking them entirely). I’ve been putting it off for two weeks.

The pain of that is nothing compared the pain of trying to choose the correct connector for going forward.

I know I want a smaller connector for the small build than the prototype. And I need a lot of interconnects so cheap headers would be nice. I plan to have someone else make these cables but I need to be able to build extras or repair broken ones, so the tools can’t be horrendously expensive. Someday, when we build in the thousands, I might be able to get rid of connectors altogether actually soldering wires on to boards with some (unknown and magical) strain relief.

So, if you go to Digikey and search for connectors, you get a giant list of inexplicable things. There is no quick parametric search yet where I can enter the number of wires and the spacing. Like looking up the spelling of a word in the dictionary, you really have to know what you want before you get there.

I went for Board to Board – Arrays, Edge Type, Mezzanine. It had lots of options. And I got completely lost in the options. An EE friend came over to let me watch over his shoulder as he found some connectors for me. We ended up with a housing that is half the size of my current one, has keying (can’t plug it in backwards) . At the bottom of that page, you can see it links to mating products. Sorting out which of those would meet my needs meant reading about each one, trying to figure out what it meant. The datasheet didn’t exactly have a choose-your-own-adventure guide to connectors, more a terse listing of numbers and part drawings that looked like they were drawn by Escher.

We chose a header and selected terminals to crimp on to the wires. A complete set. And the EE thought that it would all work with my $40 crimper, though it might a little fussy.

In a different adventure, another EE came over and looked at all this. He said it was all wrong. Well, not all wrong. Just not right. Sure, it did all match which was good (better than my first on-my-own attempt). But my crimper wasn’t going to work… not really. I’d go blind first.

He suggested a different style of connectors (IDC) which don’t require terminals. (I didn’t think that was an option because I need discrete wires and not a ribbon but that is a detail, and they do make discrete wire IDC, it is just harder to find. As though I needed that.)

However, that connector variety still requires expensive crimpers. Though they don’t properly crimp so much as push things into the right place. The one we found online was only $80 on ebay but since its retail was $11,000 (boggle!), I wonder. Also, after 30 minutes of us both digging into the specs of the tool and the specs of the connectors he’d identified and assorted random standards, we determined it wouldn’t work for the connectors he’d chosen. Or any in the right size range.

The goal now is to haunt ebay and craigslist to find a second-hand crimper of the right size and then select connectors that work with that crimper. If anybody has a matrix of which crimpers work with which connectors, do let me know?  Until then, I’ll be going cross-eyed trying to figure it out.

 

h1

Embedded systems conference call for abstracts

October 13, 2012

About a year ago, I was getting ready to push the giant, red button that said GO for my Making Embedded Systems book. I thought that once I was done writing, it would be finished. Then I thought once the figures and tech reviews were done, the book would be ready to go.  Surely once we fixed all of my misplaced commas, it was done, right?

Not really. Then I started doing promotion. I did two webinars for O’Reilly. Those are a lot of work. I also looked around for other promotion to do: speaking at schools, talking to magazines about reviewing my book, being in the scary “out there” to meet people and market my book.

I also wanted to present at the embedded systems conference in the spring, I’d attended for many years but here was my opportunity to speak! By the time the GO button was pressed and I came up for air, I’d missed the conference deadlines. There was a slot for someone to talk about LEDs but what do I know about LEDs?

Turns out, enough to fake it. With the wonderful help from EE Rob Mitchell, I did a live demo on how to take some Christmas lights and make them run from an Arduino (similar to Deep Darc’s blog post). I showed how I could make lights to leave up all year as they changed colors based on day of the year. We went from boxed lights and uninstalled software to working things, showing the process of cutting wires and loading software. We even talked about productization paths, methods for getting from idea to market and how to look at costs.

We had more show than information but it was fun. And live demos are tricky things; the audience is there to see you succeed. But if you crash, burn, and light a fire on stage, well, that’s ok too.

Even though we were in the LED section of the conference, we got all-access badges which let us go to any session we wanted. And we got access to the break room. It doesn’t sound like much, but it was where all the other speakers hung out. And there was lunch, coffee, assorted snacks, tables, and chairs. At times, it felt like heaven.

One thing there wasn’t, though, was women. I think I saw two other women the whole time I hung out there. I was kind of disappointed not to meet any other embedded systems people who share my gender, if only because they’d be the only ones who’d really appreciate my light-up shoes project.

So, this year, I looked in early October for the call for abstracts. It appeared, they were all set. Eeek! How could I have missed it again?!? Ahh, no, it just hadn’t opened yet. I emailed the track chair for my LED session (feeling guilty as I never wrote her that article I’d promised). That led to me talking to one of the organizers, actually getting to pitch a few ideas that aren’t open yet, maybe getting to co-chair a track. Whee!

The call for abstracts is open now. Go on, submit an idea or two. I’m most excited about the case studies for debug and test and the one about getting to “Hello World” in under five minutes. (Hey! That is what I did last year!)

And if anyone wants to join a panel, loosely on sensors, well, drop me a line. I’m percolating on my own ideas but happy to listen if someone wants to chat about theirs.

Here is a prototype for a light-up animal.  Naw, this is a jelly fish from the Monterey Bay Aquarium. But if your idea for a talk is a quarter as cool as this jelly is, please submit it.

 

h1

Next you take 100k children

September 25, 2012

I’m working on a project that uses I2C sensors and there is an addressing problem with them that is kind of complicated. I sent out a whole-team status report and glossed over the problem figuring the engineers knew what I was talking about and the non-engineers wouldn’t care.

One of the team caught me later and, somewhat abashedly, clearly feeling feeble, asked for clarification.

Oh, no, the problem was entirely in my explanation. So I started explaining how the sensors each had two addresses and since I wanted to use five of the same sensor, I had to get ones with different base addresses, the only way to accomplish that currently is with different vendors though I had some progress this week…

Eyes started glazing over. This was going nowhere fast. But I really want people to ask questions (because I’m not always right) and I want them to understand the answer (or they won’t asked next time). So I switched gears, trying to build on something already known…

Say each sensor is a child. Each child has two hands (as children often do). I need five hands for my project. Therefore, I need three children. Nods, right?

If they all came from the same family, it would be easier, see? I’d know how to communicate with them and it would be the same for each child.

However, every family I know only has one child. Each child behaves slightly differently, speaks a different language at home. It is harder for me know how to keep them all happy. Also, each child is valued differently. It is a pain to deal with, making everything more complicated than it needs to be. It would be better if each child came from the same family and was nearly identical to the others in its family except for, say, hair color.

However, when I contact a family about having a few more children (with different hair), they want me to order in the 100k range. And that is a lot of children.

So… breaking that down… each sensor has two I2C addresses (each child, two addresses). I want to use five sensors, so I need three sensors from different families. The families here are usually vendors (Analog Devices, Freescale, Bosch, STMicroelectronics, etc.). Each one is slightly different than the others in the way they work though they each sense essentially the same thing.

If I talk to a vendor, they are willing to modify their manufacturing process to give me a different base I2C address (different hair color). However, they want me to order a bunch of them (100k of each hair color, err, I2C base address). I’m still building prototypes so that sort of financial commitment is beyond me.

 

 

h1

Where do ideas come from? And where do they go from here?

August 16, 2012

A friend emailed me about a design contest. I took a look and found it to be mildly interesting. She suggested we get together to brainstorm.

I let it percolate a bit and sent her email with a half dozen ideas. And then a day or two later, I sent her another half dozen on a different theme. And then… well, she emailed me back, reminded me she was out of the country on vacation, getting hundreds of emails to wade through. She wanted to brainstorm when she got back.

Well, one of those ideas haunted me. I kept thinking “I wish I had that” and “I bet it would make my life better” and “how hard could it really be?”. It even kept me up one night until I sketched the idea out. Well, possibly my cold kept me up and doodling was a way to keep me from whining too much.

So I wrote a somewhat comedic elevator pitch and sent it to my favorite electrical engineer (Phil) and to my husband (Christopher). Both were encouraging. I started to fantasy purchase the parts on SparkFun and determine the minimum processor requirements. I figured out some areas that I didn't know enough about.

A few days later, I told my hairdresser about the idea. She got it instantly and wanted to buy one. (My hairdresser is awesome and likes lots of my crazy ideas. And she understands my hair is wash-and-wear; the only person who ever blow dries it is her.) So, everyone was in agreement, and I was getting more excited. I was still wishing I could just buy one and start using it. (And somewhat afraid to do much searching online to find that I could buy it though I did finally bring myself to do it.)

A few days later, Phil came over (lured by homemade pizza and possibly games). We hashed out some of the gaps. I decided on a processor (from the extensive selection of my dev kits on my bookshelf, though Phil went home with one of the dev kits he found interesting). Then I actually forked over cash to SparkFun and Digikey to get parts. And I started keeping a bound lab notebook, signed and dated. I neatened and copied all my weekend notes into my notebook. I made lists of things to do.

I made an appointment with an expert in the area my product would be sold in. I made some more sketches, ones that didn't involve the technology and focused on the user experience. I bought her lunch and told her about my idea. I figured even if she didn't like it, I'd still continue on… not because I didn't trust what she'd tell me but because I was willing to try even so, I'd fallen into deep like with my idea. But my expert was so enthusiastic, I could easily have sold her a dozen. Or gone the pyramid route and her start selling them for me. And her excitement made me start thinking about Kickstarter and how she'd be perfect for a video presentation.

I got my parts in the mail (SparkFun boxes are the best!). I spent a few hours on Saturday trying to make it all work. Nothing worked… it was like each component worked but nothing would play together on the solderless bread board. On Sunday, stuff started working but it lacked robustness, probably because I didn't want to solder anything (I'm not the greatest at that and undoing my giant globs of solder is impossible; my plans for later connectorization had to wait until I had some proof that the components would work.)

Later that day, my husband and I went out to lunch and drew all over the paper-covered table, making plans for data collection and demo software and user interfaces. He'd already downloaded and tried out Valve's engine, thinking maybe the demo could be a cartoon (I wanted it to be made with the giant guy with all the bullets!) but it was overkill. And, to be fair, all my sketches so far involve stick figures and messy handwriting (I'm not *even* to powerpoint yet).

I'm fortunate that my friends are not only wonderful and generous, they also have mad skills. Yesterday, when I showed up at my favorite patent agent's place for lunch (bearing the customary summer lunch gift of popsicles), I asked if she minded if I told her about my idea (hey, she doesn't make me fix her printer, I'm not going to make assumptions though she'd been happy to talk shop in the past). She said yes, got the idea immediately, was very excited about it. She's planning to buy one for her husband for his birthday (I should find out when that is). She's going to do a patent search and if that is clean, I'll start on the provisional patent, which she'll help me file.

I had lunch with Phil today. Between miso soup and bento boxes, he took apart the competitive product (ok, there isn't a competitive product, it is just a distant cousin, the closest I could fine). His leatherman got a workout and the waitress gave us a few strange looks. Once he was done taking apart my toys, he looked at my components and approved my soldering plan.

There is so much to do still. The prototyping software was egregiously basic and does about 1/100 of what I want it to do. Plus, I need to get some real data in a reasonable format to feed to Christopher's demo and data collection software.

The proto boards need to be soldered and then attached, made to function and then made smaller and easier to build. And there is another electrical component that is far more complicated, it will need a very complex schematic and power will become an issue (such as dealing with a rechargeable battery).

Phil pointed out today that I was ignoring the enclosure. Yep. Planning to keep doing that for awhile. We'll put the microprocessor in tupperware or baggies or something for a little while. I want proper mechanical/industrial design and I'll skimp until I have the funding to do that.

I need to work on the provisional patent, write up the idea properly, and try to think of all the possible applications (and clauses). My patent agent friend will help but I will probably need to cough up some money for patent drawings, probably.

I know who I can pitch the idea to. They may even want to license or buy it. If not, I'll ask them to sign a paper saying I presented the idea to them on such and such a date. Hopefully, I'll have the provisional patent done by then. Even if they don't want it, they may have some advice for pitching and people to pitch to. We'll see. There is still that design contest (which ends in November). And this is a good candidate for Kickstarter if I can really figure out the costs associated with starting manufacturing. I know there is a lot of business side things to think about. After the first prototype is collecting data and functioning for me.

There is so much to do. I should get to it. Wheeee!