April 2018 Pin minimization

Design a data logger that is pin constrained.

Components

  • ATTiny 85 Processor
    • VCC
    • GNC
    • ~RESET
    • PB0 (SDA, INT0)
    • PB1
    • PB2 (SCL)
    • PB3
    • PB4
  • DS3231 I2C RealTimeClock
    • VCC
    • GND
    • SCL (4.7k pullup)
    • SDA (4.7k pullup)
    • ALARM (weak pullup)
  • FM24W256 I2C F-RAM
    • VCC
    • GND
    • SCL (4.7k pullup)
    • SDA (4.7k pullup)
  • DS18B20 temperature probe
    • VCC
    • GND
    • Signal (4.7k pullup)
  • USB mini socket
    • D+ (1.5k pullup)
    • D-
    • GND
    • +5 (will not be used to power the device)
  • Battery
    • VCC
    • GND

Operational mode 1

  • Sleep
  • Wake on RTC alarm
  • Sample temperature probe
  • Save sample to F-RAM
  • Repeat

Operational mode 2

  • Talk with PC over USB
    • Dump data from F-RAM
    • Set clock on RTC
    • Set sleep duration for Mode 1
    • Other configuration stuff

Solutions

Obviously, I2C pins SCL and SDA with pullups are shared between RTC and FRAM.  There remain 3 pins on the processor and 4 pins on the remaining components (D+, D-, Temperature Probe Signal, Alarm).  We also need a way to transition between modes.  Detecting +5 on the USB socket is the “right” way to know when we are connected to a PC (i.e. mode 2).

Can we talk Onewire to the Temperature Probe over SDA?  Might I2C traffic spoof the Onewire into driving SDA?  Seems unlikely.

Alarm signal can probably be used to tell processor to go to mode 2.  Pulling it low with a debounced switch would wake the processor.  It could check the alarm flag in the RTC to see who woke it up.

 

Triangle Embedded Interest Group