Sunday, September 17, 2017

Nearly There!

This morning is all about documentation catchups; most of the hardware build is done and the notes below are updated.            

This afternoon is going to be about the enclosure for the azimuth / elevation unit and maybe the power and comms lines from the battery box.

// IMAGE

Internals as of 16 Sept 2017. Power not connected.


// DONE

  • Add a 4 pin line from the logic board to the ESP8266 on the PSU board.
    • TX <> RX's
    • Enable (Digital 12 to CH_PD)
    • Interrupt (GPIO2 to AVR pin 2)
  • Add 3 pin connector from the Auto/Manual SW & LED to a pin on the MCP, with +5v & GND
  • Add JST line from PSU to logic board; add a JST board connector to the logic board and patch it into +5v and ground busses
  • add a +5v line from the PSU to the Motor Driver board
  • move the keypad to a connector to the MCP23017 instead of punch terminals
  • add a line from the SQW output to the MCP for interrupt MUXing to the AVR (pin 3)
  • add a support standoff for the RTC (DS3231?) to the logic PCB
  • user interface 'box' mounting and cable routing, mounting the panels and power switches
  • sun sensor - sealing the top and mounting the base to the array.
  • array mounting and charge cabling
  • platform, table, and mast build, linear actuator tests, azimuth feedback testing and characterization
  • sensor build and testing
  • 3D printing the feedback rack and gear for elevation
  • 3D printing the feedback gear for the XL belt azimuth table
  • 3D printing the sub-panels for the user interface box
  • write up the keywords.txt and example for the XEEPROM library, and test it all out
  • organize the reg[ ] array into config and run entries. Those entries that are only used during setup() don't have to be copied in memory. I should be able to save about 32 bytes of SRAM this way.
  • wiring for reset button
  • wiring for keypad
  • cut template for sample control panel
  • mounting tabs for panel  needs do-over
  • switches mounted; wiring diag and harness done
  • drill and mount pcb's to carrier plate

// TODO software:
  • Write up something that manages the 4 byte structs for describing execution state. Library?Plain array? Library, I think. This is linked to schedule, code and the way it's loaded in memory as objects.
  • copy the sun position schedule currently in a FLASH_ARRAY into some of the unused low bytes of internal EEPROM. I think it fits between the reg[] and MAP.
  • sift thru the current spreadsheet of opcodes and stuff all the blocking calls into one group so we can flag those in the sequence generator - in case we need to run those as 'exclusive'.
  • I had an idea to wrap the stock LCD library so we can include references to a string_table for option-list type fields. Currently it's all numeric. Smells like scope creep.
  • revisit vmem - make it buffer-backed for 32 byte page-writes.

Friday, September 15, 2017

Summer Cleanout

Only moved the needle on the project a little over the last few days, mostly cleaning out the lab to get it ready for another winter trapped indoors. Lots of sorting, moving, and getting the tools set up right. Under no circumstances should you watch Adam Savage on Tested, working in his space while doing this... it will cause all manner of organizational envy.

Small updates:
- Added a 6+1 pin header to the keypad instead of running it to the push-terminals. The 7th pin (the red line of the ribbon cable) is ground to the keypad.

- Added a JST and +5v wiring to the power supply. The JST is surface mount so it'll be a kludge getting it on the main logic board. The +5v is for the motor driver board.

- Added the cabling for the auto/manual switch and LED. This needs a bit of explanation, so here goes:

  1. The intention is to pull the auto/man pin assigned on the MCP23017 to ground if set to manual. (switch closed). Ground to the switch centre pin, and return to the MCP GPIO pin.
  2. This should also light the LED, so this is also the LED cathode, allowing ~18mA to flow.
  3. In the switch open position the LED has +5v to it's far side, (and flows thru a ~150Ω resistor), but no substantial ground path for any current flow (and the MCP has pull-ups set). 
  4. The voltage at the MCP pin should be ~3v, so essentially this is in a pull-up condition to stop the MCP GPIO pin from floating  and giving stray logic-low readings. In the event the MCP isn't configured with pull-ups, this is still (just)within the per-pin tolerance of the MCP to sink up to 20mA.

Sunday, September 10, 2017

Status snapshot - 10 Sep 2017

Slow progress; I had an out of town trip and a few unrelated obligations to take care of. Then I decided to consolidate all the tools/equipment/supplies (aka 'the mess') to the lab.

I also decided to grab a couple of those sheet metal clamps that hold 2x4's in the form of a sawhorse for legs under a temporary work surface. In jamming this into the lab I had to move a shelving unit, and whaddaya know, I found my missing spool of TechLace. It's not fantastically expensive, but it bugged me that I'd looked *right there* a month ago and it was for some reason out of sight until I moved the shelving unit.


Library updates / integration list:


LibraryexternMinimum FunctionsGeneral purpose notes
timestamp.h (DS3231 RTC)
get time, make timestamp...
Done
getRTC() current time>reg[]
setAL1(), setAL2() set alarms from reg[]
setRTC() to update clock
XEEPROM
i2c access to 24LC256 chip
//rem'd out
read(), write() single bytes
readBlock, writeBlock to copy config / comm areas in one call
VMEMDone
read(), write() single bytes, from any memory media
extend to include SDFAT
LogPending
prepare a 16 byte block of log data, either performance or status
solsen.hDone
read(), inits, 
MD_L298D
Both angle/target seeking and basic chip control
Done
getPos(), setDrive(), setTarget() (has az,el angle conversions as well
MCP (MCP 23017)PartialNo defined interface yet
LCDPendingNo defined interface yet
avr (base)PendingGeneric A/D read/write
ESP8266PendingWill need to incorporate
Extend to include SPIFFS comm buffer (eventually)
BattBoxPendingNeed simple avr i2c slave to read some adc lines for current, voltage

// TODO:
  • Write up something that manages the 4 byte structs for describing execution state. Library?Plain array? Library, I think. This is linked to schedule, code and the way it's loaded in memory as objects. Gotta finish that this weekend.
  • copy the sun position schedule currently in a FLASH_ARRAY into some of the unused low bytes of internal EEPROM. I think it fits between the reg[] and MAP.
  • sift thru the current spreadsheet of opcodes and stuff all the blocking calls into one group so we can flag those in the sequence generator - in case we need to run those as 'exclusive'.
  • I had an idea to wrap the stock LCD library so we can include references to a string_table for option-list type fields. Currently it's all numeric. Smells like scope creep.
  • UPDATE: I forgot the August 31 deadline for autonomous operations. I've started a reverse calendar to count down the work items left. It's about 1 week of time left, and about 6 weeks of work
  • sun sensor - sealing the top and mounting the base to the array.
  • fabric enclosure completion (it's held on with bungee cords right now)
  • user interface 'box' mounting and cable routing, mounting the panels and power switches
  • power and comms cable from the battery box
  • revisit vmem - make it buffer-backed for 32 byte page-writes.

// DONE

  • array mounting and charge cabling
  • platform, table, and mast build, linear actuator tests, azimuth feedback testing and characterization
  • sensor build and testing
  • 3D printing the feedback rack and gear for elevation
  • 3D printing the feedback gear for the XL belt azimuth table
  • 3D printing the sub-panels for the user interface box
  • write up the keywords.txt and example for the XEEPROM library, and test it all out
  • organize the reg[ ] array into config and run entries. Those entries that are only used during setup() don't have to be copied in memory. I should be able to save about 32 bytes of SRAM this way.
  • wiring for reset button
  • wiring for keypad
  • cut template for sample control panel
  • mounting tabs for panel  needs do-over
  • switches mounted; wiring diag and harness done
  • drill and mount pcb's to carrier plate