Having achieved single pixel camera for black-and-white and colour during the past several weeks, our goal this time was expanding the camera to 16 black-and-white pixels. At first, the multiplexer was needed given that 6 analogue ports in Arduino UNO was not enough. The testing circuit for 8-CHANNEL ANALOGUE MUX 4051 was shown in Figure 1, which was aimed to ensure the multiplexer to work as expected.
 |
| Figure 1 |
Then, a 4*4 LDR array was built on the prototype board, together with 16
corresponding resistors and two 8-1 multiplexers. The surface and
connection were shown in Figure 2 and Figure 3, respectively.
 |
| Figure 2 |
 |
| Figure 3 |
Codes of Arduino and UNITY were modificated for this 4*4 pixels colour sensor circuit. In theory, when all 16 LDRs were covered, a black image conprised of 4*4 black blocks should appear on the screen while a white one is expected when all LDRs were exposed. The preliminary results were illustrated below in Figure 4. The left 8 LDRs were exposed and the right 8 LDRs were covered. It can be seen that the left 8 pixels on the screen presenting white while the right 8 pixels appearing to be approximately black.
 |
| Figure 4 |
|
|
|
|
However, there existing some differences between the pixels, for
example, the black presented by 8 pixels on the right was not exactly
same. There are multiple potential factors contributing to this error
and one of them can be that the surface of 16 LDRs were not parallel to
the prototype board perfectly. Thus, light intensity detected by every
LDR varied when the light from one specific direction was placed. Hence,
further calibration was necessary to reduce this error.
没有评论:
发表评论