Category Archives: Feldman Project

Tom.DeVito 2-24-2011

Arduino research:

  • Found many links regarding the Arduino electronics platform:
  1. Explanation of different version:    http://www.ladyada.net/library/arduino/unofaq.html
  2. Tutorials: http://arduino.cc/en/Tutorial/HomePage
  3. 414 Arduino projects and counting: http://hackaday.com/category/arduino-hacks/
  4. Search engine for chips: http://www.findchips.com/
  5. Ada’s Store: http://www.adafruit.com/
  6. Sparkfun Store:  http://www.sparkfun.com/
  • I determined that the version we want is the Arduino Uno.  I believe that all latest versions have similar specs, but this one is probably the best for our stage of prototyping.  A smaller one, which mounts onto a board may be better once the electronics are finalized.
  • Due to the recession, DIP chips are getting hard to find because many producers are cutting costs by only make SMTs, which have higher demand.  This is making it so the arduino’s main chip is becoming increasingly rare.  There is a SMT version now to help keep up with demand.  I figured we should stick with the DIP chip while we still can.
  • The Arduino cannot directly control our amplifiers.  This can possibly be done using a gate to route the current through a volatage spliter maintaining a Float, open or close the gate with a second pin to bypass the voltage splitter to make a High and turn off the main pin to make a Low.  This may be easier to program then the current method because you just have to control 2 pins.  That said the Arduino can communicate with i2c devices like the rheostats
  • The Arduino is very easy to program.  Basically you just initialize and loop.  Communication to the device works very similarly to communication with the usb-i2c master chip.  Just set the arduino loop to listen to the com port and do various things depending on what it is sent.  On the PC side its identical to the i2c program, since the Arduino has more memory, I believe the commands can be in the form of char arrays as opposed to hex only.
  • When we were looking at ladyada.net you asked where do people get the time to do all this stuff?  The answer is MIT.  All the students are required to have a website.

Other Electronics

  • I’m going to call the murata company and see if we can get some samples of http://www.murata.com/products/catalog/pdf/p82e.pdf.   They are finger tip sized full-ranged peizoelectric speakers.  Currently I can only find them in quantities of 2000….  They really look perfect for our application but don’t think we will need 2000 til we start production.  (not to mention its still $5 each at this quantity)
  • There are some other options for speakers but I haven’ sen any that look as good as those.  Most speakers this size have a far more limited range of sound.

Amplifier Circuit:

  • Waiting on a few capacitors that were not at the electronics store.
  • Found a small portable break-out board to play audio with. http://www.sparkfun.com/products/9534.  Its has somewhat of an amplifier but only 7 volume settings so our amp chips will still be needed.
  • Needed a bigger breadboard to prototype this circuit.  Not nearly enough room on the one I have
  • Audio will be driven by the aurdino.

Tom.Devito (2-17-2011) – (2-21-2011)

2-17-2011

  • Got to a point with the audio amplifier controller which I cannot pass without testing my assumptions on the chips operation.
  • Chips came in but no adapter boards to mount them on yet
  • Resumed work on the OpenGL articulated hand.
  • Got one finger working, mirrored it to make sure all my assumptions were true.

2-18-2011

  • Still no adapters for chips continued to work on the articulated hand.
  • Added Camera function.  Had a lot of problems getting this working.  Almost all of these problems had to do with me putting things in the wrong place.
  • Noticed that there are some flaws with the current method of rotation.  Found this site http://stackoverflow.com/questions/2758501/rotating-in-opengl-relative-to-the-viewport which explains that you need to use quaternions to make it so you can spin the object without its coordinates flipping.  There is some example classes in java on this site.  Will look for a c++ class or transcribe this once I get the hand drawn.
  • Experimented a bit more with various OpenGL functions as  prepared to move the current work out of the sandbox.

