GithubHelp home page GithubHelp logo

shadow578 / dell-power-adapter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kivapple/dell-charger-emulator

1.0 0.0 0.0 88 KB

Dell power adapter emulator using ATTiny85

C 23.24% C++ 76.76%
attiny85 platformio dell charger

dell-power-adapter's Introduction

โ— this is currently untested / probably broken. Fell free to fix it tho :P โ—

๐Ÿ”Œ Dell Charger Emulator

Make your ATTiny85 emulate a original dell charger.

The power adapters used for Dell laptops contain a IC to report the adapter capabilities (like watts, voltage and current). If you connect a third- party adapter, the laptop will refuse to charge the battery. This project allows you to use a ATTiny85 (and possibly also other microcontrollers) to emulate the answers a dell laptop expects from the charger.

You can configure the adapter setting in the source file rom.h. For details on the fields function see the comments.

When you change the values, you'll have to update the ROM_CHECKSUM. This can be done using a tool like crccalc.com/.

For developer reference, here is the raw ROM layout
Offset Length Content Description
0 4 DELL Manufacturer identifier
4 4 00AC Adapter type
8 3 045 Watts (45W)
11 3 195 Tenths of a volt (19.5V)
14 3 023 Tenths of amps (2.3A)
17 23 CN0CDF577243865Q27F2A05 Serial number
40 2 0x3D 0x94 CRC-16/ARC (LSB first)

Warning: do not mask the weak power adapter to a more powerful one. This can lead to hardware damage.

Schematic

Schematic

You'll need a ATTiny85 MCU (ATTiny25, ATTiny45, and possibly other AVR MCUs may also work) running at either 8 MHz (the internal clock is suitable for this). When using a different MCU or clock speed, you'll have to adjust the platformIO environment.

The Dell power adapter plug has three pings - GND, VOut (+19V) and ID. GND is the outer- most, VOut is the inside of the barrel, and ID is the small pin in the barrel connector.

Connect the ID pin to the PB2 pin of the ATTiny. The MCU must be powered from 3.3V (ID pin may work with 5V, not sure about that...).

Reading and writing EEPROM

The original code by KivApple used the onboard EEPROM to store the configuration values, and also supported re- writing the EEPROM via the ID pin. In the platformIO version, this functionality was removed. to change ROM values, you'll have to flash the whole IC. (or look at a previous commit which still had the EEPROM code included).

dell-power-adapter's People

Contributors

kivapple avatar shadow578 avatar

Stargazers

 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.