Tenrec-Builders / pi-scan

Pi Scan is a simple, robust capture appliance for book scanners. It runs on a Raspberry Pi 2.
BSD 2-Clause "Simplified" License
264 stars 37 forks source link

trigger via GPIO pins #5

Closed konos93 closed 7 years ago

konos93 commented 7 years ago

which gpio pins i need in raspberry 3? how to use them?

i have the original power supply for raspbery pi scan with battery on cameras seems to work perfect. i used a power supply with 4,5 volts and 500 mA ,pi scan disconnect the cameras . if my a3000 canon need 4,3 volts will a power supply with 4,7 volts an 2250 mA will be ok? cause with 2250 mA and 4,7 volts seems to work perfect how can i set chdk withour firmware update? can pi scan be faster? in any case you have done a great work its more comfortable for me .thanks alot

duerig commented 7 years ago

I think you may have gone off the rails a bit. Do not apply voltage to any GPIO pins. The only power that comes onto your Raspberry Pi is via the micro USB power cable. Hopefully you have not shorted out a pin or damaged your Pi.

If you want to trigger the cameras via the pins, all you need is a switch. The Pi Scan software detects when the two pins have a connection between them or not and then triggers the cameras just the same way as when you tap the 'capture' button.

So, here is what to do:

(1) Have a switch (or just touch two wires for testing) connected to GPIO21 and GND. See http://tenrec.builders/quill/guide/electronics/pedal/ for photos of which pins. These are the two closest pins to the USB port side of the board.

(2) Turn on the Pi and navigate to the capture screen. The trigger is ignored except when on the capture screen.

(3) Short your two wires or close your switch.

As for your other questions:

Pi Scan uses the software control interface to talk to the cameras. It does not do the USB power reset trick. So there is no special voltage requirement here.

If you want to use an AC adapter to power your cameras, you should look up the particular camera battery pack and try to emulate it exactly in terms of voltage and amperage. I know that some people have done DIY solutions, but I just purchase adapters that are made by others. I use HQRP brand adapters quite a bit and they are pretty reliable (only one dud so far, and it just didn't work rather than caused voltage problems). So look on their website or on Amazon to find adapters that match your cameras.

To set CHDK without a firmware update, you need to make your disk image bootable. There are a number of tools linked on the CHDK website that will do it for you. I'd try out one of those. After you make it bootable, you need to lock the SD card by flipping the physical tab on the left. You will know you succeeded when you turn on the camera and immediately see the CHDK splash screen.

Pi Scan can be made somewhat faster by making sure that the external storage SD card or USB allows for high write speeds. If things are going slow, this is a likely bottleneck. At its fastest, Pi Scan can usually take a pair of photos every four seconds or so which is about as fast as I can turn the page and set up the next shot. To maximize your workflow, get into the flow of starting to turn the next page as soon as you hear the click of the cameras. If you are waiting for each processing cycle to complete before starting to turn the next page, you are scanning half as fast as you could be.

I hope this helps.

konos93 commented 7 years ago

thanks a lot for the answers. i used nikonl29 with mechanical trigger ,manual zooming,putting out sc cards to pc ,rename images and set cameras again. but sometimes i was scanning like less than 4 sec with this method.

now with canon a3000 and pi scan my scanning is easier to use by someone. with mechanical triggers you had to have your mind clear like a thibet monk to understand if you have took a photo or not .

If i want to trigger the cameras via the pins they will work like i was pressing space right? for raspberry i use the original charger 5.1volts 2500 mA. for cameras i took two canon batterys nB-6lh cut them ,kept the electronic board and the plastic they have. find how to set the voltage and connect them to a 4.5 volts 600 mA. didn't work well with pi scan.so i connect them with 4.5 volts 2250 mA and is fine.

--------- if you can please tell me if you set a multimeter in your battery simulation how exactly voltage do you see for your cannon cameras?

i will use a dc-dc buck converter and set them 4.3 volts and 2250 mA to see what happen. but i am afraid they will cant take the volts they need cause with with dc-dc buck converter 4,3volts and 600 mA. i see a voltage drops under than 3,6 volts. camera starts but stuck and turn out.

for chdk i set it bootable .i already had a full version so i follow this and worked.you are very helpful --- enter the CHDK menu, and select Miscellaneous stuff -'> SD Card' -> Make Card Bootable Turn your camera off, write protect the SD card by moving the little switch on the side of the card to the locked position, insert the card back into your camera. Note that CHDK will cause the camera to ignore the lock switch so that you can take pictures normally. ---

so i will try know spread pi,spread and see which is fastest. got stuck with shh connection. i will ask a fedora guy in hackerspace to help me

in any way, have a nice day cheers and thanks a lot again

konos93 commented 7 years ago

if capture photos first and after many pages copy them in storage will the capture only process will be faster?cause i think 3 sec will be fine. how difficult is it to be made?

why some images cant recognised in image folder?do i do something wrong?i think the capture point of these "blank" images is white.

i deleted image folder but page doesnt count from 0000.should i delete something else?

duerig commented 7 years ago

In my experience, the fastest cycle for both the human and the Pi Scan setup is about 4 seconds per capture. It is possible that you could make it a bit faster by leaving the images on the camera. But I've found that with a decently fast SD card for external storage, Pi Scan almost always keeps up with my page turning as it is now.

It might be a bit faster to use TwoCamControl if you have access to a Windows computer and a fast hard drive.

Make sure you haven't corrupted your external storage. Try re-formatting it before your next scan. This will clear everything off of it and fix any filesystem corruption. Make sure not to take out the external storage disk or turn off the Pi unless you are at the 'Pi Scan 1.0' screen and the text says it is ok. If you take it out or turn off the Pi at other times, it can corrupt it just like taking any disk out of a computer without ejecting it.