Pages: 1 [2] 3 4 ... 7   Go Down
Author Topic: Arduino with shift registers to control 70 devices.  (Read 5857 times)
0 Members and 1 Guest are viewing this topic.
Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 538
Posts: 27122
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"I reckon this is by for the simplest option (wiring wise at least), just needing a single 4-core wire."

Well, that and making up 70 circuit cards and boxes...
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am a bit thick here, I will try and work that out when I wake up, smiley I dont understand the 10 bits.

I was suggesting only 3 wires + gnd and trigger looping through each camera.
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 538
Posts: 27122
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The 10 bits refers to 10 1's being clocked thru the shift registers at 10mS to create a 100mS wide pulse.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8531
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Well, that and making up 70 circuit cards and boxes...
Yeah there is that  smiley,

I'd knock up a PCB with a matrix of 7x10 tiny circuit boards and snap-off slots so you can just break off the boards. Probably $100 total cost then easy to build.

It depends on the physical layout of the setup, making 70 boards may be preferable to having 70 wires over the floor. Also the modular approach is easily scalable.

But either way it's simple, just need to know about the non-electronic/software issues to see what fits the application better.

@boffin
Using FFs needs 4 wires GND, PWR, CLK, and DATA but it's really just the digital equivelant of what you suggested with the 556s. Fewer components though.


______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 538
Posts: 27122
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The description "I am putting approx 60-70 cameras in series ... To film some gymnasts." leads me to believe he will filming a gymnast going over a vault kind of thing, where you end up with a series of still shots and can compare one gymnast's form with another doing the same action kind of thing. In which case the cameras will not be spread that far apart around a gymnasium, but concentrated along a 3-4 meter kind of distance.



Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 538
Posts: 27122
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is of what he has in the link he provided in 1st post
"I am creating a shot where the camera moves quickly showing an actor in ultra-slow motion. 40ms is approx 25 fps - PAL format and close enough to film 24fps.  I can slow it down to 12fps for a slow mo shot."

So these cameras will all be fairly close.
Interesting discussion on powering them all, getting them all set the same (menus & stuff).
Reads to me like a switching regulated power supply would have solved some issues - he should have come here sooner!

The other discussion is all 2009 - we're not all replying to an old post, are we?

I guess not the last post date 29 Jan 2011 says
"Ok! the project is back on.
For the last question. 12V to USB adapters are common. The camera should still work with the 5V on USB. Less than 2 bucks with a car USB adapter."
Didn't see how the trigger wire gets connected to a camera, just that 1 remark in this thread about a 5v trigger.
« Last Edit: January 31, 2011, 12:06:33 am by CrossRoads » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

G Morning , I am awake now and know exactly what you mean with the 10 clock pulses.

I didn't look at the posters link to another forum, and it looks like he will have a heavy power lead running to all the cameras, and as Crossroads says, they will be line abreast next to some equipment, so individual cables in a loom would probably be easy.
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

WOW. I should have posted here earlier. Just reading the responses.
The cameras are 30-50 cm in distance from each other.
And the dates are correct, I starting filming my first feature, and this project got held off.
Too many teething issues. Turns out I need a voltage stabilizer before EACH camera for the power anyway.
Logged

Movement & Sound - mishra.tv Film Productions

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Solutions in this post
@Crossroad, @retrolefty - Seeeduino Mega solution 70 outputs. I will just need to connect 70 in parallel and have the advantage of switchable outputs. Perhaps I could change the timing later

@Boffin1 - Attached your plans to this post. 1 556 - and we use a 10ms delay to cascade, and a 100ms output to trigger the camera. Hmm! I do have to wire a small heatsink and voltage stabilizer just before camera anyway. So perhaps I could put all this on a PCB. 70 of them  smiley-eek

BTW, no flashes used. Too many problems with delay, and the light that remains after the flash.

@Crossroads - I did use switching regulated power supply. Still have problems with the camera turning off with VERY minor voltage drops. One of the posters on that thread needed to voltage regulators close to each camera.

