wagiminator / ATtiny85-USB-Tester

Simple USB Power Tester
https://oshwlab.com/wagiminator/attiny85-usb-tester
Other
52 stars 18 forks source link

Using Arduino UNO to burn boot loader #2

Open Martius108 opened 7 months ago

Martius108 commented 7 months ago

Hello,

I burned the boot loader with the recommended settings and the help of an Arduino Uno as ISP without any issues. Then I connected the ATtiny85 to my FTDI programmer and wanted to upload the sketch (still with the same settings). I use the Arduino IDE 1.8.19. But I get an "Failure while uploading the sketch" error without any additional information in the log window. What can be the reason for this?

Thank's.

wagiminator commented 7 months ago

Hi, burning the bootloader is only setting the fuses. There is actually no bootloader, so your FTDI adpater won't work. You have to upload the sketch with your Arduino as ISP (or any other ISP programmer) as well.

Martius108 commented 7 months ago

Great, thanks for your quick response! Btw. how does it work with the oscillator calibration? Just uncommenting the line for the calibration?

wagiminator commented 7 months ago

You need a calibrator to determine the calibration value, e.g.: https://github.com/wagiminator/ATtiny84-TinyICOC

Martius108 commented 7 months ago

Thank you. The voltage value of my USB tester is around 0.1 V lower than it should be and the current is around 0.03 A higher than it should be. Is this a matter of calibration? Is there an easier way to calibrate the oscillator? I used the Snapduino core to calibrate the bootloader/oscillator with the help of the serial monitor. Unfortunately Snapduino is very simple compared to Spencer Konde‘s core and only works with 8 Mhz.

wagiminator commented 7 months ago

Hi, the calibration of the oscillator does not affect the accuracy of the measurement of voltage and current. It influences time measurement and therefore, for example, energy calculation (mWh). The accuracy of the current and voltage measurement depends primarily on the quality of the shunt resistor. Here too, calibration can be done in software, but elsewhere. But first make sure that your comparison measurement was carried out correctly at the right measuring points using a calibrated measuring device. Most of the time this is where the fault lies (unless you have a really bad shunt).

On the subject of calibrating the oscillator: I have only used the method mentioned so far. This is also very easy if you have the device.

Martius108 commented 7 months ago

Thank you very much.