retrointerfacing

- connecting past and future -

Archive for May, 2010

Beamer autostart

with 2 comments

For a public display a beautiful LG HS200G LED beamer has been used which can play from USB data sources. However, no autoplay - autostart function was included. The beamer has been connected to a power source with timer switch. However, somebody still needs to push the on-off button, go trough the menu etc..

The projector is used for back-projection in a window, using standard LEE 216 filters ‘White Diffusion’ as projection foil.

A simple solution has been made using an Arduino Nano (any Arduino or Atmel AVR will do) and the Arduino IRremote library Using the example sketches and one TSOP17xx IR receiver chip, the codes used by the remote for powering on/off, starting USB, left, right, menu, ok etc.. were located. (In this case an NEC protocol). After that a simple Arduino sketch was made using IRsend commands and delay’s (for example a delay of 15 seconds between powering on and going to the USB menu). See wiki for full code and documentation.

#include <IRremote.h>
 int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
IRsend irsend;
 decode_results results;
// remote control definitions
#define on 0x20DFB54A
#define usb 0x20DF3EC1
#define ok 0x20DF22DD
#define down 0x20DF827D
#define left 0x20DF609F
// sequence to get the beamer playing:
typedef struct {
 unsigned long time;
  long code;
} remoteAction;

remoteAction beamerShow[17]={
  {5,on},{20,usb},{23,ok},{24,ok},{25,down},
  {26,ok},{27,down},{28,ok},{29,ok},{30,ok},
  {31,down},{32,ok},{33,left},{34,left},{35,left},
  {26,ok},{1000,on}};

int pointer=0;
void setup(){
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
  pinMode(BUTTON_PIN, INPUT);
  pinMode(STATUS_PIN, OUTPUT);
 }
// and somewhere as play function:

void loop() {
  unsigned long timer=millis()/1000;
  if (timer>beamerShow[pointer].time  {
     digitalWrite(STATUS_PIN, HIGH);
     irsend.sendNEC(beamerShow[pointer].code, 32); //on-off-left-right-usb
     digitalWrite(STATUS_PIN, LOW);
     pointer++;
  }
}
// rest of IR remote example has been left out - see wiki for full code

The timer switch turns on both the arduino power supply and beamer power supply. On startup the Arduino sends out the required codes to start a slide show from USB disk. After three hours, the arduino sends the power off command.. a little after that the timer switch switches off power completely.

beamer

Written by edwin

May 26th, 2010 at 9:21 pm

Posted in Arduino, home improvement

Tagged with

Spark Creativity? Don’t get out of the box. Design your own box and think from within!

without comments

For years I have dismantled old printers, clocks, radio’s, disk drives, got all the screws out and sorted them in neat little boxes, taking the plastic gears, bearings, etc.. and storing them all separately. This all resulted in a workshop with a large amount of boxes, drawers, cabinets, all filled with a wealth of electronic parts, gears, motors. Strangely enough, coming to think of it, I have hardly ever used most of these parts later on. They always -just-don’t-fit-entirely- but ‘will do as placeholder for now’.

I’m currently in a luxury position that the projects I build are being paid by other people. In order to save time, I order parts from online suppliers and hardly touch what’s left on my shelves. It is quite risky to use salvaged parts in production, you can never be sure that you can order replacement parts within a day. (Instead you have to go out on a Ebay-hunt for that one specific type of plotter you remember taking these nice gears out)

As engineer your problem solving space is mostly defined by performance on the one hand and time + money on the other hand. Technically and creatively, virtually no boundaries apply. Just get the best parts you can find for sum X and build your machine in time Y. Interesting observation is that these constraints do not go well with hobby work (which most of the time is lacking both time and money) Perhaps a good definition for distinction between hobby and professional: lack of deadlines?

Recently I started giving physical programming courses in a Creative Technology bachelor track. The assignments that spark most creativity are the assignments with on the one hand a clear goal (make something that does this or that) and on the other hand a severe limitation (but use only these parts). One nice example that yielded most creative solutions this year was designing a drawing application using Processing/Arduino. The only input that could be used for this drawing application was one light-sensor (LDR) connected to the Arduino. No other inputs could be used. At first students were complaining. It could not be done. It was way to limited. What? was I really serious? There must have been a mistake in the assignment-description… and so on. After a while they accepted the challenge and were getting into it. I have never seen so many different outcomes of one (simple) assignment that work all differently. Not that they were all good or usable, but all solutions were different, working, creative and most important of all, fun. This assignment worked by far better than ‘make a nice animation using shapes and images’ - which leaves far more room for creativity (you would think so) … but does not spark imagination at all, apparently.

picture-2 picture-3 picture-5

Some time ago the spark of Personal Fabrication, or desktop fabrication caught me too. I need a 3D printer! Yes. I wants one! I started out searching and found most of the designs on internet that are neatly listed in Make Volume 21. Then I immediately hit the engineering boundaries of optimization. If you want a really useful machine, you need the fastest, most accurate and preferably not too expensive machine you can get. If you want CNC on your desktop, you need a system with backlash-free trapezoid spindle rods with ball-nuts. Nice linear sliders.. Oh. and standard Nema23 size stepper motors with micro step control. The easiest way is to order a kit, or get quality parts at a distributor - and after some 500$ to 1000$ you are the proud owner of a machine that will work for you..

I had three old dot-matrix printers lying around, which contains sliding rods, timing belts, stepper motors.. the basic ingredients for a Cartesian (XYZ) robot. My first approach was the classical one. Dismantle the printers, get the sliding rods out, salvage the bearings and stepper motor, start designing a base plate with nice brackets to mount the rods, get correct gears, get better stepper motors. I started reading on internet again. How somebody started out with printer parts, but regretted this, because he should have bought linear bearings from the start. How someone tried to use threaded m5 rod as spindle drive and failed miserably. No-one was even THINKING of using the crappy 50-step low resolution stepper motors that normally inhabit old StarLC-10’s, but immediately got themselves a decent set of some 400-step hybrid motors.

This project was going nowhere. I constantly found myself optimizing the design, trying to think of better parts, more accuracy, order good parts, order a kit. Perhaps abandon the printer junk completely. Hours on the project were mostly spent surfing internet, finding other CNC DIY designs on Instructables and maker’s blogs, browsing through kit distributors’ sites and manufacturers of spindle rods. All bouncing back and forth between the engineering criteria of performance vs. time and money.

Then I chose to severely limit my options. I was going to make a repstrap (3D fabricator) only from printer parts and salvaged computer Junk. No spindle rods, expensive bearings or high qualtiy stepper motors. All of a sudden the goals and the problem-solving space were very clear, and the project took off like a rocket.

The initial steps were simple. I took three printer head mechanisms and bolted them together to form a two-axis machine. I cut the printer-driver boards to leave only the stepper motor drivers, used the printer’s power supply and took out an Arduino board to control the steppers. Key ingredient here was that I choose to leave intact as much of the original mechanisms as possible, saving me from the tedious work of making high-precision bearing mounts etc.

The initial tests were very disappointing. The resolution of the print-head was way too crude, and, above all, the stepper motors were by far not powerful enough to reliably power the construction. I was on the verge of abandoning the project again. Then creativity really kicked in. Using the gears that were normally used for driving the paper rolls, I made an extra gear reduction in the printer-head mechanism. With the rods available from various clamp rolls, I made an axle synchronizing the movement left and right. The optical interruption switches were retrofitted as end-stop detectors.

r0013736 r0013686 r0013691

So.. the project is still underway. Conclusions till so far: store (and use) mechanisms, not just parts. Try to use as much as possible from original mechanisms as possible. This will save time, money - and also important - saves waist!

Conclusion number two: if you want to spark your creativity, severely restrict your problem-solving space. It sounds counter-intuitive, but it works!

Written by edwin

May 26th, 2010 at 8:53 pm