555 timer circuits for digital camera trigger

I've got a digital camera that I am trying to connect to a motion sensor. I've disassembled it and have the wires available to wire into a circuit. I have three relays. I need a circuit to trigger the camera in this fashion:

  1. Receive signal, activate Relay A and hold for 10 seconds
  2. Same signal, after a couple of seconds, activates Relay B for 5 seconds
  3. Same signal, after a couple of seconds, activates Relay C for 2 seconds
  4. Then reset all relays for next event

These steps simulate Power, Focus and Shutter.

It's been awhile since I've worked with 555 timers, but I think tying them together in a circuit might be the simplest way to make this happen. I believe a 555 timer configured as a monostable one-shot could be used for Relay A. What I'm not sure about is steps 2 and 3, maybe a 556 timer that has some sort of startup delay?

Or would this project be easier with some sort of PIC?

Open to ideas.

Thanks

Reply to
DorkyGrin
Loading thread data ...

On a sunny day (Sun, 28 Sep 2008 19:24:48 -0700 (PDT)) it happened DorkyGrin wrote in :

Yes.

OTOH many digital cameras have an USB interface, and there exists a protocol (PTP mode) that these days many cameras support, to take a picture. So a small Linux computer, running perhaps gphoto2 software, with some sensor interface with USB PIC perhaps, more complicated..... All depends.

Reply to
Jan Panteltje

I was thinking 555 or PIC because of size requirements (needs to be portable and run off a 6-12v battery). I had not considered USB. Hummm...

Are there any PICs that don't require a steep learning curve for programming? Something like a PIC for dummies?

Reply to
DorkyGrin

Picaxe to the rescue! Check them out. The 8/14/20 pin basic (M series) versions only require a serial port or usb to serial cable to program.

The basic language software is free. The parts go for ~$3-4. They are a snap to use - almost no learning curve. A/D converters with 8 or 10 bit resolution, PWM output, runs on 2-5 volts in the microamp range.

I'm using them for time lapse cameras among other things. It sits there waiting for the sun to come up, then snaps pictures at an adjustable interval (using a pot). All the timing is done in the 'axe. I even count the pictures and slightly lengthen the time the camera stays on, so they get into memory - as the card fills up the camera needs more time. Camera runs for 10+ days and takes 1,000+ shots in high res JPG format - 0n 3 AA rechargeable cells (3.6V).

I'm using one 8 pin version on one camera and one 14 pin chip on another. Pins are assignable as input or output. The 14 and 20 still have assignable pins but they default to inputs or outputs without a program command.

They sell all kinds of fancy hardware but all you really need is the PC and serial cable or USB adaptor and three resistors to program it. A solder less breadboard is nice too.

Use 4.5 volts - they are damned serious about the 5 volt absolute maximum and batteries are convenient. Anderson (below) is probably still including programming resistors with the purchase of the 'axe.

Official site (download software and manuals)

formatting link

Best cheapest fastest place to get them in the US

formatting link

another good fast inexpensive

formatting link

The forum - these guys can answer most any question you have and the manufacturer monitors and participates

formatting link

--


----== Posted via Pronews.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.pronews.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= - Total Privacy via Encryption =---
Reply to
default

Much easier if you can use them. Maybe a picaxe, but I've never used one. I'd write the code for you, but I'm still kinda busy cleaning up from the hurricane. I haven't touched a PIC in about a year so I'm kinda rusty.

Reply to
Anthony Fremont

DorkyGrin wrote in news:f3cc2516-8d75-4f1e-9708- snipped-for-privacy@k13g2000hse.googlegroups.com:

You're trying to implement a state machine, and need some memory components-- flip flops and such. Not terribly difficult if you have a basic understanding of digital circuits. Much easier to put together with a small PIC, assuming all your development tools are in place. If not, its a great small project with which to learn the environment.

--
Scott
Reverse name to reply
Reply to
Scott Seidman

l

xe/

m/picaxe/index.html

o.php?products_id=3D8322

isplay.php?f=3D2

News=3D=3D----

formatting link
#1 Newsgroup Service in the World! =

Seems like that PICAXE might be just the ticket. Probably easier then trying to cascade a bunch of 555's. And it sure it cheap enough. I'll take a look at the software and try to get an idea how hard it would be to write the code. Thanks for the tips.

Are of lots of examples of picaxe code out there?

Thanks again

DG

Reply to
DorkyGrin

Wow. This smells like a nightmare in the making. My first thought is what happens when the focus doesn't snap first time. Will this un-synch the whole contraption?

Reply to
mpm

This strikes me as an odd argument. "We won't stop mutilating ourselves unless China and India agree that they will stop as well."

Reply to
Industrial One

There's tons of examples. The forum is rife with them. All you're doing, according to your post is sequential timing functions.

The code would look something like high 4 'make pin 3 (logical output #4) high pause 10,000 'wait for 10 seconds (10,000 milliseconds) high 2 'turn on pin 5 (output #2) pause 'etc.

