Archive for April, 2014

h1

A new set of questions

April 14, 2014

My are-you-ok widget is working pretty well. With some help from the folks at Electric Imp, I got the system deepsleeping. Now I can’t calibrate the fuel gauge because I’m not discharging my battery fast enough. (Problems like these, I can fix!)

Elizabeth sent me a picture of the prototype manatee plushie. It is adorable. Thus, we are getting closer to creating a second, much cuter unit. This leads to an entirely new set of questions.

First, Elizabeth warned me that she told her sister about the project. Her sister, while disliking the cuteness factor of a plushie, has apparently told many other people, generating interest. I was amused that Elizabeth seemed concerned about her own lack of discretion.

Remember, Elizabeth and I did a podcast about the idea. And I’ve been posting here, the code is on github. The goal is not discretion. So what is the goal?

My goal with this project is to build instructions so anyone can build the system. The whole device will cost about $100 and require a bit of soldering (I don’t see how I can get around that), but it is all soldering headers or big wires into holes, nothing too arduous. The instructions will include the code, along with places that require modification (and examples for the different options). It isn’t intended to be a kit that a novice, non-technical person can put together. But anyone who reads MAKE magazine or has every held an engineering job should be able to muddle through.

I don’t know what I’m going to do with those instructions, I’ll let you know when I figure it out. Actually, I’ll  probably post proto-instructions here as I go along, trying out different things.

The first step of the instructions will be a parts list. Happily, that one is easy, I created a public wishlist for this project on Sparkfun. Next, I need to describe how to solder this together, that’s easy enough, though the wiring is not exactly trivial. (Note: I do want the reader to have some perfboard and some wire, I’ll need to note the assumptions in the instructions.)

I’m thinking about building unit #2, documenting it for the instructions. Here, have a picture of the kit as ordered:

photo

The more interesting parts come after soldering. If I set up unit #2 to work with my Electric Imp, will it always belong to my account? Or can I transfer it later? Right now, until the code is settled, I want it to belong to my Electric Imp work space. But for the instructions for other people to follow, I don’t want that to be true.

I shot an email over to an acquaintance at Electric Imp, asking about transferring accounts. We’ll see what he says. In the meantime, I can use my current Impee (the SD card looking thing) in the newly built hardware. Once I’ve built it.

As I think about how to give this to Elizabeth, I’m finding more questions- is there one agent per Impee? Or does this agent cover multiple? I hope the former though it would mean replicating code. With the latter, I’ll need to name the Impees better and figure out how to store per-Impee configuration.

I haven’t worried too much about configuration. I sorta plan to do it via an HTML web page but I don’t have a particularly well thought out plan. I sketched up a possible webpage but plan to leave that very late in the game. If I’m designing for engineers, they’d probably rather change the parameters in code than have another piece to worry about (ok, that’s how I feel right now, I acknowledge it isn’t true for everyone).

AYOK configuration page

My brain is churning with all the things that need doing, that need considering. I think I’ll go solder parts. That should calm it down and clarify what the next steps are. Though, one of the next steps is to give Elizabeth working hardware, either tomorrow or next weekend. Ideally tomorrow.

 

h1

An LED in every plushie

April 10, 2014

Happily, one of my co-conspirators in the are-you-ok widget knows how to sew which means that we can progress to the next steps of development: productization.

Here is what it looks like now.

naked gadgets

That is distinctly not cute. The jar of frosted glass is to hide the LED, so it doesn’t shine brightly in my eyes, the glass diffuses the LED. This is not a long term solution.

Right now the LED color is related to whatever the acceleration is: if the board is in the shown configuration, then the LED shines blue. If I tweak it to be on one edge or the other, it shines red or green. I enjoyed playing with the accelerometer to color translation but it was always just a diversion, to make sure I could see what I was doing.

So, why is the device going to have an LED? It is important for the user to know the unit received their attention. But I also need to show errors: low battery and no WiFi connection. With an RGB LED, my plan was:

  • GREEN or WHITE = acknowledge
  • YELLOW = low battery
  • RED = no WiFi

But now that we are talking about building the plushie, there were many good questions about the LED.

