Gigs and Collaborations
Wanted: programmer and build advisor
Topic: Wanted: programmer and build advisor
(Read 997 times)
Wanted: programmer and build advisor
Aug 28, 2012, 10:43 pm
I'm looking for a programmer for my project who can also give me detailed instructions on how to assemble the components (I prefer text and diagrams to video). I can follow directions well, but like a robot, if you skip a step I might not fill in the blanks properly (I once had a teacher ask us to write pseudocode for a robot to perform our morning routines before going to class. Several students ended up with busted doors, as they forgot to write "open door" before "leave/enter" or "get in car", and some soiled themselves as they forgot "remove pants" before "use toilet" - yes, I know you could specify "get in car" and "use toilet" as routines that include opening the door and removing pants, but that wasn't called, either).
Anyway, the code is probably pretty simple from what I've seen. It is simply to control servos in response to brainwaves from an
, which uses Bluetooth to transmit its signals.
You may have seen
. It's a cute idea, but the movement just doesn't read properly to me (I have owned dogs and cats, and been around horses and rabbits, and not one of them rotated their ears forward to fold them down). I eventually saw the Arduino system and figured "Hey, build one!" (plus, this means the $100 headset isn't tied solely to a silly pair of ears and I can reuse it for anything else I'd like, whereas buying the Necomimi directly ties the headset and ears together).
Now, yes, I know about
Josh DiMauro's version
. However, his movement style is fairly similar, and it only reads the "Attention" signal from the regular Neurosky headset, ignoring "Meditation" entirely. His instructions also don't include how to connect the headset to the Arduino so it can see the output.
This is a diagram of the setup I conceived:
The tilt servos are hidden inside the ear fur fabric and attached to soft foam which can be bent and flexed easily to move the tips of the ears (I'm a crafty sort by nature, so I have no problem with creating stuff from foam and fabric; it's hardware and code that gets me). These respond to the Attention value output from the headset. At 50%, they rest in the neutral position. At 100%, they rotate "up" 50 degrees, "up" defined as counter-clockwise for the left servo and clockwise for the right when looking up the servo from base to horn (50 is the maximum rotation needed; the other 40 degrees are ignored). At 0% attention, they rotate "down" 50 degrees in the opposite direction, tilting only the ends of the ears.
The rotate servos are attached to a headband (simple craft headband; this headband is in turn held firmly in place by the XWave's elastic sweatband being wrapped over it) and support the tilt servos on their horns. These servos face out from the head and up at about a 45 degree angle to position the ears properly relative to the face. The neutral unrotated servo position actually corresponds to 90% Meditation; at 100%, they rotate ten degrees "up" (again, counter-clockwise for left and clockwise for right), and at 0%, they rotate a full 90 degrees "down". This rotation moves the entire ear from base to tip. I've played with 3D Max mockups I created and this scheme suits me more than the Neurowear system.
I also have designs for an accompanying tail system, which Neurowear has yet to create. Servos one and three move in tandem opposite each other, rotating between 20 degrees "down" at 100 Attention and 70 degrees "down" at 0 Attention (this means the servos are moving one degree for every two units of Attention, rather than one for one). These control the general angle of the tail, if it is up (attentive) or hanging (chill). Servo two responds to Meditation, being completely still at 0 and making a left-right sweep of 100 degrees (50 in each direction) at 100 Meditation. This controls the wag of the tail, wagging more when relaxed and less when stressed. The rest of the tail is made of simple joints and foam and just carries the motion of the servos at the base (like wiggling the end of a piece of string and seeing the movement roll down the string in waves).
If at all possible, I would prefer to have the Arduino check XWave values four times per second (evenly spaced, of course). The ears and outer tail servos move in time with this check, jumping to their proper corresponding values (there is no "this makes ears stand up still, this makes ears hang limp, this makes ears twitch"; they simply move exactly to the value of Attention or Meditation specified. Yes, they will be constantly moving; most animals' ears do, even if it's just small adjustments). It is best if they all move in time with one another, but it is IMPERATIVE that the two tail servos move together, as they're both supporting the third servo between them (using only one could cause twisting and lopsidedness), and it would look best if the two tilt servos and two pan servos could also move as a pair if full synchronization is impossible.
The central wagging tail servo is only updated twice a second: at time 0.00, it begins its wag to the left; at time 0.25, it reaches the extent of its left wag and begins its return to center; at time 0.50, it reaches center and the Arduino sends a new Meditation value to determine how far to the right it wags; at time 0.75, it reaches the extent of its right wag and begins its return to center; at time 1.00, it reaches center again and the Arduino sends a new Meditation value to determine how far to the left it wags for the next cycle.
If the headset only updates once per second (I haven't been able to find a definitive listing of how often it reads and outputs), that is fine as well: just use the Meditation value for the full wag cycle, symmetrically left and right, and have the ears and tail tilt only move once per second with each update.
The servos I'll be working with are the small TowerPro 9G micro servos. I am unsure if it would be best to buy a regular Arduino and BT dongle, or to buy the BT Arduino system; please advise, either on what you think is best or what you're most comfortable working with in programming. Since I want to run seven servos simultaneously, whatever I get needs to be able to handle this. Also, the XWave Sport preorders don't begin shipping until September, so working with the actual device isn't possible at present (will need to use a potentiometer or similar program as a stand-in to create fake Attention and Meditation values for testing anyway, as I don't think I know how to produce specific EEG patterns on command).
For your part, aside from creating the program to control this symphony of servo madness, you'll also need to be able to talk me through wiring, such as connecting the servos to the breadboard and the breadboard to the Arduino ("connect power to ground" means little to me; I work better with "take the black wire from the battery box and connect it to this place on the Arduino next to this highly-visible label"), and then walk me through pairing the XWave BT to the Arduino setup. I'll build it all myself, so we won't need to ship materials back and forth, but I need a guide who's patient and can respond within at least 24 hours or so to utter n00b nonsense questions (there is no final delivery date specified; it's just "when it gets done", so if you're busy I can understand). In return, you will receive a small amount of compensation upon successful completion of the project (with a little bonus if you are extremely helpful and patient, or if I royally screw something up and you save my bacon). I don't anticipate the code being extremely difficult after the BT pairing and data acquisition portions (moving servos is moving servos, after all), but I have dug up some resources.
Things which may be helpful to you:
XWave Logger software
- This is the actual app used to communicate between the XWave headband and the PC.
MindSet Communications Protocol
- While this is a different headset, it is based on the same Neurosky chips outputting the same EEG bands and eSense values (Attention and Meditation).
Mindwave & Arduino tutorial from Neurosky
- Neurosky's instructions on how to deal with their data set, grabbing the Attention and Meditation values, etc.
kitschpatrol's Arduino brain library
- Arduino code for dealing with Neurosky data as an ASCII string.
DiMauro's Arduino sketch
- This is what Josh DiMauro used for his ears.
Your help is greatly appreciated!