I am in the process of designing an Arduino-powered device that will interface between two other devices. The logic is pretty simple: it will need to wait for the first device to 'short' a connection (similar to pressing a momentary-release push switch), and then it will output two signals to the second device (via optocouplers). I know the second device will be protected by using optocouplers and no direct voltage will flow to it, however the only way to 'read' the first device will be to sense when it completes a circuit (which as far as I know requires sending voltage to it as if it were a switch).
My desire is to protect this device as much as possible. I will be using the 3.3V Arduino Pro Mini (unless someone suggests another device). I am familiar with programming logic (including C), though am not very familiar with the electrical engineering aspect of micro-controller programming. I have read about pull-up and pull-down resistors being used with switches to ensure the proper reading is obtained when there is no input at the switch.
I am curious as to which is a safer means to connect to the first device (that in essence is an automatic switch), and should I be using a diode or other form of protection to prevent any excess voltage from entering the device? I am guessing pull-up as it seems the 3.3V is connected to the device only when the 'switch' is being pressed, but do recall something about electricity actually flowing backwards so want to get the opinions of others with experience and knowledge. (if there is another way to 'read' the device such as how an optocoupler 'writes' to a device, please let me know)
Below are two images of both pull-down and pull-up connections from the Arduino to the device being read (the output device optocouplers/resistors are not drawn). I apologize for the lack of standard schematic symbols - I have not had a chance to learn Eagle or another program yet. To see standard conventions illustrating what I am questioning, please look at Fig 5.5 and Fig 5.6 at ladyada.net/learn/arduino/lesson5.html
this software is not letting me post the image directly : the drawing is at i977.photobucket.com/albums/ae259/travel5239/arduinoswitchpulldownvsup.png
Another question is can the Arduino Pro Mini provide +3.3V power or does this need to be wired directly to the battery with this board? Speaking of battery, what will be an effective (preferably lightweight and long-lasting) battery solution to power the 3.3V Arduino (plus resistors you see in the drawings and 2 optocouplers/resistors not in the drawings)? It will most likely be powered on for around two hours at a time, and I'll attach an on/off switch to the battery to power down when not in use. I have to study the capabilities/functions of the chipset - if supported, I'll be using interrupts or other routines to save power consumption while waiting for the first device to 'send' its signal. (Does the Arduino Pro Mini board consume more power than something like an ATtiny25V chip with the basic necessary components?)
Thanks in advance for your suggestions!