To turn off, it is low 4 etc.

I use a A/D input to read a pot and adjust the pause time.

One of my outputs is a 40 KHZ 10% duty PWM that I use to toggle an inductor to make a small low power bias supply to turn on a mosfet.

Regarding your camera - the ones I've played with just require an open collector to pull the switch signal to ground to actuate the functions

- no relays necessary. But its all in how you want to do it - I wanted everything including the camera to work from one battery. The mosfet pulls the camera minus low to provide camera power.

There's a book called "programming and Customizing the Picaxe" by David Lincoln ISBN # 0-07-145765-8. The book is OK - the table of contents don't agree with the content page numbers, and they'd added the 14M and 20M since the book was published.

Download the two part manual from the revved site and you'll see how easy it can be.

I have next to no programming experience and had no trouble using it. I like messing with it now.

--


----== Posted via Pronews.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.pronews.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= - Total Privacy via Encryption =---
Reply to
default

Wow, lots of resources, downloaded and looked at the manual last night. Good stuff.

I'm going to order a 14m and an 8m and play with them.

Are there any components necessary for a to protect a picaxe input pin to sense a signal from my motion sensor?

OK to email me directly. dorkygrin at yahoo

Thanks!

Reply to
DorkyGrin

I don't know the "full story." The 'axe has a programmed in boot loader - its only claim to fame. You pay extra for that, over the bare pic. The advantage is it allows easy programming in Basic and you don't need a development system - a solderless breadboard is all it takes in that respect.

Can you clone the boot loader? I don't know. Reved makes their money and maintains the educational info on their profit, so don't expect them to give you that.

Kicchip is another company trying to do the same thing as reved but they don't sell in the US and seem to be having some start up problems.

