Wednesday, January 25, 2023

Solar Shed - Intstall

 

I kept all of the big currents (charging and SHED LEDs) on the add on PCB.  To make the A/D readings as stable as possible. I added a unity gain OP-AMP on all inputs, a 16 sample rolling average, some thought on the ground connections and ground pour on both sides of the add on PCB.  But the OP-AMPS have to powered by the development board, so minute current is flowing between the Curiosity HPC board and the daughter board.  Also during development the whole system is powered by USB, since the development board has the debugger built into the board (PIC24 16 bit).  When installed in the shed, the battery runs everything with a 5VDC LDO replacing VUSB.  That was enough of a change in the ground currents to cause the A/D readings to move a little.  Fortunately I coded all of the trip point values (Battery over voltage, Solar Input over/under voltage, etc..) as constants derived from a spread sheet.  This program takes almost 64K of FLASH because of the embedded fonts for the OLED.  So adding table look ups for converting A/D readings to voltage did not add much in comparison.

A major concern now is that the whole setup draws about 75mA when just idling.  The OLED only displays when a button is pushed.  And one LED is cycling at 50% to indicate that the main loop is running.  So I am guessing that the PIC24 implementation of the debugger is the main current draw.  I looked at the schematic and there is no clean way to cut the power.  Right now I get about 4-6 hours of some charge.  The sun is too low and the house next door is 5 feet higher and blocks the morning sun and the remainder of the day the angle is very low.  In about 6 weeks, the sun should be high enough to give more charge time and by spring it will be over 10 hours a day and very direct.  For now I will just watch the battery voltage to see what the trend is.

Tuesday, January 24, 2023

Light Buddy 1 - Operation

 

This video was taken with a standard HD Webcam (Logitech C922).  It does not do a very good job at closeups, which is why the device is slightly out of focus.  Additionally the LEDs, when on, tend to overwhelm the auto white balance.  One of these days I will get a better camera for this type of work.

This is a short video the Light Buddy 1 in demo mode.  Attached are the LEDs we sell in 1 x 1 and 1 x 2 plate format.  All of the LEDs have an integrated resistor.  Here is what is happening"

1.  The white LED in the upper left is on STEADY.

2.  The small blue LED left side center is in one of the pulsing modes.

3.  The purple LED in the lower right is in CyCLE mode then pulsing mode.

4.  The small blue LED on the lower left side is in CYCLE mode

5.  The green LED in the upper left is in STEADY then BURST mode.

Sometime later I will put together a series of videos that show the different LED modes that are possible.

 

Monday, January 23, 2023

Solar Shed - Final Testing

The Solar Shed thing is almost done.  Instead of trying to debug the final issues in the shed on the wood pile and me all twisted in a pretzel, I built up  an environment in my office.  Instead of the Solar panel I used a 24VDC power supply I had.  This allowed for testing most of the different voltage points that control the relays  and the battery charging.  Here is a summary of the voltage decision points

  • If the Solar panel voltage falls below 14 VDC, charging is disabled.  No sense in charging at this point, the panel is providing very little current.
  • If the battery voltage rises above 14.6 VDC, charging is disabled.  Don't want to over charge the battery.  Also a five minute backoff timer goes into effect.  That way the charger won't be connecting/disconnecting at the main loop revisit rate. 
  • If the LED light switch is turned on, charging is disabled.  I want only the battery to supply the LED lights.

Got the coding done.  Now over a few days of monitoring the setup in the shed, I have needed to only change some constants.  Much easier to just take the laptop out to the shed and program the board, than try to step thru code.  Between the development board base and the PCB add on I built, there are some crazy ground currents that are effecting the A/D readings.  Thus the constants needed some updating.

  

Friday, January 20, 2023

Sewing Room - Center Work Area

 

This is the starting point.  A few more views of this follow.


This was a collapsible cutting table on wheels, where the two sides can fold down onto the center frame.  The issue with this table was how the two extensions were supported.  A leg would slide out into the center of the extension and into a simple friction lock.  You can see it the leg in these three pictures.

In the last move, one of the legs was damaged beyond repair.  As you can see in the middle picture on the right side I built a simple H-frame with plywood cross members to support the extension against the wall.  But the wheel locks quit working long ago and the table had a tendency to migrate.  This led to some spectacular collapses of the extension against the wall.  I finally managed to secure it somewhat, though it still continued to move.

