Git Product home page Git Product logo

teatime's Introduction

Readme

Notes on the question of voltage regulation

  • There's only two components that are somewhat relevant in terms of voltage:

    • the ATtiny; handles 1.7–5.5V per datasheet
    • the LCD; wants 3V per datasheet
  • Many of the similar LCD modules are advertised as 3.0–5V compatible.

  • I'll have a diode behind the battery to prevent charging the coin cell in any case.

  • The LCD is driven directly by the ATtiny IO pins, so if I want to regulate ... I'll need to regulate the input voltage to the ATtiny.

  • The ATtiny pins can only handle about VDD + 0.5V, so I'll need either:

    • "Simple" protection with input resistors to limit the current; per § 34.2 of the datasheet it is acceptable to limit the current with $R = \frac{(V_{pin} - (VDD + 0.6))}{I_{Cn}}$, where $I_{Cn} = 1 \text{mA}$
      • How does this interact with the pull-up requirement on I2C pins?
    • "Full" level shifting for any logic pins, i.e. external I2C connectors and programming ports; except UPDI can handle up to 13V regardless of VDD
  • Another funky solution would be to omit the regulation and "just" stay within the ATtiny's limits. Then implement the "own voltage" sensing (which is usually used for battery voltage detection; aside: how does that work behind a diode?) to check what voltage is applied on startup. If it's more than 3.3V, use PWM modulation on the IO pins to the display to keep the average at around 3V?

Driving the LCD

  • Aha! These LCDs are so cheap because they don't include and driver electronics. And it's actually not that trivial to drive.
  • You can apply a constant voltage but that will destroy the LCD over time through ... elctrophoresis? Either way, you need to apply AC by alternating the polarity of each segment during each frame.
  • Do drive the commons and segments that you don't want to be visible, but drive them with equal voltages during both halves of the frame to keep differential at zero. But you still do need to alternate the voltage.
  • There's a nice application note by Atmel: AVR241.
  • And an article by Pacific Display Devices.
  • And particularly useful is an application note by ST Microelectronics: AN1447. It actually describes how to drive a 4-multiplexed LCD with a simple microcontroller.

Notes on Components

The LCD

  • Ain't nobody got space for that many pins! I really didn't want to use a 40-pin component. Especially because I don't have any microcontrollers that have enough IO ports.
  • The 12 pin variant requires time multiplexing but I'm kinda used to that from the other two display projects I built already.

32.768 kHz Crystal

  • I picked a crystal from the same series that David Johnson-Davies used; but a (to me) more common 12.5 pF loading capacitor value.

  • Per an Electronics StackExchange post, the formula to select (two identical) loading capacitors $C$ is $C_{load} = \frac{C}{2} + C_{parasitic}$, where the parasitic capacitance of the PCB is usually assumed to be around 2.5 pF. Rearranging for the "unknown" yields $C = 2\cdot(C_{load} - C_{parasitic})$ and with $C_{load} = 12.5,pF$ this gives $C \approx 20,pF$.

  • I chose to use 0603 capacitors because this is a new part in my personal stock, I feel very confident soldering smaller parts than 0805 by now and I'll probably only ever use these capacitors in this exact combination.

teatime's People

Contributors

ansemjo avatar

Stargazers

ac avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.