[quote author="NsN"]The important questions are: - How big can this circuit be / at what point would it be easier to change something else to get a free pin. - How much energy would be too much to waste. - At which currents do your LEDs start to light up.[/quote] Most LEDs starts to light between 0.05mA and 0.1mA. You can see it when ambient light is dim. The voltage drop is about 0.6..0.8 times the value at the default test-current of 20mA (or 10mA for some) when they start to light up. However, there is a wide spread of specs out there. General rule is that the more efficient the LED is, the sooner it starts to light up. Blue LEDs generally start to light even sooner.
It may be better to use more pins, or even use a 595 shift-register to get a few more outputs. The static current of such setup is very low. It all depends on the space you have available and the target design. Without more information it is hard to tell when one or another design is preferable.
At 5V supply you have both LEDs lighting. Suppose a 1.65V drop (for red), then you have 3.3V over the LEDs and 1.7V over 2x 450Ohm, or about 1.9mA. That is enough to have them lit all the time; not very strong, but enough. Actually, at these low currents, the voltage drop over the LEDs is a bit lower and it would settle at a slightly higher current.
The button input level must ensure a high/low state. For purely digital input, you need Vil<=0.2*Vcc for low and Vih>=0.6*Vcc for high (Atmel) and Vil<=0.15*Vcc and Vih>=0.25*Vcc+0.8 (Microchip). For 5V supply that translates into <=1V and >=3V (Atmel) and <=0.8V and >= 2V (Microchip, see datasheet for detail).
For all practical purposes and intents, you cannot use the center of the LED totem-pole, which would be at 2.5V in an Atmel setup as it does not reach Vih.
I recently answered a question about how a specific circuit worked and I was so intrigued that I just needed to write down my findings and share it.
The circuit uses a single (cheap) push-button to make the output toggle with debouncing and no-delay switching. The circuit used originally two NOR-gates and was embedded in a mixer-table. I boiled the circuit down a bit to get to the bottom and this is the result:
The original NOR-gates were used to be able to do predictable power-up behavior as well as global set/reset functionality. The elegance of the circuit is brilliant IMO.
Basically, if you increase the reverse bias, then you increase speed and sensitivity of the diode. However, you seem to have enough margin for your application, so you should just try it with the simplest design. A DC coupled system needs an amplifier that can cope with the low- and high-bound of the diode output, whereas an AC system you can tune it more specifically.
[quote author="nickjohnson"]Why AC-coupled? The schematic I'm using does reverse bias it, but I'm prepared to put up with the dark current, since I'm not looking to measure small signals.[/quote] The signal you measure may be large, but the response-time of the diode is in large part dependent on the capacitance. In a 3.3V or 5V system you generally have not enough margin to drive the diode to its lowest possible capacitance. Most diodes can be reverse-biased at 15V or more (very high-speed diodes at 100..200V).
The PN barrier will increase size with higher reverse-voltage and thereby reducing the effective capacitance of the barrier. Electron jumps will then result in a larger voltage step because the charge change is not absorbed in the a high capacitance (Q=C*U --> U=Q/C). At high reverse-bias you need fewer electrons to jump to see the same delta-U on the output, effectively making your system faster.
However, your electronics beyond the photodiode will most likely run on a lower voltage. Therefore you need to do DC isolation to protect your logic. Therefore you need AC-coupling. Your trigger system will probably work on edge triggering just as well as level-triggering. Considering the speed of the pulse, you probably already use edge-triggering.
[quote author="nickjohnson"]I'm aware how many orders of magnitude it is. :) Alternately, it's a one-SI-modifier mishap.[/quote] I'd argue against a SI modifier mishap because the SI-unit for seconds is lower-case 's'. Just to be pedantic ;-) (couldn't resist)
Quote
As long as the delay is consistent, this won't be an issue. The flash of light is what triggers capture, so absolute timing is not essential.
Consistency should be no problem. The trick when using "cheap" photodiodes is to do AC coupling and a suitable amplifier stage. Then you can drive the photodiode in reverse with a high voltage to lower the effective capacitance and at the same time increase the yield (in case of a pin- or avalanche-diode).
Ok, that is a three orders of magnitude mishap. However, it completely changes the game and now /most/ photodiodes with reasonably low capacitance will be sufficient. A 100..200MHz GBW opamp should also be enough to get a sane signal too.
edit: You _do_ have to take into account that the group-delay of the system will be dependent on the quality of components. You may see a signal at the output that has 0.1us...10us delay, depending sensor and opamp.
Mouser has the ad100-8, which is reasonably priced. If you need visible light, then it gets more expensive at high speeds. I just selected photodiodes at mouser and selected the fastest rise-times to see what was available and browsed a few datasheets ;-) . Doing visible light at high-speed gets progressive more expensive. Silicon peaks at IR (900..1200nm) and silicon visible light sensors are hard to make with low noise (one photons for possibly two electron jumps decreases the noise-margin considerably).
The TEMD6010FX01 is not suitable to do nanosecond pulses. It is for ambient lighting and has response times in the order of many micro-seconds. You probably wouldn't see a nanosecond pulse, even with very high amplification as it would just vanish in the noise.
The sensor itself is +/- 0.5 degree at room temperature and +/- 1 degree over -10..+85 degrees. So, some static deviation may be expected and can normally be corrected for in software with a config parameter (set for each chip separately).
There is always a chance of self-heating, or rather, heating due to surroundings. If the sensor is next to other other active devices, then some heat may be transferred and a systemic error will be generated. You should ensure a stable power supply and proper decoupling. Noise propagation may generate a significant error too.
You can test the difference from self-heating and heating by surrounding chips by varying the query frequency of the sensor surrounding electronics and see how that influences readings. You need to do measurements over some period to see if there are stable points that need your attention. Take care that you have no changing environmental settings while testing (like airflow) or your measurements will become suspect.
A lot has happened since I started the gcmc project. It is currently at version 1.5.1 and the syntax has matured to a level where you can write many complex algorithms with only few lines of code.
LinuxCNC's ngcgui now has direct support for gcmc and you can create patters from withing ngcgui.
The latest release improves on the documentation, providing an introduction doc and also adds a couple of new examples: [attachment=2] [attachment=3] [attachment=1] [attachment=0]
Did you take contact resistances into account? You add to the total resistance every time you have a solder-joint or a connector-pin/socket connection. I see you have two connection point on each side of the PCB resistor. Did you use a 4-point measurement setup for the voltage measurement (i.e. the voltage measurement is directly over the resistor and does not draw current)?
The graphs at low current (up to ~30mA) seem to suggest that your measurement is binning. The resolution is probably too low in that area to get good/real results.
[quote author="t0mpr1c3"]There's something very neat about the symmetrical quadrants in the prototype.[/quote] Yeah, that was quite a bit of fiddling to get that to fit. The optimum was a 10x10cm PCB, so that had to do. The holes are actually very close to the border to get a seamless connection between the quadrants. The price for the 20x20 PCBs have come down enough to do everything on one large now and I have confidence that the design will work as intended.
I have had no clock in my house ever since I scrapped my VCR many years ago. However, I did miss a visible clock and wanted to make one. But when you make something, it must be special, at least that is my opinion.
At some point I was being silly and got the idea of making a 7-segment clock, but then a bit different. The result became this: [attachment=1] [attachment=0] Features include:
72 7-segment displays in three rings; inner (hour) ring 12 displays, middle (minute) ring 24 and outer (seconds) ring 36 displays
Light sensor for adaptive display intensity; lighter during the day, dimmed at night
Movement sensor for waving interaction; show time/date with a wave of your hand
Each segment individually addressable with 256 levels of intensity
Ethernet connectivity for remote control and power entry
NTP synchronization for (near) perfect time
Some blinkenleds for indicative purposes
Buttons and RTC for off-line time-keeping
3D printed case in four sections with Plexiglas cover and back
The whole clock is documented further at my homepage: http://www.vagrearg.org/content/504segclock There are still a few things to fix. Currently this is iteration three and there will be a fourth (and hopefully final) one. It does look nice, if I may say so myself ;-)