Page 2 of 3

Re: Question about output switch

Posted: 23 Jan 2011, 04:24
by h-g-t
OK, I am suffering from insomnia again so I have been wondering if the 4066 could be used on it's own without an intermediate interface with the NXT. I have to issue the usual warning here that those of a weak disposition or likely to have heart attacks should read no further. I have had no training in electronics, and it shows! I have been looking at this from an electrical, rather than an electronic viewpoint.
Details of the chip are here :- http://www.nxp.com/documents/data_sheet ... CT4066.pdf

The first idea was to have the chip simply replacing the relays and use the diodes to select the outputs as before. This connects the earth lead from the NXT with the motor circuit so that is probably not an acceptable proposition. See diagram 1.

My second thought was to avoid mixing the circuits by having the power from the motor act as the power supply for the chip as well as the trigger for the switch. This would help to ensure the trigger voltages did not exceed the supply as required by the chip design. I have drawn this as using separate chips for the focus and shutter circuits because I have a headache and got tired of drawing all the wires and diodes.

Before you reach for the pitchforks and torches, remember this is the product of insomnia and may have little or no basis in reality. If nothing else, I will learn something from the criticism.
Switch 4066.jpg
(100.22 KiB) Downloaded 40 times
Switch 4066 V2.jpg
(73.67 KiB) Downloaded 40 times

Re: Question about output switch

Posted: 23 Jan 2011, 06:34
by mightor
You would be better off using something like an MCP23008 or PCF8574. They're both I2C sensors and are super easy to use. Mindsensors makes a nice, ready to use board with the PCF8574. You can get it here: [LINK]. You could use the outputs of this chip to control the inputs on your 4066. Here's an artist's impression of such a circuit:

Image

If you get that board from Mindsensors, almost all of that is taken care of you, minus the 4066, the connections to the camera and from the 4066 to the MCP8574 and ground. Pretty much everything to the right of the 4066 is on the board, including a nice connector for your NXT cable.

- Xander

Re: Question about output switch

Posted: 23 Jan 2011, 11:46
by h-g-t
Thanks for the circuit, Mightor.

Re: Question about output switch

Posted: 23 Jan 2011, 21:59
by h-g-t
Been reading up on the I2C protocols and am looking forward to trying out my miniboard and cheap chips from ebay when they arrive.

One thing surprised me though, at 8ms my relay seems to be just as fast as some of the circuits I have read about.

I think I will keep the relays for the moment, although my project does not really require a lot of speed. Like a Rolls Royce, it proceeds in a stately and dignified manner, as befits someone of my advancing years. Just as my Proton it does not accelerate but 'gathers pace'.

Re: Question about output switch - update

Posted: 24 Jan 2011, 22:43
by h-g-t
Had a look through the spec sheet for the 4066 - most of which went well over my head so I expect that I am wrong (as usual).

Couple of points worried me though, and the first was that it seems you have to be careful on which side of the digital switch you connect the +ve side of the source you are switching.

Secondly, the trigger and switch voltages seem to be limited to values near to the supply voltage, which should be as low as 2v. Don't know what trigger voltages a camera will put out but it could well exceed a low supply voltage. Crispy chip anyone? I think it would be necessary to interpose a transistor between the 4066 and the camera. Or perhaps a relay?

Definitely staying with the relays for the moment!

Re: Question about output switch

Posted: 26 Jan 2011, 13:55
by h-g-t
Came across these from Futurlec. Slightly more expensive ($4.95)than normal relays but faster and could still be operated directly from the NXT with just a couple of diodes - http://www.futurlec.com/Relays/SSR3A5V.shtml

Details from Futurlec site :-


"Input
Input Control Voltage: 4-6 Vdc
Minimum Turn-On Voltage: 4.0 Vdc

Output
Output Switching Voltage: 75 - 280 Vac
Maximum Load Current: 0.1 - 2 A
Maximum Surge Current: 25 Apk
Maximum On-state Voltage Drop: 1.5 Vrms
Maximum Off-state Leakage Current: 1.5 mA
Maximum Turn-on Time: 1/2 Cycle + 1 ms
Maximum Turn-off Time: 1/2 Cycle + 1 ms"

Re: Question about output switch

Posted: 31 Jan 2011, 21:09
by h-g-t
More relays from futurlec, this board includes 2 relays and is only $7.90 plus postage, taxes, etc.

A bit more expensive but ready-made and could possibly be triggered from a sensor port, leaving a motor port free.

http://www.futurlec.com/Mini_Relay.shtml

Re: Question about output switch

Posted: 15 Jun 2011, 14:18
by h-g-t
Mindsensors are advertising this unit which runs from a NXT motor port and can drive a Canon EOS just by adding an appropriate socket and a standard audio cable.

- http://www.mindsensors.com/index.php?mo ... tion=22:22

Re: Question about output switch

Posted: 15 Jun 2011, 18:43
by mattallen37
Are you sure? The Relay Drivers are for controlling the -, not the + of the relay coil.

Re: Question about output switch

Posted: 15 Jun 2011, 19:53
by h-g-t
Yup, tried it and it works with my 350D.

If you put a multimeter across the contacts you get a 'short' when the unit is activated at 100% with no external power supply so it is, in fact, a 'variable resistance relay'. Has to be when you think of it, or you would not be able to control a motor as well.