Daniel Reetz, the founder of the DIY Book Scanner community, has recently started making videos of prototyping and shop tips. If you are tinkering with a book scanner (or any other project) in your home shop, these tips will come in handy. https://www.youtube.com/channel/UCn0gq8 ... g_8K1nfInQ

Enhanced camera control...

Everything camera related. Includes triggers, batteries, power supplies, flatbeds and sheet-feeding scanners, too.
jimb
Posts: 14
Joined: 04 Mar 2014, 00:52

Enhanced camera control...

Post by jimb » 15 Jul 2009, 10:16

This is actually an extension of a conversation begun in the Social board.

I am in the process of designing a new handle for the scanner that will allow remote focus and zoom of the camera with the same hand that you snap the picture and lift the platen. Primarily this will allow for ease of handling those images for which a camera just does not want to focus. I will provide more of the design later today, but for now this is a response to Daniel from his query about using the Arduino controller.

Daniel, I had considered Arduino and had settled on a SchmartModule with a PIC controller solely on a price point. I can get a SchmartModule and PIC microcontroller for about $16, where an Arduino and controller (using the mini) would be about $19. However, I have no aversion to the Arduino and using the pro-mini 5v version of the Arduino board provides a number of advantages. First we could probably get power for the unit by using a powered usb hub as the hub that this and the cameras plug into (more on the hub later). Also, the ATMega168 processor provides much more capability that is required for what I had in mind, namely several analog i/o points so we could add servos for the cameras at a later time so for $3 maybe a better choice.

We could do without a hub in all reality, but I had in mind keeping the hub in place and using a 4 port hub so that a computer could be plugged into the scanner and images downloaded from the cameras rather than removing the memory cards (newer versions of chdk allow for use of the usb port for both remote trigger and data access). We could use a powered hub and carefully cut traces so that microcontroller can control the power to the cameras (if we connect the power lines from the camera usb ports to outputs from the microcontroller individually then we could control cameras individually also) and bring the power itself to the microcontroller board. For a computer I had in mind a lower end laptop (from ebay or other sources) and two video to usb converters (they can be had for as little as $20 each) then the real-time video from both cameras can be displayed so that you can focus and zoom to your hearts content. The computer could also be used to do the image processing from the camera raw pictures.

More on the Schmart board can be found at: http://schmartboard.com/index.asp?page= ... ted&id=203 but I think I like your idea of the Arduino better. I will have a full parts list and list of functionality later tonight.

I can design the electronics and the software and might even be able to provide assembled units to anyone who might want them. The main problem I have is how to design the physical handle itself. We would need room for two or three 12mm rotary switches, one pushbutton switch, and the Arduino mini (it has a 28pin dip form factor).

User avatar
daniel_reetz
Posts: 2797
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: Enhanced camera control...

Post by daniel_reetz » 15 Jul 2009, 10:54

Thanks for writing this up! a quick reply before I head to NDSU -- there are some super-cheap Arduinos out there, minus USB: http://www.moderndevice.com/RBBB_revB.shtml ... there are units with USB, too.

User avatar
daniel_reetz
Posts: 2797
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: Enhanced camera control...

Post by daniel_reetz » 15 Jul 2009, 12:06

I'm glad to hear that the Arduino would give us more flexibility; it would be great to use it and the open-source nature of the device really fits with the DIY ethos we have going here. It also has a large community and well, I have a self-interest here: it's the only microcontroller I know how to use. I know I can spare an extra $3 for openness.

To my mind, using a USB hub to gain the aforementioned flexibility (unloading, individual camera control) would be well worth it. I wasn't aware that CHDK now allows for both unloading and USB control! Impressive.

If you can imagine the handle being made from acrylic or wood, I can cut any shape or design with my laser cutter. I could do occasional runs of handle housings or at least help you prototype.

jimb
Posts: 14
Joined: 04 Mar 2014, 00:52

Re: Enhanced camera control...

Post by jimb » 15 Jul 2009, 17:37

Actually, I misread something with respect to remote control and data transfer. they are not currently supported at the same time. Ref http://chdk.setepontos.com/index.php/to ... l#msg24167
However it should be technically possible to do this with some change to chdk. I'll look into that once I get into the camera and chdk some more. at this time it is of lower importance to me than getting the switch enhanced.

jimb
Posts: 14
Joined: 04 Mar 2014, 00:52

Re: Enhanced camera control...

