Tuesday, September 26, 2023

The last detail (?)

 The last detail is the hookup  of the limit switch to the system.

There are a number of reputable sources with apparent conflicting or inconsistent information. One resistor, two resistors, no resistors. 

I finally decided that a direct connection of the switch between 3.3VDC and ground with use of internal pull-up/-down resistors was what I would use.

Tomorrow, I'll do a trial run of the system.


Monday, September 25, 2023

All but done with linear actuator drive circuitry.


 The tests are done but for the actual hookup of the new  circuitry to the LA36 linear actuator.

Some changes needed to be made. A minor problem is the cheap hookup wire. Bend it a few times and it breaks. The grounds had to be isolated on the H-bridge inputs. One ground connection from one level shifter to one H-bridge input. 

I mention the small parallel mosfet boards, with no input isolation, in an earlier post. A couple of those boards are being used as level shifters to convert the raspberry pi 3.3VDC GPIO output to the 5VDC needed to drive the H-bridge inputs. The 5VDC also comes from the raspberry pi.

The ground jumpers I had originally installed on the H-bridge inputs, to create a common and shared ground reference, needed to be removed. This was the last hardware modification. 

Next, I need ti incorporate the forward, reverse, and off python scripts into the LA36 driver script.

The image show the new circuitry/PCBs. The level shifter are top left and the H-bridge is bottom left.



Friday, September 22, 2023

Real world adaptation - SSR

 Recently, I breadboarded and tested a four-channel mosfet pcb. The channels were not, as I had hoped, isolated, but share a common ground reference.

I made some changes and got the unit working as a reversible H-bridge motor driver.

However, after I installed the unit on the power panel, I discovered the unit was not functioning as expected. I ran some in-circuit tests on the pcb and everything seemed okay.

My observations of the unit led me to believe the opto-isolators were not being driven high enough by the RPi 3.3VDC GPIO pins. My last test was to substitute the 3.3VDC with the 5VDC, also from the RPi. Success. Now I'm examing the parallel mosfet pcbs I purchased earlier and rejected due to having no opto-isolator input buffer protection. Since those pcbs will drive an existing opto-isolator, there should be no problem.

The proposed level shifter pcb circuit:




Monday, September 18, 2023

Interim Linear Actuator driver pcb

 

   I purchased a Chinese four channel mosfet pcb on eBay. As it turned out, the chanels are not isolated from each other but share a common reference ground.

   Recently, I realized I could modify the pcb and use as a reversible H-bridge motor driver. Previouly, I had considered a different design but decided to discard the design. There was no 'off' position. One direction or the other would  always be 'on.'

   Currently, the Qg of 1,4 are tied together as are the Qg of 2,3. This allows only two control signals to run the driver. There is a combination of the two control signals that will allow an 'off' position.

   The Qs of  1,3 were lifted from the pcb and soldered to their respective followers; Q1s --> Q2d and Q3s --> Q4d. This created the necessarily isolation for H-bridge use.

   The images below are before and after using the LSpice XVII simulator. I've not run the simulator yet, but I have successfully built and tested the circuit on my Heathkit breadboard lab.


Before:


After:



Sunday, September 17, 2023

Disaster, almost

 


Lightning hits the solar station.


   Saturday afternoon, September 9 (2023), lightning struck my solar station.
   I happened to be looking at the indoor power panel, when the bolt struck. There was a flash of light, the clap of thunder quickly followed by a popping noise at the panel and a small flash.
   I waited till the storm abated and disconnected everything. The inverter, which converts battery power to household power, began to whine. The internal alarm had been set off by the strike.
   I reconnected everything to a smaller backup inverter and examined the main inverter. There appeared to be no other damage other than the overload light which was continuously on. I think the light was also affected by the strike. 
   This morning, I reconnected the unit after a thorough examination. I disconnected the alarm during the examination and am going to give the unit a real world test. My theory is the unit will function as before, excepting the protection circuitry.
   The reason the damage was not greater, I believe,  is due to the nature of my station construction.
   The panels are bolted to a steel pipe which leans against a 2"x6"x8' piece of lumber. The lumber is attached to an aluminum ladder. The only part of the panels made of metal, are the frames. The cable running to the house is supported by steel aircraft cable attached on one end to a pvc pipe and on the other to a bracket bolted to the side of my house.
   I think the bolt struck the steel cable and jumped to the ladder and ground as well as my indoor power panel. That would explain the minimal damage.
   I need to ground the cable by making the circuit from cable to ladder, to earth ground, continuous by connecting the cable to the ladder and the ladder to a rod driven into the ground.

Everything's back to normal after I disconnected the inverter alarm. I examined the outdoor part of the station and found nothing. The line from the array to the house was sagging so I tightened the supporting cable while I was at it.


BOOM!!!



Friday, September 15, 2023

SSR development and new image processing scripts

The last post, I outlined the options for adding a solid state relay (SSR) to my system as a replacement for electro-mechanical relays. 

PCBs & SSRs
I've been exploring all, simultaneously. The mateials and methods for diy pcb manufacture are all but complete. The acid comes from a battery that failed in my solar station. The acid, surprisingly, is self renewing if time and hydrogen peroxide are added. The remaing block is the drawing tool. Permanent markers work, to a certain degree, but chemical reactions have to be monitored or too much copper etch could be removed.

I've also been using the EasyEDA system for pcb design and manufacture. If the software were more user friendly, the process would be an obvious choice, given the price.

The third front is a purchased ready-made pcb. This is possible and affordable since I only need one. However, the sellers come and go and there's no guarantee the same seller/product will be available should the unit fail. The cure is to stick with well estblished and well known companies, which also means a substantial increase in costs. I ordered a pcb which was not entirely ready, and made a couple of modifications to make the unit ready. Unfortunately, an input LED was crushed and the circuitry is SMT.
SMT is miniature parts machine placed and soldered, unless you have the hands of a neurosurgeon.



IMAGE PROCESSING SCRIPTS
I wrote and tested a script that runs as part of an existing linux service on the Raspberry Pi.
Each day, the script is called and creates an image from the day's csv data file. The image is moved to a folder made for the imges.

My system began around 2016. Not much later, I began collecting and saving the data in the form of comma separated values (csv) files. Subsequently, I've accumulated a lot of them.
I developed and tested a script to batch process a folder full of csv files. The script works with one hitch. Recently, an occasional blip in the data will occur. This will cause the script to halt. I do a CTR-C and respond to the "contnue?" query with a yes. The script skips the problem file and continues processing the folder. There is a scrijpt that examines the csv files and deletes partial, incomplete lines . I need to finish that and incorporate the script into an existing daily linux service.

NOTE: for some reason, my Raspberry Pi 3B+ crashed and is not useable anymore. I've programmed the Raspberry Pi 4B I've had in storage, as a replacement.