2-21-2011

  • Moved out of the sandbox.  Set the stage, made a finger class with parameter(x,y,z,length)
  • Had many many problems getting this to behave properly mostly due to forgetting to initialize variables and other simple things eventually got it to draw right.
  • Was having a problem with the animation that it was jumping all over the place.  Thought this might be a real-time issue since the animation method was no longer in the top level glut program.  Read a bit of the chapter on real-time then I realized yet again  forgot to initialize yet another important variable….
  • All the animation I did so far was 2D.  I experimented with animating in 3d since the thumb is going to need this.
  • Random Thought:  It may be good to put a force based joy-stick on the thumb to help give it a greater degree of freedom then can be achieved with strain gauges alone.  The thumb has a great amount of 3-dimensional freedom that is essential to being able to pick up small objects.  I think this would work best if the surface is flat and it disables the extra freedom when you press in so that the thumb does not move around when you try to grab something.

Tom.DeVito 2.16.2011

Adding audio control to RCS System:

  • Moved comportsetup to the audio executive class because the com port should only be initialized once.
  • Changed the parameters of the SoundController constructor to have id, PointMass, and string.  The id is the i2c address, PointMass is the instance which corresponds to the finger, and the string is the name.
  • Ran into an error where it said SoundController couldn’t be instanced because it was abstract.  Realized I didn’t have postProcess() in my class.
  • Defined states and commands.

Testing the Hand:

  • Calibrated the amplifiers
  • Tested the code with Phil.  A few minor bugs were identified and fixed.

Tom 2.15.2011

Adding sound control to the RCS:

This post regards adding control of the TDA8551T audio amplifier to the RCS System.

  • To set the volume of the TDA8551T you have to send pulses high and low signals as relative to the float signal to raise and lower the volume.
  • Mute and operational mode is controlled by a second trinary switch.  The difference is that this one works on constant signal as opposed to pulses.  High signal puts the device in standby, float signal mutes, and low signal set it to operating mode.
  • Although I think that mute will be needed to silence the amplifier, if the lowest step is silent it would eliminate the need for the second switch to be computer controlled.  This would allow 1 AD5248 to control two amplifiers.  If it is needed we will need a second usb to i2c adapter for the fifth finger because there are only 4 address combination for the AD5248.
  • Most supporting methods are written with the exception of the one that converts collision to steps.  Need to work on an audio executive class as well as the core preProcess and decisionProcess methods.

NOTES:

Collision can be extracted from the corresponding PointMass object which can be found in the data dictionary.

After reviewing the phidgetsExec, it has become obvious why I would want a separate executive for audio.

Tom.DeVito 2.10.2011

Voice coil actuators:

  • These are really cool but really expensive.
  • They can output up 300lbs of peak force with a continuous force for 100lbs.
  • They are very responsive and maybe good for feedback if they weren’t so expensive because even if it wasn’t powerful enough to push your finger you would still feel the force.

Other Options:

  • Looked into some other type of speakers.  Surface transducers can turn any surface into a speaker.  The problem with these is that they are too big.
  • There are little speakers that are found in computer cases that I want to see if they will work.

Repairing the hand:

  • I am not usually one to personify inanimate objects but I’m pretty sure the index strain gauge connection hates me.
  • For whatever reason the glue was not drying quickly today.
  • Attached wires to terminal pad but not SG because glue wouldn’t dry quickly.

Tom.DeVito 2.9.2011

Repairing the hand:

  • Index finger is still not acting right.  Tried replacing the bottom just to get exactly the same resistance as before which is equal to the other working ones.
  • Replaced top one again.  Still 100 ohms too high.  Think this might be due to a groove in the metal.
  • Smoothed out the metal and put insulating layer on it.