Post by jimb » 15 Jul 2009, 19:05

Well, I have just committed to this project :)
I already have the two A560's and I just ordered the Arduino development board from the RobotShop and 10 rotary encoders from SureElectronics. I expect the development board in a few days and I'll start development when it gets here. The rotary encoders, however, may be longer since they ship from China. I can emulate them with four toggle switches, two pb switches, and four latches until they get here.

jimb
Posts: 14
Joined: 04 Mar 2014, 00:52

Re: Enhanced camera control...

Post by jimb » 16 Jul 2009, 22:29

Following up from yesterday...

I have settled upon a Targus super-mini usb hub. They run $20-35 new, but the local Micro Center has several refurb units for $7. You can also get refurb units from ebay for $8 at this url: http://cgi.ebay.com/Targus-ACH63US-USB- ... 7C294%3A50

This little unit has some good reviews and has some unique features. 4 usb-a ports and a mini usb port. the cable that comes with the unit plugs into the mini usb port and is a y-cable that has one usb-a connector to plug into the computer that transmits vcc, gnd, d+ and d-. the second usb-a connector is optional and connects to the computer and transmits vcc and gnd to provide additional amperage to devices (such as a micro-controller). it also has a plug for an ac adapter but there is NO information on the net about this plug. I suspect it is meant to provide a straight +5 volts. I have pictures to upload later tonight. it is easy to disassemble and the circuit board (if you remove the four usb-a connectors) is .75 x 1.5 inches.

jimb
Posts: 14
Joined: 04 Mar 2014, 00:52

Re: Enhanced camera control...

Post by jimb » 16 Jul 2009, 23:29

The rotary encoders that I am planning on using are available in quantity on ebay. One of the vendor's auctions is at http://cgi.ebay.com/12mm-Rotary-Encoder ... 7C294%3A50

These are 12mm encoders with nobs about the size of a nickle.

He charges $16 for ten encoders and they are 2 grey bit encoders with a built-in push button switch. The micro controller can easily determine direction of turn and produce an interrupt on change of the encoder and the pb switch. I plan on using three encoders, one for zoom, one for focus, and one for camera select. By default the micro controller will presume auto-focus, auto-zoom, and both cameras selected. when an encoder (rotary nob) is turned the micro controller will (in the case of zoom and focus) determine direction and send the appropriate command to the camera. pressing the pb on that encoder will reset back to automatic. the third encoder will just cycle between cameras with the pb returning to both cameras selected.

jimb
Posts: 14
Joined: 04 Mar 2014, 00:52

Re: Enhanced camera control...

Post by jimb » 16 Jul 2009, 23:56

For the micro-controller, I have settled on the RBBB board by Modern Device (thanks Daniel :) and the USB BUB board from the same company. Total cost for the RBB kit and USB BUB would be $24. You can see it at http://www.moderndevice.com/RBBB_revB.shtml and http://www.moderndevice.com/connect.shtml. Size of the RBB is 2.23 x .6 inches (we can remove the power jack and regulator) and the USB BUB is 2 x .86 inches. Another option is the Iduino kit which has the USB on board and costs $18 and has a size of app. 3 x .6 inches. This board can be seen at: http://spiffie.org/kits/iduino/. There is also the fully assembled StickDuino for $20 with a size of a typical USB stick. it would plug directly into the Targus usb hub I posted on earlier and save the cost of a cable. It also uses a form of the micro-controller that provides another two analog inputs for possible later use. You can see this at http://spiffie.org/kits/stickduino/.

Anyone have ideas on a handle to mount this stuff in ???

User avatar
daniel_reetz
Posts: 2797
Joined: 03 Jun 2009, 13:56
E-book readers owned: Used to have a PRS-500
Number of books owned: 600
Country: United States
Contact:

Re: Enhanced camera control...

Post by daniel_reetz » 17 Jul 2009, 00:51

One of the vendor's auctions is at http://cgi.ebay.com/12mm-Rotary-Encoder ... 7C294%3A50
Man, I paid that much for a single Bourne rotary encoder not long ago.

you1
Posts: 92
Joined: 04 Mar 2014, 00:53

Re: Enhanced camera control...

Post by you1 » 17 Jul 2009, 18:01

jimb wrote:Anyone have ideas on a handle to mount this stuff in ???
I'm still trying to understand how this stuff works :)

Thank you for sharing your effort

Best,
Edvin

Post Reply