Arduino Trigger and Send something to pc

Hello everybody,

I'm really new to Arduino but not to Programming since I'm doing an IT school as Application Developer :slight_smile:

I hope you don't attach blame to me for my stupid questions.

So I've got 2 problems/questions.
First one:
I've got a external Flash gun and I connect 2 wires to it and when they touch each other they flash gun will fire. So of course I can connect the 2 wires to a regular button an when I press the button the flash will fire.
But how Can I actually trigger the flash gun with arduino ?

Second one:
I wondered if it's possible to write something on the pc. So I got my Arduino Duemilanove connect via usb to the computer and had a look at the example read eeprom. And there's a function called Serial.print , but it didn't work for me.

Greetings
TempleClause

But how Can I actually trigger the flash gun with arduino ?

Dead simple - MOC3020 opto-triac - just treat it like a LED.

I wondered if it's possible to write something on the pc.

Word? Notepad?

And there's a function called Serial.print , but it didn't work for me.

Works for everyone else. Maybe you could post your code.

Hey ,

thx for your quick answering ! :slight_smile:
So well The problem with the Serial.print is solved :slight_smile: I just did not see the Serial Monitor button :slight_smile: I thought it would print the things below in the box.

Well I defently can't handle it as it was an LED ^^ I tried that. Cause I can connect the minus leg to GROUND and the positive leg to Digital pin 13 and it works fine when I send a HIGH to pin 13.

So what's a MOC3020 opto-triac ?

Thx in advance!

Well I defently can't handle it as it was an LED ^^

You most definitely can handle a MOC3020 like an LED, 'cos that's what it is!

So what's a MOC3020 opto-triac ?

The google terms are all there.

Hello, Groove!
Please see this project: http://wordpress.bolanski.com/
I'm pretty sure you will find there much common with your's.

I'm pretty sure you will find there much common with your's.

I'm pretty sure my 20+ year old Vivitar 283s would blow a 4N28!

/*
Uses a FOR loop for data and prints a number in various formats.
*/
int x = 0; // variable

void setup() {
Serial.begin(9600); // open the serial port at 9600 bps:
}

void loop() {
x++;
if(x <= 101){
Serial.print(x);
Serial.print("\n");
}
else{
}

}

In ther Serial Monitor it counts up to 101 and in my opinion it shouldn't print anything further but it does. After 101 it prints
-32768
-32767
-32766

and so on.

Why ?

You need to read up on signed and unsigned number ranges.

An int on an Arduino (16 bits) runs from -32768 to +32767.

I'm sorry, my reply was addressed to TempleClause...

I was just eating and lunch and thought about exactly that :slight_smile:
Thank you very much.

Cheers

Emmm well just a short question could you maybe give me a link to a tutorial where they show how to use such a MOC3020 opto-triac ?
I found data sheets with google but as i'm not very familar to electronic components I don't really get it :-/

Cheers

It really is dead simple - just wire the input side of the MOC3020 (pins one and two) to your Arduino just like an LED, with a current-limiting resistor, and the output directly to your hot-shoe or sync cord.

It's a triac, so there's no polarity to observe on the output.

Turn on the LED and the flash should trigger.

Don't even need to connect the grounds.

Okay I think I've got it :smiley:

Now I need to buy such a MOC3020 . I live in Switzerland will they know what I need when I tell them I need a MOC3020 ? Or what is the basic description of it ?

Greets

Sorry, I don't know the French/German/Italian/Romansch for "opto-triac".

Don't forget your current-limiting resistor - about 220 ohm should do the trick.

Hei, If you only need to make a connection between to contacts
you do not need opto triac!
just buy a small NPN transistor

Cheers
David

ps. This drawing is for connecting contact in a X-box but the principle is the same, you take an 8k resistor and connect it to the base pin of the transistor, connect the collector to one pad of the flashgun and the emitor to the other pad, if it does not work, reverse the collector and emitor (the current only flows in one direction through, so it will only work one way)

Hei, If you only need to make a connection between to contacts
you do not need opto triac!

If you're using an older/cheaper flashgun, you may have a couple of hundred volts across the hot-shoe contacts or sync cable.
I strongly recommend isolation!

ArduinoM

ps. This drawing is for connecting contact in a X-box but the principle is the same, you take an 8k resistor and connect it to the base pin of the transistor, connect the collector to one pad of the flashgun and the emitor to the other pad, if it does not work, reverse the collector and emitor (the current only flows in one direction through, so it will only work one way)

This won't work unless there is also a wire from the transistor's emitter to a Arduino ground, so that the base/emitter circuit has a complete current path. I also think an optoisolator would be the better choice of component to use to eliminate any electrical connection from the flash to the Arduino board.

Lefty

@RetroLefty,

This won't work unless there is also a wire from the transistor's emitter to a Arduino ground

Well concept drawings are not allways too acurate :wink:
one can't remember everything, everytime.

David

I'm have been thinking of using just a single MOC3020 to trigger a flash from the Arduino.

Could the triac holding current (0.1mA) cause a problem?
(I've heard of commercial flash triggers that only trigger ones and then the flash unit needs to be turned off before it can be triggered again. But I don't know if those triggers uses a triac)

At the moment I have only flashes with maximum 6V trigger voltage, so I could use a 4N25 or similar, but I would like the trigger to fit "all" flash units.