Go Down

Topic: High Speed Photography (Read 446 times) previous topic - next topic

Jonathan89

Hi,

I am completely new to electronics and how your systems work.

My project consists of capturing paint being thrown from a drill bit and capturing it spinning off. At the moment it is set up with me activating the drill and lights at the same time manually in a dark room with the shutter open.

As you can guess its complete luck if we get the right timing and there are a few other variables like consistency of paint, that's still to be ironed out. However would it be possible to create a trigger that's connected to the drill and the lights so they fire at exactly the same time?

Sorry if this is in the wrong place, I appreciate any help you guys can give

Cheers,

Jonathan

Boardburner2

#1
Mar 14, 2017, 06:36 pm Last Edit: Mar 14, 2017, 06:46 pm by Boardburner2
Hi,


As you can guess its complete luck if we get the right timing and there are a few other variables like consistency of paint, that's still to be ironed out. However would it be possible to create a trigger that's connected to the drill

Cheers,

Jonathan
The drill will take time to spin up so that will be problematic.

Could you control the paint flow somehow ?

Alternative would be synchronise shutter and lights so you do not get multiple exposures.
You could attatch a reflective sensor to the drill and have an arm switch so that the lights only fire once.

EDIT
Coolant fluid is white and water thin.

cedarlakeinstruments

The simplest way is probably an adjustable delay on the light. Close a switch, the drill starts up and at some time afterwards, the light flashes on.
Electronics and firmware/software design and assistance. No project too small

Jonathan89

Thanks guys I think having a delay is the best bet, what products would I need to make this work? is there a particular way I would set this up?

Cheers

PaulMurrayCbr

#4
Mar 15, 2017, 01:46 pm Last Edit: Mar 15, 2017, 01:49 pm by PaulMurrayCbr
What kind of lights are we talking about here? Some sort of xenon flash tube strobe? Writing an arduino sketch that turns on one pain and then after a brief delay on a button press is easy. The electronics to connect that 5v output to a drill and a flash tube is not so trivial.

However, if it's just a matter of switching on a piece of equipment at the mains, then a relay board may do the job you need. It does involve fooling about with mains power. It's not terribly complicated - it's just that it can kill you, that's all. You'd run the live wire into a relay board rated for mains power, and from that to your plugs.

Use a solid-state relay board for more reliable timing. Problem is, you need one that does AC. I'm sure they make 'em.

The sketch is simple as:

Code: [Select]

boolean cycling = false;
uint32_t cycle_start_us;

const byte flashPin = 3; // pin three to the relays
const byte drillPin = 4; // pin four to the relays

const byte buttonPin = 6; // pushbutton between pin 6 and ground
byte button;

const uint32_t DRILL_ON_us = 1000L * 500L; // drill on for half a second
const uint32_t FLASH_ON_us = 2000L ; // flash on for 2 miliseconds
const uint32_t FLASH_DELAY_us = 500L ; // drill on, then half a millisecond, then flash on.

enum State {
  WAIT, ON, OFF
} flashState = OFF, drillState = OFF;

void setup() {
  pinMode(flashPin, OUTPUT);
  pinMode(drillPin, OUTPUT);
  pinMode(buttonPin, INPUT_PULLUP);
}

void loop() {
  byte prevButton = button;
  button = digitalRead(buttonPin);

  if (!cycling && prevButton == HIGH && button == LOW) {
    cycling = true;
    cycle_start_us = micros();
    digitalWrite(drillPin, HIGH);
    flashState = WAIT;
    drillState = ON;
  }

  if (cycling) {
    uint32_t us = micros() - cycle_start_us;
    switch (drillState) {
      case WAIT: // this never happens
        break;
      case ON:
        if (us > DRILL_ON_us) {
          digitalWrite(drillPin, LOW);
          drillState = OFF;
        }
        break;
      case OFF: // do nothing;
        break;
    }
    switch (flashState) {
      case WAIT:
        if (us > FLASH_DELAY_us) {
          digitalWrite(flashPin, HIGH);
          flashState = ON;
        }
        break;
      case ON:
        if (us > FLASH_DELAY_us + FLASH_ON_us) {
          digitalWrite(flashPin, LOW);
          flashState = OFF;
        }
        break;
      case OFF: // do nothing;
        break;
    }

    if (flashState == OFF && drillState == OFF) {
      cycling = false;
    }
  }

}




http://paulmurraycbr.github.io/ArduinoTheOOWay.html

cedarlakeinstruments

These things make switching A/C much easier and safer for the beginner. Actuation times are below 20mS.
Electronics and firmware/software design and assistance. No project too small

Go Up