Computer Controlled Amplifier:

  • Came across this website listing various amplifiers:  http://www.datasheetcatalog.com/function/Analog_and_Mixed-Signal_Devices/Signal_amplification/Audio_amplifiers.shtml
  • The one that looks good for our purposes is:  1 W BTL audio amplifier with digital volume control TDA8551
  • This IC is controlled by a trinary input(3 signals)
  • High signal is between 4.2-5 volts
  • Float signal is between 1-3.4 volts
  • Low signal is between 0-.6 volts
  • I was able to get these 3 signals using the i2c rheostats we have in combination with 500 ohms of resistance.  The power from the i2c adapter is connected to b1 with 500 ohms resistance and then w1 is connected to ground.  The voltage is divided at b1 so the signal is between Vdd and b1.
  • The mode is also controlled by a trinary input so one i2c rheostat chip(which has 2 rheostats in it) will control 1 amplifier using the two rheostats for each input.
  • We can only have 4 of these on one i2c bus so the fifth finger will need another usb-i2c adapter.

Calculating R2 for voltage divider:

R_2 =  frac{R_1}  {({frac{V_mathrm{in}}{V_mathrm{out}}-1})}
R1 = 500 ohm
Vin = 5
Vout = x (desired output voltage)

Tom.DeVito 1.4.2011

I2C:

  • Found out that com port was not being initialized properly.  Thought this might be due to cstring not converting to lcpcwstr.  Changed com ports name variable to char[].   This did not convert right either.  wchar_t is the correct type to convert to lcpwstr.  This was not the problem though.
  • For some reason, adding a colon after the COM4 made windows happy.  I don’t think this is always necessary considering it is in none of the examples.  How I figured this out was by adding a GetLastError() after the CreateFile call which gave me the error of 123 or file does not exist.  There were many different solutions to the problem and adding a colon doesn’t always work but this time it did.
  • Still can’t write to the register but at least I have a valid HANDLE now.
  • Figured out what was wrong.  To write to the register you need to send 5 bytes to the controller.
  1. Controller Command: This is different for different IC.  We want to use 0x55 because we want to talk to chips that have a 1byte internal address
  2. Address of the chip: These will be 0x5z. z will depend on how the address pins are set.  If both address pins are set to group 0x58 is what you want to send.
  3. Internal Address bit:  0x00 is what I used,  I believe 0x80 will give you the second register but i am not positive.  You can also mute with this byte again not tested yet.
  4. How many bytes of data will be sent:  In our case this is 1 do 0x01.  This is what I was missing when I tried this before.
  5. Step number you want in hex:  Put in whatever range you want 0-255 decimal in hex form.  It is approximately 40 ohms per step.

The way this looks in c

