Party Vibe

Register

Welcome To

Raspberry PI 2 light sensitivity hardware flaw (repost)

Forums Life Computers, Gadgets & Technology Raspberry PI 2 light sensitivity hardware flaw (repost)

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • Reposted for Tryptameanie – this issue should be fixed in the Model 3 (the offending chip is U16; which in the newer model has been given a better coat of light sensitive paint).

    All semiconductors (transistors, silicon chips etc) are light sensitive – sometimes this is useful (such as the sensor for your TV or hi fi remote control that picks up the IR light) or other light detectors; or in chips known as optoisolators which are used in power supplies and control circuitry to keep strong voltage from the mains or noisy signals away from more sensitive equipment.

    You’re a star GL, thanks very much.

    The same phenomenon being put to good use (this RPI is the old model B that does not have the flaw)

    https://www.youtube.com/watch?v=5tzvvC6LJOY

    the very useful python app will show the signals from GPIO inputs – in a radio studio these are generated via the mixing desk/console; in many setups these are linked to other equipment that either switches LED indicators at 5-24 volts DC or other optos/relays that can safely switch a 230V lamp (less common nowadays).

    However, these control wires can be misconnected and anything more than 3,3V DC on a RPI GPIO will blow it up.

    The circuit board contains 4 optoisolators type Philips (vishay) CNY17 wired up as below (apologies for this poor diagram as I am not smart enough to use an electronic layout program; I find them too distracting for simpler circuits). Only one of the 4 is shown as the setup is identical for all of them.

    I have put boxes around what is in the chips and the RPI itself.

    Within the opto, there is an LED which can shine light directly to the phototransistor via a light guide. the rest of the chip is filled up with opaque material so external light cannot affect its working. The opaque plastic and light guide are made of good insulators that would not even allow strong voltage higher than the mains to get through; so the two sides of the circuit are isolated from each other.

    The LED is connected via a 1K0 (1000R) resistor.

    Any voltage of 6-12 volts connected to the input allows about 10mA current to flow through the LED which lights up (but you cannot see it through the opaque case)

    Inside the Raspberry PI the GPIOs are connected via a pull up resistor to 3,3 volts DC (derived from the 5V USB supply via a regulator). This means they are always at “high” level (logic 1) unless connected to the GND (functional earth) of the RPI which is derived from the negative (0V) of the USB. If that was not done the GPIO would pick up random electromagnetic interference and any software reading it would be unreliable.

    However, the functional earth is not necessarily directly connected to the frame/protective earth (earth ground) of the rest of the installation (most USB mains power adaptors use only the two 230V pins and are “floating” on the 0V with respect to protective earth).

    This is a trap for the unwary as it is very easy to knacker an RPI by connecting a “ground signal” that is at a different potential to the RPI GND.

    So the GPIO is connected to the collector of the phototransistor.

    this is a NP-N type (the direction of the arrow shows this) so the emitter is connected to the GND signal of the RPI. (PNP transistors use different polarity; although I’ve yet encountered a PNP opto)

    The base (although present, not all optos have this connection) is not used in this application. It is used in other transistor switches where a small current flowing through the base makes the larger current flow between the collector and emitter.

    This is because we use just light to control the phototransistor!

    When current flows through the LED strong light shines directly upon the phototransistor. It then conducts electricity from the collector (GPIO input) to the emitter (GND). this is a more direct path compared to the connection from 3,3V via the pull up resistor; so the voltage at the colector and GPIO is now at GND which can be detected by the software.

    When the input voltage to the LED is removed; the light goes off and the transistor stops conducting. The GPIO is thus pulled back up to 3,3V via the resistor.

    This arrangement makes it easy to control the electronic display by connecting the signal inputs to existing switched low voltage supplies for the LED lamps elsewhere in the studio and helps protects the RPI from any dodgy wiring (even worst case cock ups are more likely to blow up the cheap optos (a bag of 50 costs just a few quid/euros) than the RPI).

    Although this signalling (known as active low) does mean the logic is inverted it is widely used in embedded electronic systems [especially in industrial/commercial systems] as this use of optos is very common.

    26387485305_364618ccb6_b.jpg

0

Voices

1

Reply

Tags

This topic has no tags

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Forums Life Computers, Gadgets & Technology Raspberry PI 2 light sensitivity hardware flaw (repost)