Arduino is an open source version using a more sophisticated pic with lots more capability - but the boards cost $13 and up (similar to basic stamp but program in basic and C.

The basic Arduino chip with the boot loader is ~$6

No you can't use the programmer because the 'axe bootloader is proprietary.

I would guess you'd need something like a programmer but- there are some open source attempts to program using an Axe to work as the loader for a bare pic - I haven't kept current but you can search for it.

I run my 08M at 2.7 in one camera - 3 volt supply (2-AA) and one germanium diode to isolate it from the camera. (camera sucked down the supply rail when it turned on, and would reset the axe - causing it to oscillate on and off)

The spec I saw said 2-5 volts and I can run at 2.4 when the battery is low. Programming should or must be done at ~4.5 or more due to voltage levels on the serial port. I use 4.5 and it seems to program fine at 3 volts also . . .

The brownout in the chip can be over written in programming but I haven't fooled with it and use low voltages with no problems.

--


----== Posted via Pronews.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.pronews.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= - Total Privacy via Encryption =---
Reply to
default

On a sunny day (Mon, 29 Sep 2008 05:02:08 -0700 (PDT)) it happened DorkyGrin wrote in :

Sorry for the late reply. I did see some recommend custom solutions like pic-axe (spelled right?).

In my view it is much better to just take the time, and learn PIC asm.

You will, as electronics person, work close to the hardware, and really, writing a delay loop in asm is just as simple, and a lot more versatile, then doing it in some higher language.

You will want to write to IO ports, read AD the converter, do interrupts too, later.

Learning curve? There is always one. If you _ever_ programmed in a language, say BASIC or whatever, then you understand the idea of having something execute your instructions. In such a case learning PIC asm (or any other asm) is just having a good read of the data sheets, the instruction set, and start with something simple like lighting a LED for example.

There are lots and lots of examples for asm on the Microchip website, and the cheapest programmer is less the 50 $ IIRC.

Reply to
Jan Panteltje

Thanks

--
Joe Leikhim K4SAT
"The RFI-EMI-GUY"©

"Treason doth never prosper: what\'s the reason?
For if it prosper, none dare call it treason."

"Follow The Money"  ;-P
Reply to
RFI-EMI-GUY

That's what optoisolators are for. :-)

Cheers! Rich

Reply to
Rich Grise

My own application - running at low voltages - the optos I tried had too much VCEsat to work with a mosfet on the camera's minus (raising the whole camera above ground slightly).

The hardware problems and work-arounds are due to the low voltages - with as much as 5 volts to play with, they'd probably vanish.

--


----== Posted via Pronews.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.pronews.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= - Total Privacy via Encryption =---
Reply to
default

News=3D=3D----

formatting link
#1 Newsgroup Service in the World! =

Rich - thanks for the optoisolator tip, that's exactly what I need to do, assuming I have enough voltage.

This is coming together nicely.

Default -

HOLY COW! You were right, this pixaxe is way cool. I'm lovin' it.

I downloaded the software and very quickly wrote the following program:

=3D=3D=3D=3D=3D=3D=3D=3D main: if pin1 =3D 1 then takepic

goto main

takepic: high 2 'make pin 1 (logical output 2) high ** power relay ** pause 3000 'wait for 3 seconds (2000 milliseconds) high 3 'turn on pin 2 (logical output 3) ** focus relay ** pause 2000 'wait for 2 seconds high 4 'turn on pin 3 (logical output 4) ** shutter relay ** pause 1000 'wait 1 seconds

low 4,3 pause 2000 low 2 'reset to normal, wait for next event =3D=3D=3D=3D=3D=3D=3D

Looks great in the simulator. I've already ordered a starter kit and a couple of extra chips. Should be here by the weekend. Good stuff for what I'm doing.

So, if my motion sensor keeps sending 'events', I think that would keep pin1 high (I'm not exactly sure until I test it, unless someone can tell me how it might work). Then I suppose I could write in a loop to keep checking the status of pin1 ... and if it is still high within x seconds, then I could keep hitting the shutter relay.

How much current does a picaxe draw when running waiting to execute? Gotta start thinking about power requirements.

Thanks again folks for your assistance. Guess I need to start posting in the picaxe forum now. ;-)

Reply to
DorkyGrin

News==----

formatting link
#1 Newsgroup Service in the World! >100,000 Newsgroups

I too just ordered the picaxe 08M starter pack (from Advanced Micro Circuits Corp). My timer is for a different purpose, but I can learn from what you posted.

I am making a UHF locating beacon (for recovery of a model rocket) using a Linx 433.920 MHz RF module. I will be making a free running timer to turn the carrier on and off at 1 second intervals (actually 100 ms on,

900 ms off). I also need to sense a switch when the parachute is deployed to change the carrier intervals (200 ms on 800 ms off) so that I know if the landing is going to be under a properly deployed parachute or not. I already have a CW direction finder receiver to work with the transmitter.

Please share what you discover with me, I will be behind you on the learning curve!

--
Joe Leikhim K4SAT
"The RFI-EMI-GUY"©

"Treason doth never prosper: what\'s the reason?
For if it prosper, none dare call it treason."

"Follow The Money"  ;-P
Reply to
RFI-EMI-GUY

Glad you're enjoying it - get on the forum now and introduce yourself as a newbie and tell them what you intend and ask questions there. Like I said, I'm no programming wizard. My moniker is "flooby"

The 8 and 14 M chips can both be programmed to use interrupts - where an external event can be read(tested) while the program is processing.

The code looks like SETINT (condition) mask or SETINT %00010000, %00010000 'enable interrupt on pin 4 high

It is used in conjunction with a loop before going back to the main program - you could, for instance, write a variable to remember the state and have your program check it (write just a single bit variable in this case) to determine how to proceed with the timing

Words, bytes, and bits, are different length variables, b0 is a variable byte - sixteen bit variables can be written and read in "word" zero; word zero also comprises bytes zero and one - so they can't be used more than once.

Does that make sense?

BTW you can also put a variable into (high) memory locations so that it is written into memory in a part of the flash memory that your own program doesn't occupy - that way it "remembers" the variable while the power is off. Upon startup, or in the program, you can then go back and retrieve the variable. I do that to count total pictures taken.

My camera is water proof and goes on the kayak - when I'm out of the boat I don't want it snapping pictures of the same weeds on the bank, so turn it off and on.

I use a magnet on the outside of the watertight case to actuate a reed switch inside - some day I plan to see if I can't make it use an infrared communicator so I can change the delay time without opening the case.

Power is an ongoing and much debated thing on the forum. The actual power would have to be measured since the chips are variable in that respect (some use a little more than others)

In sleep mode (like pause, but you can't be processing while sleeping) its only a few micro amps - but while running it is only a milliamp or so.

Power depends on voltage too (naturally).

There are tricks you can use to minimize current drain. One is to change the clock frequency - the slower the clock the less power used. The procedure is in the manual - you "poke" (peek and poke) a number into an internal register to set the frequency divider on the clock to change the speed. That also has the effect of changing the length of pause and other commands like the pwm and communications (serial in/out baud rate).

Another trick is to turn off the brownout monitor to save a little power.

All in the manual. But if you do nothing at all you won't use a lot of power - the only concession I'm making to save power is to put it to sleep for 15 minutes at a time to recheck the light level so it doesn't use power when it is too dark to take photos - and get 10+ days out of AA batteries - same batteries that power the camera.

--


----== Posted via Pronews.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.pronews.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= - Total Privacy via Encryption =---
Reply to
default

I have no idea. ;-)

Well, if it's got a "sleep" mode, you might be able to bring it way down, then, if it's got interrupts, and a "wake on interrupt" feature, then you could save power by sleeping until you get the "shoot" signal.

Well, let us all know how it works out.

Can it take a picture of itself? ;-)

Cheers! Rich

Reply to
Rich Grise

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.