void changeResistance(){

BYTE sbuf[100];
DWORD n;

hCom = CreateFile( temp, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
//set-up com port settings
if (INVALID_HANDLE_VALUE == hCom)
{
printf(“Error: Could not open the RS232 port!”);
getch();
}

sbuf[0] = 0x55;  //controller command
sbuf[1] = 0x58; //address
sbuf[2] = 0x00; //internal address
sbuf[3] = 0x01; //# of bytes to be sent
sbuf[4] = 0x0A; // steps of resistance
WriteFile(hCom, &sbuf, 5, &n, NULL);
ReadFile(hCom, &sbuf, 1, &n, NULL);

getch();

}

Your supposed to set-up the com port settings which is not shown here.  The ReadFile is not really used in this program but would allow you to read the data you just put in to confirm it.

Repairing the hand:

Repairs are almost completely done.  Everything is attached and most of the pairs are responding with good sensitivity. The only pair not working is the index finger.  For some reason the top was settled 100ohms higher then it was supposed to be.  Ground off this connection and glued a new strain gauge and terminal to it.

Tom.DeVito 2.3.2011

I2C:

Still not working but here are some notes.

  • The usb-i2c adapter has the pull up resistors for the sda/scl lines built into the pcb.
  • start, stop, acknowledge bytes are handled by the i2c master and do not need to be done manually
  • Finally figured out how to use the i2c test application.  The chip seems to be working but it is changing the values for both registers instead of only one.  At least I know the address I was using is right.  I think the c program is not writing properly because whenever it writes, a green led should light up on the adapter.

Tom.DeVito 1.28.2011

Noticed I never published my blog for yesterday

3D articulated hand with force feedback:

  • Noticed that the solar system is technically a joint so this is a good place to start from
  • Mapped out the measurements and angles of my hand in order to get an idea of scaling ratios and required degrees of motion
  • Going to start with the finger tips and work my way down the hand.
  • The palm and thumb are going to be tricky because its made up of oddly shaped polygons
  • Read up on 3d vector physics a bit

Repairing the hand

  • Wired up the hand.  Only broke one connection others seem good.  Flux helps a lot.  It seemed to protect the gold leads and lower the specific heat of the solder.
  • All connections are giving proper resistances but I have not tested them on the SG amps yet.

Tom.DeVito 1.25.2011

Visual Studio Issues:

  • Tried to compile RCS System and I keep getting:  ERROR spawning ‘RC.exe’
  • I thought this might have been because my libraries were in the wrong spot but then I noticed that I could not compile any C++ programs.
  • Forums say to reinstall VS 2008 or install vc++ components
  • If you have this problem and need to look up you VS key, this post will tell you where to find it:  http://stackoverflow.com/questions/529064/visual-studio-2008-product-key-in-registry
  • Download for VS 2008 pro kept stopping.  Going to try to download it at home.
  • Installed VS2010 because we had it.  Using it for now but I still want to get 2008 back on so I don’t have to worry about the projects being compatible.
  • ctrl+j forces the auto-complete to pop-up when programing in VC++

Learning 3d opengl:

  • While waiting for the terminal pads and other components to come, I have decided that it would be good to take another look at openGL so I can be more useful on the software side of the project.
  • Previously, I only used opengl to make a 2d sliding box with friction, for testing our first prototype.  This was very simple because the camera could be straight on and there was only one object to worry about moving.
  • Phil recommended that I make a planetary system with 3 planets, moons around the planets, and moons around the moon to practice the basics.
  • I am going to read through the openGL book tonight and start trying to make the system tomorrow.  If the pads arrive, I will start attaching them first so we can get the hand working.

Tom.DeVito 1.24.2011

Simulation Physics:

  • The Havok physics engine, commonly used in video games, is free for academic purposes.
  • Pretty sure we can use this but it might be overkill.
  • There is another popular one that is open source called bullet
  • Cannot find any inventory of what functions are in the libraries.  I don’t know if you can get impulse forces from this.

Integrated Circuits:

  • Reviewed the soldering techniques video from youtube.  The maker of the video has a website: http://store.curiousinventor.com/
  • Lots of good guides and projects there
  • Found a pcb board simulator with guides for how to use it on his site.
  • The AD5248 seem to be a good digital potentiometer.  It is 2-bit addressable, has 10k ohm resistance, 2 circuits per package,and 256 steps.

Thomas.DeVito 1.21.2011

MISC:

  • Spent most of the day switching and setting up the printer for people
  • I could not find the hp solution center software for windows 7.  This is needed to set a destination for easy scanning

KF:

  • Still looking for a good chip to control the gain on our amplifier chip
  • I2C needs to have a 1k resistor connecting each signal to 5v coming from the usb-i2c adapter.  This is called a pull-up resistor not sure why its needed.  Pull-up is when you connect something to the high side, pull down is when you connect something to the low-side or gnd.
  • So far I have found big chips with large resistances and tiny chip with good resistance range.  I am leaning towards a 14 pin tssop package which will need an adapter(tiny but at least proto advantage sells the adapters).  The optimal resistance of the i2c variable potentiometer is 5k ohm  which will be in series with another 5k ohm fixed resistor.  The reason 5k is the target rating is because the mechanical variable pot we have has a maximum for 1ok.  The max volume we want happens around 7680 which is approximately half of the maximum resistance of the variable pot in series with a 5k resistor.  Each step in a 7bit(128 step) 5k variable pot is each to about 40 ohm, which means we have roughly 36 steps of control over the volume range we want to use.  Most of the chips I am looking at have dual potentiometers which means we will only need 3 to control 5 fingers.
  • Tried putting a resistor between the + side of the amp output and the speaker to see if anything good would happen due to confusion of how one of the ICs worked.  Nope nothing good happened as expected so I must have been misreading tat ones documentation.

Thomas.DeVito 1.20.2011

Computer controlled amplifier:

We need 5k ohm digital potentiometers, more of those amplifier kits, and an i2c multiplexer to route the signal.  The other chips will be useful when we want to make every thing smaller.  The steps are limited but with the right configuration of resistors, I should be able to get the range we want.

I am going to have to double check the sizes to make sure they are all workable.  There may also through pin versions of the circuits.  Surface mounting isn’t too hard but it does mean that you need a PCB.

Strain gauge durability:
The BTP-5 strips have best spacing between the terminals.

Things I need to buy:

  • Fine soldering tip
  • Fine solder
  • Flux

Tom.DeVito 1.13.2011

Hand interface:

  • Added more glue to protect the strain gauges.  Need to let this dry.
  • Applied circuit mounted strain gauge to one of our sensor sticks to see if it will A. adhere properly, B. be more durable the the others, and C. be sensitive enough.  Most likely I will stick with using the standard gauges for this prototype but I wanted to look into the others.

Learning Electronics:

  • Now that I have a basic understanding of the electrical theory,  I switched from my physics book to Bebop to the Boolean Boogie.  So far its mostly bee a reinforce for what  learned in physics 2 but this book is more focused on EE.
  • Have read the first 6 chapters

Some revelations

  • semiconductors are isolators in their natural state but can be treated with other elements to carry negative or positive charges through a doping process.
  • have a bit better understanding of ohms law(V=iR).  This is very important in understanding the relationship between voltage, current, and resistance
  • diodes only allow electric to travel one direction.  If it goes the other way it is considered off.  This can be useful to translate A/C circuits to binary D/C circuits.  Not sure what their other functions are.
  • Capacitors still confuse me.  Apparently they act as off switches when they are filled and power sources when voltage drops.  Will have to read the chapter on RC circuits it may help my confusion.
  • Resistors of the same rating will greatly increase the current at higher voltage.  This makes sense mathematically with i = V/R but is not how I thought they worked.
  • Transistors are super fast switches.  The first computer used electromagnetic switches and took 6 seconds to do simple multiplication problems.  Triodes(tubes) were also used as switches but were also very bulky and slow.  Diodes and transistors are semiconductor switches and are much faster and more compact then their predecessors.  The next iteration will probably be a quantum switch but they are having coherence issues with these devices at the moment.  I believe this type uses a fiber optic system instead of silicon based.

Tom.DeVito 1.11.11

  • Experimented with some of the circuit simulators(spice, qucs, oregano).  Not a lot of luck finding a model database for the ICs we want to use.  It is possible that they exist but I only figured out that they are called models a couple minutes ago.  A little surprised that the manufactures don’t include this with their documentation, since it seems spice is a standard, but maybe they want you to burn out a couple chips before you get it right….  I am not quite sure how the models(text files) are built.  It may be possible to build it based of the data in the data sheet for the circuit.
  • We need to buy 8 * DS4420n found at https://shop.maxim-ic.com/storefront/priceavailable.do?Partnumber=DS4420N%2B&event=PartSearch&menuitem=PriceAndAvailability.  We only really need 5 but they are cheap, so its good to have extras in case some get burned out to avoid more shipping fees.
  • We also need http://www.i2ctools.com/products.html#USBtoI2C.  I think we should get the elite because the elite can talk directly to slave devices while the pro can only talk to master devices.  The DS4420n is a slave device so we would need some type of intermediary if we got the pro.  The elite also has a much fast bandwidth closer to usb which may be needed sometime.
  • Address for DS4420n are set by routing the a0 a1 a2 pins to either gnd of vcc.  gnd makes the bit 0 vcc makes the bit 1.