Three LED options

I am currently using a simple, standard RGB LED. If we use it, we’ll have to put it behind something (i.e. fabric that passes the light or milk jug material to diffuse the glow).

There is another option. I have small LEDs that are intended to be sewn into a device, to be shown. We could make them into coat buttons (one green, one yellow, one read).

When purchasing for this widget, I got a larger (no more powerful, just physically larger) LED with built in diffuser. This lets the light be a nose or center of a bowtie, something external to the device. I finally connected it today, it looks really nice (taking a picture of a lit LED is not a good way to see it, let’s just say that diffuser creates a gentle glow).

Gentle green glow

The LED will be on a long set of wires, 5-12″ depending on what is needed. The wire leads (shown in the glowy picture) will be clipped so there is little or no metal showing but there will be about an inch of rigidity after the LED.

Either of the two RGB LEDs can be hot glued to fabric or their wires can be sewn into the fabric. Either way will secure them. The single-color LEDs have those easy-sew holes.

The accelerometer will also be on a five-wire cable. It can be placed away from the rest of the electronics and the battery. This will let it be in the hand if we want the user to shake hands to wake up the widget. Or it could be on the head and the user can pat it. (And this is why an accelerometer is superior to a button. (I hope!))

The rest of the electronics (battery, charging board, electric imp board and the connections) should all be low in the creature, keeping its center of gravity low to allow for upright posture of the animal. Further, the back should velcro closed; we need to program the Imp for the WiFi of the house: we will need access to it.

Next, the system is battery powered (USB charging). The USB port (or cable) needs a way to be inserted, ideally without slipping out all of the other electronics guts.

A few more thoughts on making the plushie: child-safe material is critical, nothing flammable. I will make the electronics as safe as I can but having something like nylon which is both electrostatic and amazing flammable, well, I strongly prefer felt.

h1

I need to sleep but can’t

April 8, 2014

In my ayok widget, I have a battery. To make it last, I want the high power things to sleep as much as possible.

The Electric Imp is the largest power consumer, followed by the accelerometer, and then the battery-monitoring fuel gauge.

Happily, the Imp has a low power mode. When I say imp.sleep(5.0) to sleep for five seconds, in low power mode. Though it isn’t a very low power mode, for one thing, the WiFi remains powered up.

They offer another mode, a deeper sleep more: imp.deepsleepfor(). In deep sleep, it consumes only 6uA (which is a tiny amount if you are a cell phone and a medium-to-large amount if you are a wearable device).

Foolish me, I thought I could replace my imp.sleep calls with imp.deepsleepfor calls, do a little bit of tweaking (i.e. tell the server I’m going to sleep), and it would work.

Suddenly my system kept crashing.

I feel like that represents my often-rocky interactions with Electric Imp. I still think it is a good platform for hobbyists but it is often deeply frustrating. When I first started working with (playing with?) the Imp, I wrote an in-depth review/rant detailing its shortcomings. I opted not to post it here, instead sending it to the Imp folks in hopes my time and frustration could help them make a better product. Some of those things have gotten better in the intervening six months but many things got worse. Let’s just say I wouldn’t dream of using it in a product and if things continue to be bad, well, there are other options for home hobbyists.

Anyway, back to my crashing system.

It turns out that sleep() returns to where it was but deepsleepfor() restarts execution. This is clear in their examples (but not documented in the text). There is a work-around: if the non-volatile RAM is configured, then the system has been booted before. If it has not, then this is a cold-start so I should configure the accelerometer. (I very sincerely hope that “reprogram the code” is considered a cold-start and erases the nv space.)

As a developer, I understand why this happens this way, my annoyance is primarily because I feel like they hid it from me. No, they probably didn’t. But yes, their documentation should be better.

