Go Down

Topic: using a USB cable as extension for a sensor (Read 4878 times) previous topic - next topic


Sep 19, 2009, 11:05 am Last Edit: Sep 19, 2009, 04:12 pm by fabiopigi Reason: 1

i'm building a flash trigger with arduino and a photoresistor and laser module.
working so far, but it's breadboard only.
so the distance sensor<->laser is only about 5cm.

now since i dont know yet what kind of photos i want to shoot and therefor not where to flash positioned, how far sensor/laser apart are etc, i'm having trouble attaching a cable.

if i'll solder it too short i'll have problem for some setups, if i solder it too long i'll have too much cable laying around.

anyway, so yesterday i was thinking. and got a brilliant idea.

why not solder three USB-A socket on the board and one USB-mini socket on each module (laser, sensor, flash hot shoe adapter).

that way the connection between the parts is flexible and cheap and expensional.

if i the things are near together i can use one of these retractable USB cables and have it all tidy.

if i need it to be few meter away, i simply plug some USB extension cables in.

best of all, the parts are cheap as hell.
a USB-A to USB-mini retractable costs $1.50
a 3 meter USB extension cable costs $3
and a USB connector is about 50¢ each

now the question, how long would it take for the signal to go throu e.g. 3 meters of cable?
would the analog readout from the photoresistor be too slow for triggering?
or do i worry too much and the delay is under a few ms?


i'm new to this whole thing so don't quote me but couldn't you have a switch based on how long the cable is? and us the according ms response time to trigger the camera/flash/etc?


well that of course.
i'll have a switch (actually its a potenti) which sets the delay between the detection and the trigger.

but if the delay is too long the object would already be on the ground (or whereever) when the singal is reported back.

so thats why i asked if the singal would take only a few (<10ms) milliseconds, or if the delay were too big to handle (like over half a second), though i dont think it would be a problem.
after all, network cables (RJ45) can be quite long and still maintain a high rate.


Sep 19, 2009, 06:23 pm Last Edit: Sep 19, 2009, 06:26 pm by peter224722 Reason: 1
o.k I`ll give you a clue

the speed of light is 299 792 458 m / s

clue 2

you can send a packet around the world in few ms. ( there and back )


Correct, your biggest problem won't be with the length of your cable, at around a nanosecond a foot that won't effect much. However your use of a photoresistor may limit it as they are not the fastest optical device to respond to changes and time constant used will have the largest effect on how quick the whole process will be.



cable length doesn't affect the time to send/ receive a signal. what it changes is the resistance.USB devices don't work with a cable longer than 16 ft because of this. What happens then is you get standing waves which is when your signal bounces around inside the cable so you get " signal ghosts". It shouldn't be a problem though for just a trigger signal.

p.s an alternative to usb is Ethernet or plain old phone line cable. except for the initial cost of the crimper it is cheaper than usb if you want to make lots of cables.


hm, okey thanks a lot.

so i was thinking, why not have the photoresistor and laser on the same board and just reflect the laserbeam with a mirror.
that way the resistor and laser would be right beside each other.

the distance flash<->board shouldn't be a problem, even if it would be 10 meters apart, since all the flash needs is a contact. and when i give it 5V and the cable "resists" too much it might be like 3V and even that is plenty to trigger the flash.


Sep 19, 2009, 08:53 pm Last Edit: Sep 19, 2009, 08:54 pm by peter224722 Reason: 1
Are you using the long USB lead for sending USB signals or just using the cable to link the two units and sending d.c ?

As clifdwelle said the longer length of cable the larger the resistance so the larger amount of voltage drop to the signal.

With an a.c signal / frequency than you add cross-talk, impedance, ghosting etc.

So the limits with a usb cable as just a wire and not the same 16ft limit sending a usb signal.  


oh well, the USB cable would with the second idea just transmit the signal to the flash.

so basicly the D+ goes to PIN 12 and D- goes to GND.
then i'd switch Pin12->HIGH wait 100ms and switch Pin12->LOW

so the USB Cable would only be needed to send a signal quite fast. but no analog readout where it would need to be precise


Then it's only resistance of the cable which will be a factor.


okey thanks.

what to you think (i'm sure there is some mathematical formula for that), when i need at least 1V to trigger a flash how long can the USB cable be? (the arduino board provides 5V)

as i remember, for the formula i'd need the correct material, the diameter of the cable and the voltage.
but i dont know the dimeter of a USB cable ^^

but 15ft (~5m) should not be a problem to maintain the 1V, right?


I would say you SHOULD be able to get 15ft easy.

With network cables you should be able to get 100 metres for a cable, so I can`t see why 10 metres form a USB cable isn't a problem.


neigher do i :)

are there any technical differences between the hardware of a network cable and that of a USB cable?

network use twisted pairs, but so do USB if i remember correctly (which i  most the time dont  :D )


USB cable looks thinner than alarm cable, and twisted pair is to stop cross-talk, so no difference either way.  

Go Up