Battery third (temp) terminal as multipurpose analogue input - page 10 - Hotwire! Hardware Mods, Accessories and Insights - CHDK Forum  

Battery third (temp) terminal as multipurpose analogue input

  • 199 Replies
  • 78619 Views
Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #90 on: 23 / January / 2014, 15:24:55 »
Advertisements
If we are worried about ground loops, mains hum and so forth, you could drive an led from the microcontroller with a suitable current limiting resistor and point it at a suitable photo-resistor (aka a Light Dependant Resistor or LDR). Something like this. or this...
Umm ... you just described what a PhotoMOS chip does : http://www.pidtechinsights.com/2011/12/01/how-photomos-relays-work/
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #91 on: 23 / January / 2014, 15:29:34 »
I have not yet purchased the photomos but three of them. It was a proposal to use them for opening and closing the usb-cable when I was about to build the CHDKPTP-remote solution. I read they are almost ideal switches. So I'd buy the rest as soon as the circuit is fixed in theory.
But you say I am missing a resistor? I suppose it should be in the + cable of the Arduino? Which resistance should it have? And where should it be located? In the dummy too?
What make & model number PhotoMOS part did you buy?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline ahull

  • *****
  • 634
Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #92 on: 23 / January / 2014, 15:35:06 »
If we are worried about ground loops, mains hum and so forth, you could drive an led from the microcontroller with a suitable current limiting resistor and point it at a suitable photo-resistor (aka a Light Dependant Resistor or LDR). Something like this. or this...
Umm ... you just described what a PhotoMOS chip does : http://www.pidtechinsights.com/2011/12/01/how-photomos-relays-work/

Indeed, but with the photomos, you still need to switch in a resistor.. either would work.. you pays your money. Try both, and see which is faster and/or easier to build would be my thought.

*

Offline srsa_4c

  • ******
  • 4451
Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #93 on: 23 / January / 2014, 16:08:19 »
Waterwingz - When the patch eventually goes to SVN, is it going to be using GetAdChValue or is it going to be reading the MMIOs directly? Do you think there could be any delay with GetAdChValue?
Calling GetAdChValue means execution of a few dozen instructions. However, the MMIO range of the AD channels is known, so choosing the right MMIO address and then reading it directly is a tiny bit faster (but that's probably negligible, especially because the AD conversion itself may not be lightning fast).


Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #94 on: 23 / January / 2014, 17:02:42 »
What make & model number PhotoMOS part did you buy?

Sorry, had been out for fresh air snapping...

I have this model: AQY 212 EHA, SMD relay Here are the specs.
« Last Edit: 23 / January / 2014, 17:12:29 by Karmaschinken »

*

Offline ahull

  • *****
  • 634
Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #95 on: 23 / January / 2014, 17:10:27 »
I wonder on reflection if we even need the complexity and expense of a photomos relay, or the faffing about that a ldr would bring,  could we not actually get away with a simple opto-isolator and two current limiting resistors, one for the led, one for the phototransistor.

The other thing I am not sure about with the photomos, is how well it will work switching such low DC voltages, they are typically set up for switching tens or hundreds of volts (and some are designed for AC rather than DC).  Sadly I don't have any to hand to experiment with.  I'll need to take a look at the datasheet for the AQY 212 EHA and report back.

EDIT: Looking through that datasheet, I would say that this device will probably work.Your supllier also do a DIP package version (easier to hand solder on protoboard) if you need it.
« Last Edit: 23 / January / 2014, 17:23:06 by ahull »

Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #96 on: 23 / January / 2014, 17:28:56 »
One minute ago I posted the link. All I can say until now I got the PhotoMos working to switch an LED.

As said the PhotoMos was invented while I discussed the switching of the USB-cable, before waterwingz showed me the AD trigger way discussed here. It was said that the switch should loose a minimum of current, because it was meant to be situated in a USB cable that is at the same time used for PTP.

Now maybe the PhotMos is somewhat oversized? I already baught Mosfets. The thing is that I would be more happy to spend some extra bucks to be on the sure side with the components. Nothing worse than find out after some time that sync isn't reliable or something like that. Okay, the photomos is about $1.80 each, thus $80 all in all, but the work takes hours, even days. So I'd really like to be on the doubled assured way.

The last setup I had was a Y-switch, a cable that was split to the 50 USB ports, the commonly used remote setup for CHDK. There I had some severe sync problems. You will see that in some days when my first Bullet-Time-LAPSE  project (maybe worlds first of this kind?) will be presented online. There I have some real delay in it. I can't say for sure what the reason was, might also have been because I did have a old CHDK version and no precision sync patch from waterwingz these days. However the problem resulted in a great loss of quality for a very sophisticated project.

So I have no problem to spend 50 extra bucks to make everything as secure as possible. If there is only 0.005% of extra security, I'll go for that. I have 50 cameras, one fault is 50 times as evil as a "normal" one...
« Last Edit: 23 / January / 2014, 17:31:55 by Karmaschinken »

Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #97 on: 23 / January / 2014, 17:56:07 »
Now that it really comes closer to soldering together all of the things, I'd just put in here the link to the cables I chose, if someone wants to put in a veto, please go ahead...

I think this might fit:

"Control cable, 27 x 0.25 mm², shielded, LiYCY, OD 10.7 mm, gray", specs


Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #98 on: 24 / January / 2014, 06:31:33 »
What make & model number PhotoMOS part did you buy?

waterwingz, or someone else, would you mind having a look at my circuit again for the last finish? As you pointed out I should have another resistor on the Arduino side? But where and which one (and maybe why  ::)?)

Thanks! Martin.

Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #99 on: 24 / January / 2014, 08:15:26 »
waterwingz, or someone else, would you mind having a look at my circuit again for the last finish? As you pointed out I should have another resistor on the Arduino side? But where and which one (and maybe why  ::)?)
The input to that device is internally just a simple LED.  It will need a series current limiting resistor - does matter which lead you insert that into.

The data sheet says it needs a minimum of 3 mA to operate (and a maximum current of 50 mA).   Assuming the Arduino will drive a maximum of 5V (yes, I know its lower than that) then you will want a round things to   R = 5 / 10x10-3 = 500 ohms.

I have limited experience with the using MOSFET's in this sort of circuit so have no idea about suitable biasing or threshold currents on the output side.  That's why I suggested building one test circuit first.  I'll find some time this weekend to do some googling about PhotoFET design - it's why I asked if you copied the circuit from somewhere?
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal