Jump to content

NLCbanner2024.jpg.2478be509670e60c2d6efd04834b8b47.jpg

Remote controlled CCTV surveillance system - Arduino based


Gina

Recommended Posts

Just had one of those "light bulb" moments :)  The DS2408 has 8 PIO lines and I'm using 2 stepper motors with 4 phase lines each = 8 lines in total.  Unfortunately the DS2408 PIO lines are only rated at 6v max so will still need stepper drivers to handle the 12v stepper drive but at least I won't need the ATmega chip - I can feed the stepper drivers directly from the DS2408 with a few extra components :)  (I would prefer not to use 5v stepper motors as there is already a 12v supply for the camera.) 

This has the added advantage that the motor speed can be variable and not just on/off as the stepper motor control sketch will be in the main control Arduino (or ATmega chip) rather than locally at the camera.

Link to comment
Share on other sites

  • Replies 116
  • Created
  • Last Reply

Now as promised, photos of the big CCTV camera and mounting.  The pan and tilt mounting design follows the design of most astro scope mounts with the works in the middle (as it were) with the pan corresponding to RA and the tilt to Dec. 

The body containg all the works rotates on a mast consisting of a 1" OD aluminium tube.  This has a 100mm spur gear attached and the body moves round this, driven by a pinion on a stepper motor.

The tilt mechanism consists of a segment spur gear on a horizontal axle which is mounted on the body.  Again this is driven by a pinion on a stepper motor

Firstly, a couple of photos of the camera with tape measure to show the size.
post-13131-0-50037600-1408637263_thumb.jpost-13131-0-04297300-1408637269_thumb.j

Camera on pan & tilt mounting.

post-13131-0-53514000-1408637273_thumb.j

The mounting innards.

post-13131-0-39438600-1408637295_thumb.j

This shows the tilt mechanism with its weather protection cover removed.  A ridge on the axle combined with a matching groove in the "fixed" parts provides a weather seal.  I shall probably add some silicone grease to seal it.

post-13131-0-86699700-1408637301_thumb.j

This view is looking up into the mount with the botton plate removed, showing the upper mounting which takes the weight.  The yellow part fits the top of the ali tube and fits into a narrow ball bearing fitted into a groove in the T shaped support frame.  The latter has a gap to allow cables to pass into the top of the tube.  The tilt drive gears can be clearly shown in this photo.

post-13131-0-24552200-1408637312_thumb.j

The next photo shows the top of the bottom plate with ball bearing, top of the 100mm drive gear (in yellow) and stepper motor.

post-13131-0-38280800-1408637328_thumb.j

This is the underside of the bottom plate with just the bearing.

post-13131-0-50345800-1408637334_thumb.j

This shows the drive gears.

post-13131-0-65039800-1408637342_thumb.j

Finally, this shows the top of the yellow pan drive gear with boss to fit the ball bearing inner and ridge to space the gear away fron the bottom plate.

post-13131-0-68892300-1408637346_thumb.j

Link to comment
Share on other sites

Been playing with bevel gears in SketchUp and it would seem that larger teeth are better.  For spur gears I've been using a ratio of 2:1 for number of teeth to radius in mm but with bevel gears I'm now trying a ratio of 1:1. 

I'm sticking with a 1:1 gear ratio too for now as then both tooth angles are 45 degrees.  With a different ratio eg. to gear down, the angle isn't 45 degrees and needs some awkward calculations it would seem.  A gear ratio of 1:1 is quite reasonable for the CCTV camera tilt gearing.  The overall gear ratio can be altered if necessary by the stepper motor pinion to large spur gear ratio.

post-13131-0-98593200-1408658130_thumb.jpost-13131-0-96493600-1408658244_thumb.jpost-13131-0-67463300-1408658437_thumb.j

Link to comment
Share on other sites

The DS7408s arrived in the post this morning :)  Great service :)  Wish they were available in standard 0.1" DIP but they aren't - they come with 0.05" pitch legs.  Good job I've got a good illuminated desk magnifier and some new reading glasses :D  With these 1-wire tiny chips I usually stick them un their backs to standard stripboard and solder fine wires to the legs and then to the copper strips.  I've had to do that for my 1-wire weather station.

Next job will be to design the circuitry, wire these up etc. and test with Arduino Uno - should be fun :D

Link to comment
Share on other sites

I have only done this once. I used a flux pen on the pcb first and pre-tinned the pads & IC pins. Then you just sit the ic on the pcb pads and lightly touch the pins one by one with a fine soldering bit. It's enough to melt the solder on both and 'stick' the pins to the pcb.

Link to comment
Share on other sites

Oh - where's my post gone?????  :eek::mad:

I've ordered some adapter boards from ebay - 16pin version - link - just as well I counted the legs on my bugs :D

I think it will be easier soldering these than single bits of fine wire.

I have only done this once. I used a flux pen on the pcb first and pre-tinned the pads & IC pins. Then you just sit the ic on the pcb pads and lightly touch the pins one by one with a fine soldering bit. It's enough to melt the solder on both and 'stick' the pins to the pcb.

Good idea - thanks :)

Link to comment
Share on other sites

Oh - where's my post gone?????  :eek::mad:

