Live data from Hacker News

Emulator of Original Dell Charger Using ATTINY85

github.com

11–20 of 57 posts

Re: Emulator of Original Dell Charger Using ATTINY85

#11
post #7

The ATtiny85 is nice, with 8kB flash, 512 bytes RAM & EEPROM, 5-6 GPIO pins, they are just enough to do something interesting. But I don't use the ATtiny85 as much as I want to, because flashing requires a separate programmer hardware. It's enough friction to get in the way of rapid software iteration. I once made the mistake of inserting the ATtiny85 upside down into the programmer, and it promptly cooked it dead. L…

All micros require separate hardware to flash it, no? Some is cheap (stlink), some are a few hundred dollars, but still.

Unless you have a USB bootloader programmed on the chip, but you still need the adapter to flash the bootloader in the first place.

Re: Emulator of Original Dell Charger Using ATTINY85

#12
I don't understand why people use the attiny85... The Atmega328 based boards have far wider software support in the arduino ecosystem, so you will typically be able to prototype a project in minutes instead of hours, and the dev boards cost the same, but the 328 ones have more of pretty much everything.

The only benefit of the attiny seems to be that you can save a few millimeters of board space, but if that's your concern there are plenty of far smaller, cheaper and more capable microcontrollers in BGA packages.

Re: Emulator of Original Dell Charger Using ATTINY85

#13
post #4

I assume the purpose of this would be to build a Dell compatible charger but this repo doesn't appear to provide much information on how to actually do that. I get that the microcontroller provides the signalling the laptop needs to identify the charger, but assuming you built this circuit, how would you actually use it to charge a laptop ?

I believe the old Dell chargers simply have a data pin, which I presume would carry the data generated by this project

I guess it would also be helpful to know what range of laptops this is for. I was assuming it was for relatively recent models. I have an Inspiron that's about 5 years old and it has a barrel connector for power. It's not obvious that it contains a third pin. I have at times had problems with the laptop refusing to recognize various power adapters though.

Re: Emulator of Original Dell Charger Using ATTINY85

#14
post #9
post #2

I have a strip of ATTINY85's at hand for misc electronic projects and they've been really great for beginner-level circuits and learning embedded programming. I'm a dev by trade but have a bit of electronics knowledge and these are cheap enough to not worry about frying them and still get the job done.

They're such a nice starting place for embedded dev! I'd messed around with Arduino things for a long time, and recently started messing with the chip itself without the abstraction. The ATTINY series is powerful enough for many things while having a relatively small and easy to work with footprint (from a physical and register standpoint). It's actually possible to go through the entire datasheet and understand it,…

In case you're interested, there's a new project underway that aims to make running Nim on AVR (and eventually other micros through BSPs) as easy (but leaner and more performant) as Arduino: ratel.peterme.net

Nim can already run on most MCUs (I've experimented with samd21 and rp2040), it just requires a few compiler flags or linking steps that are not super well documented. Ratel aims to automate that and provide some high level interfaces for hardware access (gpios, etc).

Re: Emulator of Original Dell Charger Using ATTINY85

#15

I don't understand why people use the attiny85... The Atmega328 based boards have far wider software support in the arduino ecosystem, so you will typically be able to prototype a project in minutes instead of hours, and the dev boards cost the same, but the 328 ones have more of pretty much everything. The only benefit of the attiny seems to be that you can save a few millimeters of board space, but if that's your c…

The obvious answer would probably be the size and the dip formfactor. Sure you can get more capable BGA packaged chips, but how many hobbyists have the ability to properly solder in a BGA?

Re: Emulator of Original Dell Charger Using ATTINY85

#16
post #11
post #7

The ATtiny85 is nice, with 8kB flash, 512 bytes RAM & EEPROM, 5-6 GPIO pins, they are just enough to do something interesting. But I don't use the ATtiny85 as much as I want to, because flashing requires a separate programmer hardware. It's enough friction to get in the way of rapid software iteration. I once made the mistake of inserting the ATtiny85 upside down into the programmer, and it promptly cooked it dead. L…

All micros require separate hardware to flash it, no? Some is cheap (stlink), some are a few hundred dollars, but still. Unless you have a USB bootloader programmed on the chip, but you still need the adapter to flash the bootloader in the first place.

An MCU is a chip in a package that just cannot interface with anything your consumer PC or notebook comes with. You'll need an adapter in any case.

That said, lots of current MCUs come with UART, I2C and/or USB bootloaders allowing to erase/program (if not disabled). This bootloader is typically included in factory ROM, not to be programmed by you or a third party.

Re: Emulator of Original Dell Charger Using ATTINY85

#17
The old Dell barrel jack power supplies use 1wire communication to identify the power supply's capabilities. It would likely be cheaper to purchase a compatible 1wire memory module.

Here is an article on reverse engineering the memory module. https://hclxing.wordpress.com/2014/02/06/hacking-the-dell-la...

Re: Emulator of Original Dell Charger Using ATTINY85

#18
post #4

I assume the purpose of this would be to build a Dell compatible charger but this repo doesn't appear to provide much information on how to actually do that. I get that the microcontroller provides the signalling the laptop needs to identify the charger, but assuming you built this circuit, how would you actually use it to charge a laptop ?

In schematic.png you can see on the left there are 3 pins and the right there are 2 pins. The 3 pins on the left represent the laptop and the two pins on the right represent the power supply. The chip in the middle attaches to the ID pin on the laptop and reports the charger to the laptop.

Re: Emulator of Original Dell Charger Using ATTINY85

#19
post #16
post #11

Earlier quoted context omitted.

All micros require separate hardware to flash it, no? Some is cheap (stlink), some are a few hundred dollars, but still. Unless you have a USB bootloader programmed on the chip, but you still need the adapter to flash the bootloader in the first place.

An MCU is a chip in a package that just cannot interface with anything your consumer PC or notebook comes with. You'll need an adapter in any case. That said, lots of current MCUs come with UART, I2C and/or USB bootloaders allowing to erase/program (if not disabled). This bootloader is typically included in factory ROM, not to be programmed by you or a third party.

What? Why couldn't an MCU interface with my computer? It's not like it has special electrons or something in it. I regularly program atmega chips with a cable I made that plugs into the parallel port on the back of any computer that has one. If you have a couple GPIO pins on a motherboard, you can probably program almost any MCU with with it.

The only exception is if the motherboard GPIO was say 3.3v and you had a 1.8v only MCU, but level shifters aren't exactly expensive.

Re: Emulator of Original Dell Charger Using ATTINY85

#20

The old Dell barrel jack power supplies use 1wire communication to identify the power supply's capabilities. It would likely be cheaper to purchase a compatible 1wire memory module. Here is an article on reverse engineering the memory module. https://hclxing.wordpress.com/2014/02/06/hacking-the-dell-la...

> and the battery will not charge (the picture is from internet but it has almost identical information)

Yikes! I used a no-name charger on my Dell Latitude for quite a while, and it never stopped me from charging. Just annoyed me about it (press F1 to continue on boot) whenever I took the battery out (wiping the CMOS) and didn't turn off the AC warnings in the BIOS. The one I was using didn't have a serial chip in it, so the laptop flagged it as unknown.

Post reply on HN