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

Battery third (temp) terminal as multipurpose analogue input

  • 199 Replies
  • 86679 Views
Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #20 on: 04 / January / 2014, 09:35:39 »
Advertisements
Theoretically its quite simple, but needs a little bit of hardware hacking. You would need to construct a dummy battery with three terminals, and connect this up to power the camera with some sort of small three pin connector. The middle pin (assuming an NB4L battery) would be your analog input, which can be read via a script.
There was an IRC discussion last week about updating the USB remote code to accommodate this.  The code changes are pretty simple - we would just add a menu item to the USB Remote menu to let you pick either the USB port or an A/D port (by number).   There would need to be some other changes but hopefully not in every single camera port as the USB 2.0 conversion needed (please!). 

One open question is response speed and sync.  Polling the USB remote 5V bit is pretty simple.  Reading A/D channels might be more complicated - especially for the wait_until_remote_button_release() code.   It there is some real interest in making this go, I guess I could do some speed testing like I've been doing for the precision sync code.

So all this needs is people thinking it's needed.  For mulitcamera "bullet time" rigs,  it would allow the USB port to only be used for communications - no sharing with remote functionality - so I guess that's the big driver?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #21 on: 04 / January / 2014, 13:03:25 »
Yes, for me this would really be very interesting. I have already 50 battery dummys as they come with the power supply, and they are very easy to "update" them to the needed connections.

I know, I am 1 of a million who would need such a input option. But it would really be a great thing thing for me, because I wouldn't have to solder the 50 mosfets and resistors with their more than 800 soldering points.

On the other hand it would also be some work to make the solution here make work. So if the project ever goes on, I am watching the thread... :-)

Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #22 on: 04 / January / 2014, 13:28:25 »
Yes, for me this would really be very interesting.
...
On the other hand it would also be some work to make the solution here make work.
To start with,  you could experiment with this script to see what channel the middle battery terminal affects :
Code: [Select]
--[[
@title Analog I/O Test
@param    n Channels
 @default n 12
 @range   n 0 32
--]]
set_console_layout(1 ,1, 45, 14 )
if ( call_event_proc('Driver_EnableEventProc')) ~= -1 then
    for j = 0 , 31 , 4 do
        str = ""
        for i = 0 , 3 , 1 do
            if ( i+j < n ) then
                str = str..string.format("%2d:%5d  ",i+j,call_event_proc('GetAdChValue',i+j))
            end
        end
        print(str)
    end
else print("event_proc registration failed") end
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline ahull

  • *****
  • 634
Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #23 on: 04 / January / 2014, 14:58:51 »
You will also need a suitable value for the resistor in your switch to attach to the thermistor pin, as previously stated here this will allow you to check for a particular "temperature" range.

I would think something like a couple of 10K resistors in parallel, one with the switch in line would do the trick.

Something like this

Actually on further reflection.... you probably only need one resistor... in fact you might even get away with just the switch... I'm a little reluctant to suggest shorting the ADC to ground without a resistor, but it would certainly simplify the build... all done entirely at your own risk of course.

Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #24 on: 13 / January / 2014, 19:38:13 »
Wow! Now that waterwingz told me that this sync method has been tested to obviously best values ever I am really considering to setup this thing. Half an hour ago I made a PhotoMos working the first time for me, but now it seems much better to go the way described here.

It looks really very good, I don't need to close the battery compartments, so this is no problem too. Now what will I have to do?

I have the battery dummies that came along with the chinese power supllies. Maybe I could just alter them so the third contact is added to them or I should try to build the dummies completely on my own? Maybe some plastic or wood and at the front something like this glued to it.

If I decided building my own I have a question; There are some resitors in the dummies from China. Will I have to rebuild these internals too or would it be okay only to have the right ammount of power.

What do these internal resistor do? Does anyone know?

Thanks a lot! Can't wait to work on the rig again!  :)
« Last Edit: 13 / January / 2014, 19:40:02 by Karmaschinken »

Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #25 on: 13 / January / 2014, 19:59:12 »
It looks really very good, I don't need to close the battery compartments, so this is no problem too. Now what will I have to do?
Well,  first thing is that your camera's port will need the hack that lets the camera run with the battery door open unless you can get the dummy battery wire out though the space Canon left for that purpose.