I've ordered some adapter boards from ebay - 16pin version - link - just as well I counted the legs on my bugs :D

I think it will be easier soldering these than single bits of fine wire.

Good idea - thanks :)

My soldering efforts. It makes swapping components easier too.

post-28249-0-93655900-1408728500.jpgpost-28249-0-62199200-1408728515.jpg

Link to comment
Share on other sites

Very nice soldering Dave :)

Thanks. I think the secret is to flux the pads first. It stops the solder blobbing and puddling. The chip is a DS2408S+ 1-Wire 8-Channel Addressable Switch (£3.13 from Homechip). I cant remember what I bought it for now. Another project that never got off the ground :grin:
Link to comment
Share on other sites

That's exactly what I'm using to control the stepper motors on my CCTV camera system :)  I guess it would also provide an alternative remote focussing system.  Now there's an idea.  1-wire remote focussing :D

Running stepper motors give me some other ideas too :)

Link to comment
Share on other sites

I think I might have bought mine to control an LCD display for my weather station. In the end I used a Raspberry Pi.

post-28249-0-14930800-1408731894.jpg

The 1-wire interface is an RPI2 from Sheepwalk. I used owfs to access the devices, LCDProc to drive the display and programmed it all using Java ME.

The RPi also runs a compact web server with some basic graphs. I used RRD databases and RRDTool to manipulate the data and generate the graphs.

All the raw data is stored on the USB key poking out of the LHS.

post-28249-0-51893300-1408732296_thumb.p

Link to comment
Share on other sites

Must get back to my weather station :D  I have a lot of it done.  I use OWFS for that too.  Most of it is programmed in Python under Linux Mint.  The DS2408 could come in handy for weather info display.  I'm thinking of a nice big analogue display for the wall :D.  Rather like a clock for wind direction, average and gust wind speeds.  Might use a digital diaplay for temperature, humidity and rainfall though.  I'll say more in the right thread :D

Link to comment
Share on other sites

I considered building a dummy weather vane indoors which would turn to mirror what was going on outside. :eek:

I like that idea :)  ATM I can see my current wind instruments from my seat on the settee in the lounge :D  So I can see bot wind direction and speed.  But this is moving to a location where I won't be able to see them.  The mast obscures a tiny amount of the FOV for my scopes.  I can see the wind instruments but they are not currently connected to anything :D  I want to fix this as soon as I can :D  It won't be these I shall be using though - they're the proprietry ones, I will be using my own.  See my Weather Station thread.

Link to comment
Share on other sites

Here is a screenshot from SmartDraw (software I'm trying out for drawing vircuit diagrams) showing use of the DS2408 to drive the stepper motors for pan & tilt.  Please excuse the crude diagram - not used to the software.

post-13131-0-98996300-1408812108_thumb.j

I've been looking at the ULN2003A datasheet and wondering if this is the best way to drive ther stepper motors.  Thing is, these multiple Darlington pairs need a good milliamp of current to drive them and the pull-up resistors would want to be 2.2 Kohms to ensure TTL input levels to the ULN2003A.  In the "0" state the current into the DS2408 would be approaching the maximum total drain current of 20mA.  (8 2K2 resistors going to 5v gives 18mA).  Although within spec, I think this is just a bit "too near the bone" for my liking.

I'm thinking therefore, that discrete components might be better viz. power MOSFETs.  These require vitrtually zero input current and the pull-up resistors could be 10K or more.  Like the ULN2003A these are protected from the back EMF spikes from the inductive stepper morors.

Link to comment
Share on other sites

Thanks Dave - I'll check that out :)

I have found a better option than the ULN2003A in the form of a quad MOSFET driver chip and it's capable of driving other stepper winding options as well as the 28BYJ-48 such as the Nema17 and also as an H bridge for DC motors, with direction and PWM speed control.

Link to comment
Share on other sites

There are some good example circuits on the Maxim DS2408 datasheet http://www.maximintegrated.com/en/products/digital/memory-products/DS2408.html (see link just above the 'overview' tab)

I noticed one uses opto-isolators. Would that solve the issue?

Not really.  The relay driver example is more realistic.  As shown, a MOSFET driver and spike catching diode.

Link to comment
Share on other sites

Yes, looks a better option. I noticed something else in the datasheet that may be relevant:

Power-up State of P0 to P7

When the DS2408 powers up, the state of the I/O pins P0 to P7 is indeterminate. This behavior may not be acceptable for some applications. To ensure that P0 to P7 power up in the "off" state, it is necessary to have a suitable power-on-reset circuit, such as the DS1811, or a supervisor IC connected to the RSTZ pin.

RSTZ Pin

When not configured as STRB output, the RSTZ pin is to be connected to VCC, directly or through a resistor. A local VCC supply can be created by taking energy from the 1-Wire line, as shown in Figure 21.

Link to comment
Share on other sites

Thanks Dave :)  Yes, i noticed that :)

The DS2408 data sheet shows 10K pull-up resitors so I'll go for that with a 1K resistor supplying the 5.1 volt Zener diode.  8 resistors + common in one SIL package makes sense rather than individual resistors eg. BOURNS RESISTOR NETWORK 10K 8 + COMMON (9 PIN) QTY = 10

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.