TX_Text_PD_2_Ok by Tamadite

Cloned from Sketch TX_Text_PD_1_Ok by Tamadite

Code for Attiny85. Meant for 1MHz/Internal_clock&1200baud. Photodiode as trigger

SHORT DESCRIPTION

Basic sketch & circuit meant for capturing the blink of a led on a home electricity meter.

The solution features a one-way RF communication between the Attiny85 (sender) and an Arduino UNO board (receiver).

OPERATION

As the photodiode (PD) generates a potential difference or changes its electrical resistance when exposed to light, the idea is to put the PD in front of blinking led on the electricity meter. The PD shall be covered so it does not get light from the surroundings.

OPERATIONAL DETAILS

  1. The Attiny85 is set at 1MHz in order to save battery
  2. 600 bauds feature a lecture on the analog pin of the Attiny85 every aprox. 120ms
  3. A delay of 20ms as stabilizer is recommended after man.transmit since it has been observed that radical fluctuations on the PD may affect RF transmissions.
  4. As the PD is inverse biased, the more light it receives the lower the analog value read on the analog port of the Attiny85. The darker the higher the value.
  5. A threshold value of 200 has been set.

The Receiver only:

The Sender only:

The Solution:

Embed This Sketch

Use the following HTML code to embed the sketch code above in your blog or website.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/sketch:387427" frameborder="0"></iframe>

Embed The Serial Monitor

You can also embed the Serial Monitor section! Just use this HTML code.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/serialmonitor" frameborder="0"></iframe>