@Graynomad Hmm! I would prefer 1 - 4 or 5 core cable instead of 70 parallel cables. Just googling 4013. Are you in Sydney ?


* 5402767011_35472a3d1d_b.jpg (44.9 KB, 838x506 - viewed 17 times.)
Logged

Movement & Sound - mishra.tv Film Productions

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@Graynomad I think this is what you are suggesting. Let me know if I'm wrong.
4013 is 2x flip-flops I need 2 4013s per camera for approx 80ms pulse.

Let FF1 and FF2 belong to 4013-1 and FF3 FF4 from 4013-2

FF1 have relevant inputs Clk-1 D-1 Q-1 Qbar-1
Same for FF2 FF3 FF4

Clk-1 takes the pulse input. Tie D-1, Qbar-1. Tie Q-1 to Clk-2. Tie Q-2 to Qbar-2
Each output divides by 2, so a 10ms pulse on Clk-1 becomes a 40 ms pulse on Q-2.
When this is propagated to Q-4, it becomes a 80ms pulse, which could be enough to trigger the camera.

However, there is a problem - what happens to the n*10ms delay.

If I use Q-2 to trigger the next camera, the delay is n^2*10ms
Logged

Movement & Sound - mishra.tv Film Productions

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8531
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Are you in Sydney ?
Sorry, Perth at present.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8531
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Cross posted there.

As I see it you only need half of a 4013 (or a single FF SMD chip) per camera (drawing attached).

It's no different to using a normal shift reg as has been mentioned above, after all a SR is just N flip flops in a single package.

Pulse CLK 70 times at 10mS, the first 10 times feed a 1 into the first FF, the next 60 feed 0 to the first FF. The 100mS pulse will ripple along the cameras, each 10mS camera N will trigger and N-10 will have it's pulse end.

Timing and pulse with can easily be modified in software, but pulse width must be a multiple of the timing interval.

______
Rob


* ff-cameras.png (5.06 KB, 588x308 - viewed 11 times.)
« Last Edit: January 31, 2011, 09:16:05 am by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Sydney, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@Graynomad - when you say "Pulse Clk 70 times at 10 ms".
Do you mean a pulse of 700ms duration ?
Or it is a sequence 1010101010101... where 1s appear 70 times ?
Logged

Movement & Sound - mishra.tv Film Productions

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 129
Posts: 8531
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Or it is a sequence 1010101010101... where 1s appear 70 times ?
Correct, here's an example

Code:
#define N_CAMERAS 70
#define TRIGGER_PULSE_WIDTH 10
#define DELAY 10

for (int i = 0; i < N_CAMERAS ; i++) {
   if (i < TRIGGER_PULSE_WIDTH )
      digitalWrite (dataPin, HIGH);
   else
      digitalWrite (dataPin, LOW);

   digitalWrite (clockPin, HIGH);
   digitalWrite (clockPin, LOW);
   delay (DELAY);

}

Or a more concise version

Code:
for (int i = 0; i < N_CAMERAS ; i++) {
   digitalWrite (dataPin, i < TRIGGER_PULSE_WIDTH ? 1 : 0); // puts 1 out for the first 10 pulses, then 0
   digitalWrite (clockPin, HIGH);
   digitalWrite (clockPin, LOW);
   delay (DELAY);
}


Note that the time between pulses will be slighly > 10mS due to the loop overhead, if that matters you could use delayMicroseconds() instead and change DELAY to something like 9900.

Also you can adjust the time between cameras firing by changing the same value (DELAY) and adjust the pulse width by changing TRIGGER_PULSE_WIDTH but it will always be an integral number of clock pulses, ie it can only be 80,90,100,110 etc mS, not 95.
______
Rob

Logged

Rob Gray aka the GRAYnomad www.robgray.com

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thats looking pretty simple now, and even though it needs an extra wire and an Arduino, it can be varied easily, my 555 one would need 70 tweaks with a screwdriver !   smiley-roll
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Pages: 1 [2] 3 4 ... 7   Go Up
Jump to: