Live data from Hacker News

Emulator of Original Dell Charger Using ATTINY85

github.com

51–57 of 57 posts

Re: Emulator of Original Dell Charger Using ATTINY85

#51
post #34

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…

I wanted to gain experience in embedded programming at a lower level than Arduino (i.e. pure C & bitbanging). They're dirt cheap and also simple enough that I can read through the whole datasheet and pretty much understand everything. It's also kind of a fun challenge working within the limitations on both the HW and SW side.

I was intrigued by "dirt cheap" and went to buy a few tens, but they're apparently $2.5 or so each! I can get an ESP8266 for that amount, which has tons more processing power, RAM, space, and has WiFi. I really can't see why I'd use an ATTiny over that, unless the former cost $0.20 or so.

Re: Emulator of Original Dell Charger Using ATTINY85

#53
post #50
post #47

Earlier quoted context omitted.

Nice work! I've been trying to stand up nesper/nephyr, the Nim overlays for ESP32 and Zephyr, but had quite a few issues (not all of which are those library's fault, the ESP-IDF toolchain is horrid in a lot of ways). I wonder how difficult it would be to extend Ratel over to ESP32 if I have a working toolchain already. I might have a crack at it, we're big on Nim at work and are trying to get away from C++ for our fi…

To be clear: Ratel isn't my project, just something I'm following due to interest. In the interest of shameless self promotion :), my own experimentations are : https://github.com/EmbeddedNim/svd2nim https://github.com/auxym/nim-on-samd21 And I've used and contributed to picostdlib ( https://github.com/beef331/picostdlib ), the rp2040 support library. All just as a hobby, but it's interesting to learn that some compa…

Incredibly slow moving, buggy and badly documented! Embedded is a fun challenge but rough.

Nim I believe is an answer to it though, and embedded being slow moving with a C target is perfect for it!

Re: Emulator of Original Dell Charger Using ATTINY85

#54

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...

The original source linked from that article has unfortunately disappeared, but the archive still remembers:

http://web.archive.org/web/20100329110047/http://www.laptop-...

An explanation of (one of) the design flaws:

http://web.archive.org/web/20100412160453/http://www.laptop-...

Not only is it clearly hostile to the aftermarket, but putting a chip that has 12V absolute maximum ratings in an environment where it could easily be shorted to the 19-20V output of the PSU seems almost like "engineered unreliability" to me.

On the other hand, when IBM/Lenovo had to solve the problem of identifying the wattage available, they used a simple and robust solution of a single resistor:

https://www.thinkwiki.org/wiki/Power_Connector#Signal_Pin

https://www.thinkwiki.org/wiki/Power_Connector#Signal_Pin_2

The only improvement I could make upon that scheme would be to make the correspondence between resistance and wattage monotonic, but otherwise it's an example of non-overengineering and aftermarket-friendly solution.

Re: Emulator of Original Dell Charger Using ATTINY85

#55
post #49

Earlier quoted context omitted.

So do you jam the chip into the parallel port? Or do you...use an adapter?

I don't see the difference if it's just a parallel cable. Do you jam an STM32 into a USB port?

> Do you jam an STM32 into a USB port?

I unplug my phone for a moment, or use one of several identical cables I have lying around. If this thing needs a dedicated cable then that seems just as annoying in practice as needing a dedicated "programmer" box.

Re: Emulator of Original Dell Charger Using ATTINY85

#56
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…

In circuit programming is just such a huge step forward. You still need separate programming hardware, but you don't need to pop the chip out.

Beyond that, a few hundred bytes is usually enough for a simple bootloader. That tends to accelerate things even more. And writing bootloaders tends to be fun. I've done a tinyusb bootloader on an attiny45 with the user program sharing the v-usb stack in the bootloader and also a CEC bootloader. The CEC one of course took several minutes.

Re: Emulator of Original Dell Charger Using ATTINY85

#57
post #50
post #47

Earlier quoted context omitted.

Nice work! I've been trying to stand up nesper/nephyr, the Nim overlays for ESP32 and Zephyr, but had quite a few issues (not all of which are those library's fault, the ESP-IDF toolchain is horrid in a lot of ways). I wonder how difficult it would be to extend Ratel over to ESP32 if I have a working toolchain already. I might have a crack at it, we're big on Nim at work and are trying to get away from C++ for our fi…

To be clear: Ratel isn't my project, just something I'm following due to interest. In the interest of shameless self promotion :), my own experimentations are : https://github.com/EmbeddedNim/svd2nim https://github.com/auxym/nim-on-samd21 And I've used and contributed to picostdlib ( https://github.com/beef331/picostdlib ), the rp2040 support library. All just as a hobby, but it's interesting to learn that some compa…

As an update, after ditching the project/build tooling setup that Nesper required, I got Nim working wonderfully (with Nesper's library itself as a dependency) within PlatformIO and ESP-IDF on an ESP32 :)

I even have hardware UART support and have a working SIM7000 modem connection going (though only with AT commands, not PPPoS yet, though I'm planning on that next).

Nim is the future of firmware development, of that I am sure.

Post reply on HN