Quote
I have the battery dummies that came along with the chinese power supllies. Maybe I could just alter them so the third contact is added to them or I should try to build the dummies completely on my own? Maybe some plastic or wood and at the front something like this glued to it.
My dummies are missing the middle terminal too.  So you need some way to fake that out.

Quote
If I decided building my own I have a question; There are some resitors in the dummies from China. Will I have to rebuild these internals too or would it be okay only to have the right ammount of power.
There should not be any resistors in the dummies.  Especially any resistors attached to the terminal that does not exist  ;)

Quote
What do these internal resistor do? Does anyone know?
The camera expects to see a thermistor connected between the 2nd terminal (the one you need to add) and ground.  The resistance of the thermistor varies with temperature so the camera sends a small current through the resistor and measures the voltage drop produced (or it puts a voltage on the resistor and measures the resulting current) and calculates the resistance as R=V/I  and then converts that to temperature.   So if you leave the resistor out,  the camera measures basically open circuit voltage (Vbatt) and if you ground the terminal it measures 0V.  Either reading will appear as a unique value at the A/D and can be used to detect a switch being open or closed. If you don't want to actually risk grounding the temperature sensor terminal,  two 1K resistors in series between the terminal and ground,  with a switch to short one out will also do the trick.

Note that cameras that use AA cells ( principally the A series ) will not have a battery temperature sensor input.

Update : You have me intrigued enough to look at creating and testing a patch file for this.
« Last Edit: 13 / January / 2014, 20:06:52 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #26 on: 15 / January / 2014, 11:21:32 »
Hello! Thanks for the reply! Man, the forum was offline, and I was really afraid it could stay like that! Real horror!  :'(

I decided to try the dummy trigger method and opened both a canon akku and a dummy.

While the akku has the advantage of providing very good fittings of the contacts and it has not only two contacts, I hesitate to destroy all the akkus just to get the plates inside them. I could buy 50 cheapocheap akkus, but still this some money. So I'll focus on altering the dummies or building the dummies from scratch.

Attached is the picture of the Chinese dummies interiors. Maybe I can manage to put in that a third contact, but if I had to go the "DIY from scratch"-way, then I am still a little concerned about the resistors in the dummies. Can I really just omit them?  Please have a look at the picture. What are these resistors good for? I can't believe they are of no use, because the company that built the dummies won't put some extra expense in them without having a good reason, no?

Thanks for your thoughts!

Martin.

Ummmm, and sorry you have become so intrigued.  :D
« Last Edit: 15 / January / 2014, 11:24:07 by Karmaschinken »

Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #27 on: 15 / January / 2014, 11:47:15 »
Attached is the picture of the Chinese dummies interiors. Maybe I can manage to put in that a third contact, but if I had to go the "DIY from scratch"-way, then I am still a little concerned about the resistors in the dummies. Can I really just omit them?  Please have a look at the picture. What are these resistors good for? I can't believe they are of no use, because the company that built the dummies won't put some extra expense in them without having a good reason, no?
Interesting picture - especially the hand applied epoxy and the circuit card mounted at an odd angle.   The two resistors look like the are there to limit current - although judging by the other "missing" components the PCB was designed to also serve other purposes so they might just be serving as jumpers.  If you have a minute can you measure the resistance?  You should be able to do that right on the circuit board without removing the parts.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #28 on: 15 / January / 2014, 11:54:43 »
The two resistors look like the are there to limit current

Surely they are transistors, that is what the silk-screen legend implies.

How many connections to them, two or three ?

Re: Battery third (temp) terminal as multipurpose analogue input
« Reply #29 on: 15 / January / 2014, 12:31:22 »
1 out of ten of theses dummies did not work correctly and as said they are maybe the weakest thing in the whole setup. The glue was applied by me, as I recognized that the board began to become too loose to make the dummy work reliable.

Here is a better closeup of the "board", I suppose you are right, they are transistors. I think they have three contacts?

At the left side you might recognize my first attempt to put the third contact inside it. I suppose that when having the right materials it is the best way to alter the dummies, then I also I could have the "dummy board" where it is now. But nevertheless: Do you think I needed any of these electronics inside that?
 
Here someone builds a dummy without any extra electronics inside, and it seems he knows what he is doing. But why the hell should the Chinese company (and the Canons original dummy too!) have these boards inside then?
« Last Edit: 15 / January / 2014, 12:39:49 by Karmaschinken »

 

Related Topics


SimplePortal © 2008-2014, SimplePortal