element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Project14
  • Challenges & Projects
  • More
Project14
Blog PIV dual camera hardware trigger using arduino
  • Blog
  • Forum
  • Documents
  • Theme Suggestions
  • Polls
  • Members
  • More
  • Cancel
  • New
Join Project14 to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: rsc
  • Date Created: 27 Aug 2019 1:36 PM Date Created
  • Views 3038 views
  • Likes 8 likes
  • Comments 3 comments
  • arduino uno
  • piv
Related
Recommended

PIV dual camera hardware trigger using arduino

rsc
rsc
27 Aug 2019

Solved an interesting problem last week using an Arduino UNO.  We needed to sync two IDS Particle Image Velocimetry (PIV) cameras using a hardware trigger.

https://en.wikipedia.org/wiki/Particle_image_velocimetry

The two cameras were different models and had different connectors.  There are many ways to trigger the system depending on what action you want to capture.

image

https://en.ids-imaging.com/tl_files/downloads/techtip/TechTip_GEV_TriggerCtl_EN.pdf

 

I could have just connected a function generator to the inputs, but instead chose to use an Arduino UNO for more flexibility.

The hardware trigger inputs to these cameras are opto-isolated, so the output from the UNO can be used directly.

image

 

https://en.ids-imaging.com/tl_files/downloads/support_notes/AN_AB.1.0030_Synchronizing-Image-Acquisition-uEye-Cameras_EN…

So I mounted an Arduino in a box, powered from the USB, added a couple of LEDS and a pushbutton, and a BNC connector for the output.

image

image

image

The software is fairly straight forward.

/*
 CameraTrigger
 Last Edit 25 July 2019
 by RSC
*/


// constants won't change. They're used here to set pin numbers:
const int PushButtonPin = 5; // the number of the pushbutton pin
const int RedLedPin =  4;    // the number of the LED pin
const int TriggerPin = 3;    // the number of the trigger pin
const int GreenLedPin =  2;  // the number of the LED pin


int buttonState = 0; // variable for reading the pushbutton
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pins as inputs/outputs.
  pinMode(RedLedPin, OUTPUT);
  pinMode(GreenLedPin, OUTPUT);
  pinMode(TriggerPin, OUTPUT);
  pinMode(PushButtonPin, INPUT);
  // initialize serial:
  Serial.begin(9600);
}


// the loop function runs over and over again forever
void loop() {
   // read the state of the pushbutton value:
  buttonState = 0;
  digitalWrite(RedLedPin, HIGH);
  digitalWrite(GreenLedPin, LOW);
  Serial.println("PushButton = Off"); 
  Serial.println("Trigger = Armed");
  while (!buttonState){
    buttonState = digitalRead(PushButtonPin);
    }
  delay(200);
  Serial.println("PushButton = On");
  Serial.println("Trigger = On");  
  digitalWrite(RedLedPin, LOW);
  digitalWrite(GreenLedPin, HIGH);
  buttonState = 0;
  while(!buttonState){
    digitalWrite(TriggerPin, HIGH);   // turn the trigger on
    delay(50);                       // wait for X miliseconds
    digitalWrite(TriggerPin, LOW);   // turn the trigger off
    delay(50);                      // wait for X miliseconds
    buttonState = digitalRead(PushButtonPin);
  }
  delay(1000);
}

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

  • Sign in to reply
  • dubbie
    dubbie over 6 years ago

    I love a good lash-up.

     

    Dubbie

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • clem57
    clem57 over 6 years ago

    Awesome

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 6 years ago

    Nice simple solution.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube