Saturday, April 30, 2011

The Frankenbotic Thinganator - Making Stuff from Junk

Step One:  A trip to the local dump and a computer repair shop.  Both free, got one older dot matrix
Lexmark and a newer inkjet Dell printers.  Physical teardown took approximately two hours including
torch desoldering of relevant ICs.  Except for a handful of potentially useful-looking hardware and screws
for the bins, the plastic and metal carcasses of the printers are then disposed of.




 




Teardown of the Lexmark gives us several stepper motors, ranging from small low-torque ones, all the
way to a NEMA 23 and one other high-power stepper motor.  The Dell inkjet gives up a nice standard DC motor, as well as another mid-power stepper motor.

 


 






 
In addition to the motors themselves, a quick pass with a desoldering torch and we can reclaim the
driver IC's, a few power transistors, a few Darlington arrays, and some other miscellaneous
parts.

Wednesday, April 6, 2011

Arduino Light Pen!

  A simple Light Pen, created using the TVout library with the Arduino and a simple phototransistor sensor. 


#include <TVout.h>
#include <fontALL.h>
#include <video_gen.h>


long s1,s2;
TVout TV;
int sz=8;


void setup() {
TV.begin(0,128,96);
TV.select_font(font6x8);
}


void loop() { 
  for (int x=3; x<112; x=x+16) {
    for (int y=32; y<40; y=y+16) {
      s1=analogRead(0);
      TV.draw_rect(x,y,sz,sz,1,1);
      TV.delay_frame(2);
      s2=analogRead(0);
      TV.draw_rect(x-2,y-2,sz+5,sz+5,0,0);
      if (abs(s2-s1)>10) {
      TV.draw_rect(x-2,y-2,sz+5,sz+5,1,0);
      TV.delay_frame(5);
      };
    };
  };
 }


Virtually any light sensor will work, as long as it can provide an output that can be handled by the ATMEGA328's Analog to Digital Converter.  For the simplest form, a CDS photocell simply connected to +5v on one side and the Analog 0 input pin on the Arduino on the other may suffice.

To increase sensitivity or adjust response, a simple voltage divider can be created by adding a variable resistance between Analog 0 and Ground with the above sensor.