H-Bridge

What a clever piece of engineering, the transistor H-Bridge!  By switching the load transistors via the other pins, it’s easy to control a heavier load than the Arduino can manipulate directly.  And, more importantly, the H-Bridge can change the direction of the current, essential to the Media Controller project!

Serial Communication II

Serial Communication 2 

ASCII     BIN                DEC     HEX    OCT

Õ           11010101     213     D5      325
Õ           11010101     213     D5      325
Õ           11010101     213     D5      325
Õ           11010101     213     D5      325
Õ           11010101     213     D5      325
Õ           11010101     213     D5      325
Õ           11010101     213     D5      325
Õ           11010101     213     D5      325
Õ           11010101     213     D5      325

What does that mean?  it’s the output from my potentiometer, in four formats:

ASCII – the value (0..255) is mapped to the ASCII character table, changing a voltage into a character, in this case a funky O with tilde

BIN – the value in binary.

DEC – decimal value 0..255

HEX – hexadecimal (base 16) 1234567890ABCDEF.  Useful for John Norton and the kernel team ("the people who do their taxes in hex")

OCT – octal (base 8)

Taking the double-potentiometer serial feed into Processing, I get a neat James-Bond intro scene-like ball on a black screen.

 

note: the jumper wire replaces the SPST momentary switch in the instructions, I only have two hands!!

Handshaking is a more elegant solution to the problem of parsing a data feed from a source, compared to taking a delimited string and parsing that which could be subject to a lot of potential problems, like getting an ambiguous character and misreading.  Handshaking is perhaps less efficient, but is a better idea when you can have bidirectional communication.

>>screenshot<<

hello
hello
hello
hello
hello
301,772,0
301,772,0
301,772,0

>>    <<

Handshaking wouldn’t be a good system when you can only send or only receive on each end, so consider the hardware for the application before choosing the method of communication.  Handshaking would be a particularly bad idea for a bug.

Anti-Engineered

Money!

 

“press Cancel for credit?”  makes no sense.  I’m a professional usability expert, member of the Human Factors and Ergonomics Society, and for the life of me I can’t figure out why what seems to be multiple makers of credit/debit card terminals for customer use all have the same flaw.  Maybe they are all made by NCR and aren’t branded as such, but there is something deeply wrong with (A) prompting users to enter their PIN as if it were a debit card transaction, (which charges the user a cash withdrawal fee) or sets the transaction up as a cash advance (with exorbitant fee); and (B) making Cancel be the button to press – and of course having no onscreen instructions.  You could make the case for evil intent, in which case this is a good (evil) design from the persuasion point of view, or somehow a really big oversight was made.  The cashiers always have to tell the shopper what to do with these, slowing down the checkout process, and giving everyone a headache.  NCR: thumbs down!

The Radar-Range

– detects planes and melts chocolate bars in my pocket?  Brilliant!

IMG_0451

What happened to the old-style microwaves with the clockwork dial timer and no fancy features?  That seemed to work ok for Raytheon’s 3000w liquid cooled microwave powered by a military grade magnetron, but I’ll concede the touchpad in the modern age.  And I’ll even bow to some of the ‘one touch’ features, which may be controlled by a moisture sensor (although the auto settings seem to overcook things).  But the GE in my apartment, and the similar one my grandparents own mystifies me and everyone else in terms of usability.  Why do some of the numbered keys code for “x minutes”, rather than being just numeric entry?  At least they have a label which says “Express Cook” to differentiate them from the regular number buttons which do nothing unless you press “Time Cook” first.  What’s so bad about just punching in a time and pressing start?  And for the overachievers or those who really want control, pressing another button or set of buttons for power level?

Sample order of operations to do 1:30 at 50% power:
1
add 30 sec
Power Level
5

to do 1:45:
Time Cook
1
4
5
Start

but the error modality is if you press 1 first, it instantly starts cooking at maximum power for 1 minute – but I’m not done programming!!  in their effort to streamline, they made it less transparent and tractable, and end up confusing people like usability professional me and nonegenarians like my grandparents, whose microwave oven is more unintelligible – what is the difference between ‘cook’ (program cooks food, based on instructions hidden behind the door) and ‘Micro Cook’ (enter time to cook whatever’s in the radar-range)

Wash Day