After much research into what other people were doing, the solution seemed to be Kallax bookcases. Starting with two 2 x 4 and one 2 x 2 bookcase as the endcap, I started building up a center console.

First there would be be no wheels, this would sit on a solid 2 x 4 frame.  Second we did extensive research on the correct height.  Too high or too low could be a big ergonomic issue so the goal was to get the correct height +/- 1/4 inch.  When that number was determined, I ripped the 2 x 4 lumber to the correct height.  

FULL DISCLOSURE:  I did a dry fit in the garage of everything that follows.  This allowed for drilling holes where needed and testing to make sure the fit was correct.

Here is the frame placed in the room.  Because the Kallax bookcases would run perpendicular to the wall, placement along the wall was very critical.


Because placement was critical and I needed more support, I attached this frame to the wall and the bookcase to the right.  The two spacers attaching to the bookcase on the right provided the correct placement.  I was also trying to avoid drilling into the wood floor.  This arrangement seemed to make a sturdy connection. 

Here are the bolts into the base board and the wall frame.

The next layer is a 3/4 inch piece of of plywood.  Since this is not exposed anywhere, I used a sheathing type plywood.  I then added a trim piece on the edge, just to clean up the edge and even painted a border just in case anything showed through.



Since the width of a  2 x 2 Kallax unit is not the same as two 2 x 4 Kallax units back to back, there was a little notch on the end as shown here.


Next is to lay this down onto the frame and screw it in place.  This will give the frame rigidity and provide a solid foundation for the Kallax bookcases.



Now the Kallax bookcases are installed on top of this plywood base.  If you look closely at the bookcase on the left, you can see the metal brackets that were used to tie the two bookcases together.  It needs to be noted that these bookcases are not solid.  The walls are mostly made of a corrugated interior, except around the edges.  The center area really has nothing that a screw can grip.  There is about a 1" strip around the edges where the outside frame is solid press board.  That is about the only place you can expect a screw to hold.




Before using the aforementioned brackets, I used long clamps to pull the two bookcases together and hold them in place.Then I screwed the brackets in place.




Now I install the 2 x 2 bookcase on the end.


In order to get a tight fit, I again used clamps to pull the endcap bookcase tight against the other two bookcases.  The endcap bookcase is then attached to the other two bookcases using the standard IKEA wall mounting brackets.  This will not hold in the long term because of the bookcase material.  We will put a single piece Formica type countertop that spans the distance from the wall to a few inches past the end bookcase.  All of the bookcases will be screwed into this single countertop and that will rigidly hold everything in place, as the countertop will also be attached to the wall.


Here you can notice why there was a small cutout in the base. The end bookcase width is shorter than the depth of two of the bookcases.

You can see that there is a toe kick space under the bookcases.  This allows standing up against the counter, even though the overhang on left side the countertop will allow for the use of a stool.

Once all the bookcases were tied together, I then put one long screw in each cubby area.  Here you can the screw head in the center towards the front.  The closeup picture shows that I used a large head and screwed it down until the material just started to deform.  These screws probably went through the plywood, but since nothing is underneath and the plywood is 2 inches off the floor, that really doesn't matter.

Finally at the wall end, there will there will be an open storage area under the countertop.  The plywood has one coat of white paint, but probably needs another to help seal the plywood.  Not sure how this will be used, since access is limited.


Once the countertop is installed, this will be finished!




Thursday, January 19, 2023

Light Buddy - The PCB

 

Got my latest PCBs on Tuesday.  I knew before they arrived I had a problem.  I assumed (should be a four letter word) that PPS would allow any function on any PPS pin.  Well PIC18 may come close to that, but PIC32 does it in blocks.  So now I have 10 boards that are really not very useful.  Fortunately the USB and the console port could be used.  This one is very similar to the Brick Controller I cant build for lack of parts.  The Motor interface is missing and the BT (RN4871) is superset of the BT (RN4020) module on that Brick Controller.  The PIC32 is from the same PIC32MX family, just in QFP44 instead of a QFP64.  So this one is a high end LED controller with 15 LED channels.  I had previously mentioned this. 