I did fix the crashing (and not through their nv hack, instead they have a function that can tell me what the reason for the wake up is: hardware.wakereason(). Yes, I did implement the nv hack before finding that.

Now, my Imp isn’t crashing any more. I made some tweaks, trying to get rid of the slightly alarming note in the logs:

[Status] Device disconnected; 585 bytes sent, 0 received, 585 total

CaptureStatus

I couldn’t find anything about that in their documentation. But it is worrisome so I tried to remove it. My efforts led to my card not updating and the system not running at all. The error I got was unsatisfying.

CaptureHippos

I fiddled with it for a few minutes, updated this post. My device finally came back. But I think I’ve reached maximum annoyance level for the day. (If I’m going to be this frustrated, I want to get paid for it.)

h1

Debate with myself on blogging

April 6, 2014

I spoke at the embedded systems conference (EELive!) last week. Things went reasonably well, some events grated on me (and will for a bit though I suspect no one else noticed).

On Thursday afternoon, I gave a surprisingly well-attended talk, especially as it was near the end of the conference. My presentation was titled “What marketing won’t tell you about the Internet of Things”. Obviously, I fished for controversy.  However, once I talked mentioned my presentation was about how consumers were not being well-served by the IoT, particularly in the area of configuration, well, it wasn’t as contrarian (or iconoclastic, a word I like much better, or curmudgeonly, a word I like less well) as it might have seemed.

At the conference, I was asked by three different folks to write for them (four if you count UBM, the organizers of the conference, for which I have already written). None of them offered to pay me.

I’m honored to be asked but my time is valuable.

That probably lacks tact or subtlety or something.

Part of me thinks writing for well-advertised blogs is a good idea: it helps sell my book and I am currently looking for a new contract. It is just a blog entry or two (or four).

On the other hand, it is for their sites (two of which I can’t even read anything on because of the hideous amount of flashing advertising, two of which I haven’t read in the past so I don’t know the state of their blinkage). I can blog here if I want to, anytime, about anything; I don’t even have to edit it or use proper words in any sort of standard order. Also, no stupid flashing ads.

I don’t really advertise this blog and I can’t say I think many people read it. Strangely, this is a big plus for me. If I wanted more readers, I’d tweet more and crosslink from the podcast. But this is a forum I can use for half-baked ideas, where I don’t need to be a shiny-polished professional.

Back to the first hand. On one of the sites, an audience member for my talk wrote up a short set of blurbs from my talk but it boiled an hour long talk into a thirty second read; my talk made little sense if that was what you heard of it. It was great to get the write up but frustrating to read the comments because they seem to think I’m an idiot. I could do ~10 entries, using my slides and talk. If I wrote them all next week and slated them to release every week, it probably would be only about two days’ worth of work.

Back to the other hand, these sites depend on content. That is how they make money. Why am I doing their job for them? Why would I work for free so they can get paid? Exposure is insufficient, I’m feeling a little overexposed right now anyway.

Do I even want to get paid? We just did our taxes and more revenue streams makes for more complexity. Also, why would I work for less money than I do when engineering? That grates more than taxes: the blogs can’t pay me engineering rates, mine are too high. Working for less devalues my time. (But working for free is pro bono, a different compartment.)

I have many options for what to do with my free time:

  • work on educational, nonpaying personal projects (ayok widget, soldering things, this blog, our podcast, take an online class or two)
  • take a break from tech, exercise more and genuinely slack
  • fish for jobs, emailing friends and checking job boards (though most of my business comes from referrals so job boards don’t pan out)
  • write for other blogs, get exposure for podcast and book, maybe ask them to pay me though it will be at a fairly low rate
  • house and business chores (reconcile business bank statements, make a new website for Logical Elegance (one that loads faster and links to the podcast), gardening)

Given this list, how should I prioritize it? Actually, I think it is in priority order (if priority is akin to desire to do these things).

For the two weeks prior to the conference, I spent about an hour a day working on my presentation (this is the problem with hour long presentations, practicing takes awhile). I can’t say I don’t have the time right now, I could put that time into writing blogs. I will need to figure out which ones and what I want to say there. (Converting the presentation to blog posts would work on one of two of the options. Two others suggested topics, one of which requires somewhat-interesting research.)

To sum up: I’m ambivalent. In the short term, committing to someone else’s blog (or even a magazine) seems foolish, especially as I’m uncertain what I’d get out of it (other than a headache trying to read my post amidst flashing ads).