how to make [almost] anything mas.863.12   work about
   
 
                   
 
 
   
 
                   
 
input devices_week 8  


custom sensing

The focus of this week was to continue to test the possibilites of rapid prototyping custom electronic input devices. The task was to create a board or boards with a sensor, sense real-time feedback and read out the results.


   
   
 
 
   
 
                   



There were various shop stocked sensors available to prototype boards with for this week. I opted to test two different sensor boards: a photo or 'vision' sensor and a temperature sensor. Both of these board prototypes will be part of the lineage building up to both the final project as well as internal group research.
   
 
 
 
   
 
                   



The use of the fab modules for loading board images and sending them to mill has become a very quick and easy way to get from design to a milled board in the shortest time.
   
 
 
 
   
 
                   



Milling of the temperature board.
   
 
 
 
   
 
                   



File prep for the traces of a second board.
   
 
 
 
   
 
                   



Milling the traces of the light sensor board.
   
 
 
 
   
 
                   



In previous weeks I found it very useful while waiting to mill to pull all of the components for your board.
   
 
 
 
   
 
                   



This week was no exception and pulling parts and labeling really speeds up the soldering process as you are not trying to track down and missing parts as you complete the job. Above is the soldered temperature sensor board. The actual thermistor is the green resistor-like part.
   
 
 
 
 
   
 
                   



The soldered light sensor board with 6-pin FTDI connector.
   
 
 
 
   
 
                   



Programming of the boards this week required a few additional downloads to get started. The first dependency was py_serial. The easy way to install py_serial on mac osx 10.7 is by running " sudo easy install py_serial " from the terminal (thanks to dan swada for the tip).
   
 
 
 
   
 
                   



Also critical for this week was to be sure that th FTDI serial drivers were installed. This is best achieved by going to the FTDIChip website and running the appropriate installer.
   
 
 
 
   
 
                   



As I have been working back and forth between both processing and python for design scripting I again tried this week to work the the arduino environment to program the boards and python to interact with the serial readings. Above is the C code for the hello_temp board compiled and run within the arduino environment. It is important to note that you must first choose the correct chip and clock speed and burn the bootloader to your chip before uploading the c code, otherwise it is possible to burn up your board.
   
 
 
 
   
 
                   



Above is the C code for the hello_light board compiled and run within the arduino environment.
   
 
 
 
   
 
                   



At this point I ran into trouble when trying to interface with the serial port. Be the above listed dependencies are installed and to choose the proper usb serial port.
   
 
 
 
   
 
                   



Trouble shooting listening on the serial port. Initially the attempts to run the hello_light.py interface were failing. If this is the case double check your FTDI connections. Unplug the board from the cable and then the cable from your computer. Try running " ls /dev/tty.* " to check what is happening with your usb devices when all are empty. Then repeat after connecting just the FTDI cable. The cable has its own chip. Run the ls dev..... again. Check the status and then finally plug your board back in and try to run the .py code for serial interface.
   
 
 
 
   
 
                   



At this point I was finally able to get the python code to run and launch the serial reading. As you can see from the image above something must be awry with either my board or the c code because the sensor is almost fully maxed out with no variable readout. This board will require further debugging...
   
 
 
 
   
 
                   



Luckily this week I practiced a bit of spiral development and was developing a temperature board in parallel. I was able to upload my c code to this board and launch the .py script for interface but I kept getting an error on running the .py code from the terminal telling my I did not yet have numpy installed. After many failed attempts to get the light sensor board working I made a last ditch effort to return to the temp board and run an easy install of numpy. The easy install worked as hoped and I was finally able to launch the serial interface and read variable sensor data from the thermistor. -- In the coming weeks sensing will become more and more important for machine feedback so I am hoping to continue with the development of some of the input devices.
   
 
 
 
 
   
  -- jared laucks -- © 2006-2012 --