Friday, July 27, 2018

July 27 update - actuator service installed and running as is sensor service


   Much has been done.
   The power supply booster arrived and has been adjusted and connected.
The script to operate the actuator is finished and runs as a service. The length of day to run, eight hours in summer, was programmed into the operation. The array is now repositioned every 28.4 minutes, throughout the day.
   The script takes into account the start up of the RPi at other than the 'official' start time, 10AM. If early, a wait time is calculated and run as a wait state. If late, the number of missed cycles is calulated and the array repositioned before entering the main routine.
   I replaced the four inch bolt, on the actuator mount, with an eight inch bolt that acts as a rail on which the actuator base can slide. This will eliminate the possibility of the actuator base binding.
   The sensor script is recording data daily, as a service. Some night samples were taken to test the small panels. Two of the panels began low frequency, amplitude modulated oscillation. The panels drop to zero volts in the dark. That test is done. The oscillations may be due to the 'dupont' connectors used.
   A semi-permanent form of wiring connection needs to be implemented. The existing connectors are for prototyping and aren't much good, even for that.
   Currently, I'm examining the installation of suspend and resume/reboot services for use in twenty-four hour system operation. Some operations are initialized every time the system boots and, therefore, need to be accommodated.
   The I2C expander arrived but the design has not been determined yet.
   The actuator power supply has been mounted on a section of vinyl gutter downspout. The fix is temporary but is neccessary to maintain front access at the same time as free air circulation, around the large heatsink on the back of the board.
   The following photos help depict the situation:



Saturday, July 14, 2018

relay safety, sensor, and I2C

I recently wrote and installed a service to initialize actuator power relays to a zero state. This will avoid any potential startup randomization of GPIO signals that may inadvertantly turn the relays on.

A power supply for actuator control, used in conjunction with the relay card, is on the way.
The p/s is a boost converter that will convert the battery bank's 24VDC to the 36VDC needed to run the actuator that positions the solar array.

The sensor output is recorded by a service, I've written, that records the values of A0,A1,A2,A3 and the date-time. The sensor output is sampled every 30 seconds. The functions for the sensor panels' voltages converge and diverge depending on the position of the sun and the degree of cloudiness.

A I2C multiplexor is en route from China. The device is, like most of the units I use, a breakout module. This one allows several I2C devices to communicate with the Raspberry Pi. This device elimnates the dependence on the number of access points to the I2C signal pins.
Previously, there was one set of I2C pins available on the GPIO connecot. This set was used by the RTC clock. I added a GPIO expansion module that sits on top of the Raspberry Pi. This gave me three GPIO headers to use. All I2C pins have been used. If I want to access more devices, such as sensors, I'll need to find away to expand the I2C access. This is what the I2C expander accomplishes.
The unit has connection points for several devices, each of which is selectable using address pins that can be addressed by GPIO signals.The unit can accomodate 8 devices. The units may be capable of daisychaining.