what’s the difference between “Bright Colors” and “Colors”?  Apparently, Bright Colors is cold wash, cold rinse, and Colors is warm wash.  It would be nice to know that before starting the cycle, but at least you can see on the LCD panel what it’s doing (for cycles other than Permanent Press, and how much money is on your card.  But what’s this mystery “Super Cycle” feature that’s an extra 35 cents?  how does one activate that?  Why would I want a Super Cycle?  No one I’ve talked to has used it or knows what it would do.

IMG_0453

Fortunately someone worked out a table explaining what the different buttons do (this just arrived):

IMG_0454
but this information should be on the washer itself, rather than on a sign on the wall, presumably added after complaints of gray and pink clothes to the washing machine company.

Another cost saving poor design choice is the lack of contrast on the signage in the soap hatch

IMG_0458 
it actually looks much better with the flash on – but it’s relatively easy to figure out what the hoppers do, especially by looking at the behavioral traces (the soap debris in the topmost hopper).

A few years ago at the HF/ES national convention, I talked to a woman who works for Whirlpool – apparently, there is something to the “permanent press” cycle being better for permanent press (minimal-ironing) clothes.  And warm water does work better for cleaning, as sebum (a waxy substance in sweat) dissolves at a temperature near body temperature.  And the soaps dissolve and disperse better in warmer water—unfortunately do do dyes and heating the water takes more energy (indirectly or directly using hydrocarbons and contributing to global warming). 

While the perfect product may be nonexistent or at least incredibly difficult to make, so many relatively simple things get overcomplicated and confused.  Simplicity and parsimony are good rules to follow in design, as is “do a lot of usability testing”—which is my background and professional field.

The Sea Anemome

For the stupid pet trick, I decided ‘hey why not build the stupid pet instead?’
 
so I made a sea anemone.  The light show varies in intensity with flexion of the flex sensors.  The flex sensors aren’t as impressive looking as one would hope, but I’d rather not break them.
 
 
The Arduino Code:
 
// Sea Anemone
// light show changes oscillation brightness with flex sensation
// declare and initialize variables
//input pin assignments
int flexPinA = 0; //Left Side flex sensor pin (0)
int flexPinB = 1; //right side flex sensor pin (1)
//initialization of input variables Flex value A and Flex B
int flexValueA = 0; //initial value for flex A
int flexValueB = 0; //initial value for flex B
//output Pin assignments
int greenPinA = 3; //PWM pin for Green LED A :: PWM digital 9
int greenPinB = 5;
int greenPinC = 6;
int bluePinA = 9;
int bluePinB = 10;
int yellowPinA = 11;
//random storage variables
int randA = 0;
int randB = 0;
int randC = 0;
int randD = 0;
int randE = 0;
//output storage variables (g/b)
int greenA = 0;
int greenB = 0;
int greenC = 0;
int blueA = 0;
int blueB = 0;
void setup ()
{
  Serial.begin(9600); //initialize serial comm @ 9600bps
  randomSeed(analogRead(5)); //initialize random number generator with random noise on unused analog pin (5)
}
void loop() // output stage
{
  flexValueA = analogRead(flexPinA); // read value A
  flexValueB = analogRead(flexPinB); // read value B
//debugger panel: raw input
  Serial.print(flexValueA); // print flexValueA to debugger
  Serial.print(",");
  Serial.println(flexValueB); // B to debugger
  flexValueA = map(flexValueA, 500, 250, 0, 10); // map flex sense value (0..1023) to output range for PWM output 0..255
  flexValueB = map(flexValueB, 500, 250, 0, 10);
/*
//debugger panel: scaled input
  Serial.print(flexValueA); // print flexValueA to debugger
  Serial.print(",");
  Serial.println(flexValueB); // B to debugger
*/
 
  randA = random(0,20); // random number between 0..128 (PWM half brightness)
  randB = random(0,20);
  randC = random(0,20);
  randD = random(0,20);
  randE = random(0,20);
 
  greenA = flexValueA * randA;
  greenA = constrain (greenA, 0, 255);
  greenB = flexValueB * randB;
  greenB = constrain (greenB, 0, 255);
  greenC = flexValueA * randC;
  greenC = constrain (greenC, 00, 255);
  blueA = flexValueA * randA;
  blueA = constrain (blueA, 0, 150);
  blueB = flexValueB * randB;
  blueB = constrain (blueB, 0, 150);
/*
  //debugger panel : output
  Serial.print(greenA); // print greenA to debugger
  Serial.print(",");
  Serial.print(greenB); // println Flex value B to debugger
  Serial.print(",");
  Serial.print(greenC); // println Flex value C to debugger
  Serial.print(","); 
  Serial.print(blueA);
  Serial.print(",");
  Serial.println(blueB);
*/
 
  analogWrite(greenPinA, greenA); // Green LED with random value + scaled flex value A  0..255 range one byte
  analogWrite(greenPinB, greenB);
  analogWrite(greenPinC, greenC);
  analogWrite(bluePinA, blueA);
  analogWrite(bluePinB, blueB);
  analogWrite(yellowPinA, greenB);
 
    delay(125); // delay
}