Week 4
During this week, our group met 4 times, and attended 2 lab sessions. We had previously intended to use only one power supply, meaning every LED strip was already connected in parallel, so, in the first lab, we desoldered some of the wires that connected all of our LEDs in parallel. This meant that there were four sections of LED strips connected in parallel, which allowed us to power the LEDs with 4 different power supplies. Before we could test whether the LEDs would work, we were unsure of how to shut down the Raspberry Pi safely without using a monitor. We managed to resolve this issue by acquiring a small button from the technicians, which we then programmed to shutdown the Pi when it’s pressed.
We then collected three 10A power supplies and wired each of them to 7 rows of LEDs, with the remaining 3 rows powered by a 3A bench supply. When we tested this, however, only 1 neopixel lit up (trust the process).
In our next lab session, we realised that this was because the Neopixels only work when given a root command. When we tried to run the code to light up the LEDs on boot using cronjobs, it didn’t work as the code wasn't run as a root. To resolve this, we changed the command to "sudo crontab -e" instead of "crontab -e", which gave admin permission to the LED code. Before attempting another test run, we added a 390Ω resistor between the data line and the Pi, as advised by the Neopixel datasheet. We also added a 330uF capacitor between each power supply and the Neopixels, to avoid a sudden surge in current, which would destroy our LEDs. We ran a test to first light up 10 LEDs, which was a success. We then ran another test to light up all 576 LEDs, and this time the 3 rows powered by the 3A supply lit up and acted as desired, whereas the next 7 rows powered by a 10A supply lit up the wrong colour. The next row powered by the second 10A supply was only partly lit (in the wrong colour), with the remaining 13 rows unlit.
We realised that since we were powering the Neopixels with 4 separate supplies, we would need to have a ground connection between each supply and the Raspberry Pi, otherwise the data sent from the Pi is not transferred correctly. We soldered some wires so we could connect each seperately powered block of LEDs and the Pi to a common ground, and when we tested this, all 576 LEDs turned on. We then tested the code which utilised the camera, to act as a mirror, which also worked, but it became apparent that we would need a dark background behind the subject for the LEDs to process them properly.
Comments
Post a Comment