28 May 2010

A circular ring of electrodes with a power gradient facing North

Lepht wants to know where North is. However, instead of buying a compass, she's decided to turn herself into one. What sort of self-respecting transhumanist wouldn't?

I have some tcheuchter friends who claim to always know the direction of North, but that may just be because they've never left the Moray coast.

This post starts with some further ideas for making Lepht's invention run smoothly, and ends with edited comments from Lephts original post, in order to provide a record for them. If you have no freaking idea what I'm talking about, then it may be an idea to start reading from below the horizontal rule. Otherwise: onwards!

If you are going to have some sort of gradient, it may be wise to write a small program which would allow you to see graphically the power output at each electrode.

Otherwise, you might end up with all sorts of problems. For example, using my solution you might find that too many electrodes are powered on, which doesn't really indicate north very well. You might want to vary the steepness of the parabola by multiplying the quadratic term by a constant. The effect of this would be that electrodes further from North may receive more or less power.

Writing a small program would allow you to experiment with the variables, until you find something nice, a comfortable time before lots of blood is involved.

That's my thoughts at least.



The rest of this post is derived from comments on Lepht's blog, though it isn't a rip-off - I wanted to summarise the thoughts we had so far in its own blog post, so that anyone who wanted to see what we were thinking could do so without looking through comments.

Lepht proposed the following Microcontroller code:


while (poweron)
get north direction from compass module;
cast to a degree out of 360;
figure out which electrode's "domain" that number falls into;
activate that electrode;


However Max had an idea for improvement:

"the whole thing could be a lot better if you could get it to produce a gradient of current between electrodes, so that when north is between two electrodes, you have both firing at half power instead of the signal snapping to one of them."

My comment was a proposed solution:
The sort of function we might use may be a quadratic with a parabolic graph.

y = P - (x - n)^2

Here P is the maximum power, n is north's angle round the leg, and x is the electrodes angle round the leg. y is the power of the electrode at position x.

This graph has a maximum at (n, P) which is what we're looking for.

That then might be a suitable function. y is the power of an electrode at the angle x round your leg. Or in (untested) C

/* Return the power of an electrode at the angle round your leg 'theta', given that the direction North is at the angle round your leg 'north', and the max power to be emitted by an electrode is 'power' */

float electrode_power(float theta, float north, float power)
{
   return power - (theta - north)^2;
}