I started pushing code into it, using the previous BrickController and MPLAB X Harmony Project I started.  Just in case the startup code for this PIC32 was unique.  Amazingly the USB HID came up right away.  I could not move data back and forth, but the PC recognized that a HID device was connected.  On the next day I was moving data and my Win10 App was talking to the device.  There were some USB connection issues.  They may have existed before I just never noticed them, but I decided to make this rock solid.  The PIC32 USB/HID implementation is more flexible than the PIC18 and this is OTG, which I am not using.  There are 3 state machines at the App level, two of them are callbacks from the USB/HID driver implementation.  The third is the real App level state machine.  It took a few days to get this working.  It was a simple matter of getting all three state machines in sync with each other and realizing that the two callbacks were actually running as the result of ISRs and those totally asynchronous to the App it self.

Once the USB/HID was working, merging in the other code for the other peripherals is easy.  Will need some conditional compiles, I dont like maintaining multiple code bases if I dont have to.

More later.




Wednesday, January 18, 2023

Sewing Room - More Storage

The next step in this upgrade is to provide storage around the Sewing machine cabinet.  As a side effect, I also need to provide support for the sewing machine cabinet extension arm.  Too many years of excess weight and little boys playing on it while bothering their Mother.

Here is the first step.  Installing a Kallax 1 x 2 and 2 by 2 bookcase, side by side.  This is placed so that the electrical plug on the left is still usable and such that there is space for the sewing machine cabinet extension arm and its needed support.

I used some material similar in thickness to the base board, to provide support and as a place to secure the bookcase to the wall.  This material was attached to the studs in the wall.  Then I could use the standard IKEA wall connections as I did on the large bookcase.

Next I framed the corner to support the sewing machine cabinet extension table. 

And here is the extension arm down.  The used is undecided about the gap.  The sewing machine cabinet extension is just under 3/4".  So matching it might be hard.  Plus whatever fills the gap needs to be very smooth, since you would not want it grabbing the material and "picking" at it.

Underneath the extension arm is a 1 x 2 Kallax bookcase.  As before, with the baseboard, there would be a 1/2" gap at the top.  That is just an invitation for small things to fall in.I framed the tip of the bookcase with the same material as the baseboard.  Added some white paint to the framing edge so that it is not as apparent.  I also rounded off the corner that goes into the wall corner, makes that fit better.  The sheetrock inside corner is not perfect. The gap on the narrow end of the bookcase is larger than I wanted.  If this proves to be an issue, then I will caulk the gap against the wall.  Right now the only thing holding this in place is the compression fit of the sewing machine cabinet pushing the bookcase against the wall.

Here is the finished look.  Now unfortunately the left side of the bookcase is probably not usable.  The gap between the two bookcases is about 4".  The intent is to place larger rulers, cutting boards and other tools that are large in the X and Y direction, but have no depth.

 

Next step is the cutting table that comes out the wall and in the center of the room.

 

 

 

Tuesday, January 17, 2023

Solar Shed - Realized

My original plan was to build a perf board proto with the LT1085 and the relays.  Then after some thought I decided  I needed to add multiple ADC inputs.  The PIC ADC does not like high impedance inputs.  I had lots of low bandwidth (<15KHz) OP_AMPS that would provide the buffer and a low impedance input to the ADC.  These MCP6031 are set up as unity gain buffers.  The input is scaled down depending on the input voltage range.  

Well using these SOT-23-5 parts made perf board very hard.  One of the PCB fab houses I use was running a special of $5 (plus shipping) for 4" by 4", qty 5.  Thus it made since to make a PCB.  Easier to build and more reliable.

Here is the board.

 
This the board next to the Curiosity HPC Development board.  The daughter board will plug into the connectors on either side of the processor.
 
 

Here is the unpopulated daughter board attached to the Curiosity HPC.


Here is the daughter board assembled. 

These are the major parts of the daughter board.

  • LT0185 with 100uf 50VDC capacitors on the input and output. I have lots of these capacitors, so I decide to use them.  They are excessive in size and capacity, but they are free.  The LT085 takes in the solar panel output and generates the 14.4VDC charging voltage.
  • Two 12 dual latching relays that control connection to the battery and the LED lighting in the shed.
  • Some N-FET buffers for the PIC outputs that control the Relays,
  • The MCP6031 OP-AMP buffers.
  • A LDO that converts battery voltage to 5VDC for the Curiosity HPC.  In turn the Curiosity HPC converts this 5VDC to 3.3VDC.
  • The necessary connections to the Solar panel, battery, light switch and LED light power.