Elektroda.com
Elektroda.com
X

Search our partners

Find the latest content on electronic components. Datasheets.com
Elektroda.com

DigiSpark mini Arduino ATtiny85 module, commissioning, test

TechEkspert 8910 31
This content has been translated » The original version can be found here
  • DigiSpark mini Arduino ATtiny85 module, commissioning, test
    DigiSpark is a miniature Arduino compatible module, based on the ATtiny85 microcontroller. The board is not equipped with a USB UART converter typical for Arduino. The USB lines have been connected with the pins of the microcontroller, while the USB support has been embedded in the firmware. The module is equipped with a 5V stabilizer and the PCB terminals work with this voltage. 8kB flash memory available (2kB occupied by bootloader). We have the following outputs:
    P0 (SDA, PWM, AREF)
    P1 (PWM, LED)
    P2 (D / A, SCK)
    P3 (D / A, USB +)
    P4 (D / A, PWM, USB-)
    P5 (D / A)

    Integration with Arduino:
    We choose:
    File-> Preferences-> field Additional URLs to the tile manager, add the line:
    http://digistump.com/package_digistump_index.json
    Tools-> Tile> Tile manager-> search for "digistump" and install Digistamp AVR Boards library.
    We download and install the driver for the device:
    https://github.com/digistump/DigistumpArduino/releases/download/1.6.7/Digistump.Drivers.zip
    After installation, select Tools-> Board-> Digispark (16.5MHz)

    Loading the program is different than with standard Arduino boards:
    -compile the program and start uploading
    -when appropriate information appears in the console, connect the Digispark board

    DigiSpark mini Arduino ATtiny85 module, commissioning, test

    Let's open the example of DigiSparkUSB-> DigiScope
    We compile the example and upload it to the board.
    The analog signal is given on P2 (input voltage range 0-4.75v).



    DigiSpark mini Arduino ATtiny85 module, commissioning, test

    Using the tools https://github.com/digistump/DigisparkExamplePrograms (DigiUSB -> windows -> digiscope.exe) we can observe the analog signal given on pin P2. The 1Hz waveform is recorded below.

    DigiSpark mini Arduino ATtiny85 module, commissioning, test

    Depending on the program, digispark, when connected to USB, can emulate a keyboard (example with an I2C scanner), mouse, joystick, serial port. The advantage of the module are small dimensions, the disadvantage may be a small number of pins, and the layout of pins that makes it difficult to use the module on the contact plate. Earlier digispark versions were available on PCBs with a track pattern forming a USB plug, which allowed the PCB to be directly inserted into the USB socket.

    What are your applications for digispark modules?

    Source:
    http://digistump.com/

    Cool? Ranking DIY
    Can you write similar article? Send message to me and you will get SD card 64GB.
    About Author
    TechEkspert
    Editor
    Offline 
    TechEkspert wrote 3562 posts with rating 2815, helped 11 times. Been with us since 2014 year.
  • #2
    oskar777

    Level 26  
    Hello.
    In my cellar, I will probably use the pressure sensor in the water system and then
    further data in series, can also be suitable for a water level sensor.
  • #3
    RigelInOrion
    Level 12  
    I don't know about you, but I had problems with the digispark at the start. In most cases, the computer did not recognize the device. After replacing the diodes
    zener at 3.3v the problem is gone.
  • #4
    noel200
    Level 25  
    For me, it often does not recognize this plate. Sometimes it takes a lot of patience to upload the program.
  • #5
    TechEkspert
    Editor
    @ oskar777 between the basement, the sensor and the apartment, it is worth using something like RS-485, or something equally "far-reaching".

    @RigelInOrion @ noel200 i.e. simplification of the structure has a negative effect on its stability,
    my module worked stably, only the programming procedure is non-intuitive (first load the program, then connect the module).
  • #6
    leonow32

    Level 30  
    Isn't it better to try something like this?

    https://www.tme.eu/pl/details/attiny416-xnano...ja-do-ukladow-microchip/microchip-technology/

    Built in DEBUGGER and serial port via USB, full integration with Atmel Studio, possibility of graphical configuration of peripherals via Atmel Start. XMEGA style register programming, DAC, logical cells, event system, multi-priority interrupt system. The world doesn't end with Arduino ;)

    DigiSpark mini Arduino ATtiny85 module, commissioning, test
  • #7
    pier
    Level 23  
    Do you know any way how to run Digispark under WIN10?
  • #8
    TechEkspert
    Editor
    @ leonow32 interesting board, presentation of a new ATtiny series microcontroller.
    @pir the description in the first post was made during trials on WIN10.
  • #9
    RigelInOrion
    Level 12  
    TechEkspert wrote:
    @ oskar777 between the basement, the sensor and the apartment, it is worth using something like RS-485, or something equally "far-reaching".

    @RigelInOrion @ noel200 i.e. simplification of the structure has a negative effect on its stability,
    my module worked stably, only the programming procedure is non-intuitive (first load the program, then connect the module).


    The bootloader, which is responsible for loading the program, starts only for a moment emulating the "Digispark something" device and if nothing is sent to it, it starts the program. Hence, it is constantly plugging the board into the port. I only used the bootloader for testing. I programmed the end device with the USBASP programmer so that it was just a running program. You don't need to install drivers for it and it can run without them on any computer (it emulates the keyboard in my project)
  • #10
    User removed account
    User removed account  
  • #11
    fotomh-s
    Level 22  
    This board and this microcontroller are a bit of nonsense. Who needs a USB microcontroller with such a small number of pins? In addition, the USB eats 2 ports ...
    The ADC is there, but it eats the port on the reference voltage ...

    So you want one, it eats you up with the other ... And it was like to think and not put anything with 8 pins in there. In my opinion, 8-pin microcontrollers are "esoteric" microcontrollers and just like esoteric programming languages they are there to be ... And that's it ... In amateur electronics where the number of ports and peripherals is the basis, something like a fist in the nose ...

    Maybe somewhere in commerce it will come in handy as a "programmable ADC", provided the price is as low as the sense of its existence ;-)
    And the manufacturer also could not force it, but give more than 8 pins and at least USB and AREF separately. It would rather cost nothing and the ports would not be eaten up.

    Generally, it's a test who will put more into something with 8 pins. Just like once there was a test of how many guys could be squeezed into a toddler.
  • #12
    tronics
    Level 38  
    @nowyARM - bluepill is "dumped". Neither I nor you will buy the STM32F103 itself at the price at which this module is sold. What "economic magic" is behind it, I have no idea, GD32 probably not, although who knows ... knowing the Chinese. The original Maple Mini, on which bluepill partially rests, costs * only * from 4-5x that. Interestingly, I bought 10 and each one works flawlessly (except for the stm32duino bootloader). However, the price argument for this particular product is not entirely serious. The same applies to (wo) platforms on F4 where as much as you paid for nucleo, it was the main processor itself (and therefore you could NOT use these platforms for commercial devices because they were sold below cost only to promote the family).
  • #13
    User removed account
    User removed account  
  • #14
    leonow32

    Level 30  
    nowyARM wrote:
    leonow32 wrote:
    Isn't it better to try something like this?

    https://www.tme.eu/pl/details/...icrochip/microchip-technology/

    Blue Pill costs 3 times less, offers 10 times more and is "a little" faster.

    It is not expensive ;) the original Arduino Uno costs about PLN 91 :P and you will not experience debugging there
    https://www.tme.eu/pl/details/a000066/zecja-arduino/arduino/arduino-uno-rev3/#

    ATiny416 from Farnell costs 1.95 PLN / 100 pcs.

    and recently Microchip was giving away these tiles for free
  • #15
    noel200
    Level 25  
    Recently, I had to disassemble an oral-b vitality electric toothbrush because the switch did not work as it should.
    There is a microcontroller inside. Not in the plcc44 housing, but a tiny one. This is only to turn on the motor and after 3 minutes it signals the expiry of this time with its revolutions, but they put the processor there.
  • #16
    User removed account
    User removed account  
  • #17
    leonow32

    Level 30  
    You started comparing the small ATina board to the STM32 board :P
  • #18
    User removed account
    User removed account  
  • #19
    fotomh-s
    Level 22  
    nowyARM wrote:
    fotomh-s wrote:
    Generally, it's a test who will put more into something with 8 pins

    There are 6 pin uC, where 2 is power. Used in intelligent optical sensor.
    uC 8 pin are often used in models where miniaturization is important. In model railroads, model airplanes.

    Even in aviation models, the weight of the microcontroller itself does not matter as long as we are talking about SMD. The antenna itself from the receiver weighs a lot more, and no one in modeling cares too much about it. Even a single engine mounting screw that everyone omits, I suspect that it weighs more. To know the weight of an SMD microcontroller, you need a datasheet or a jewelery scale. With a model that weighs, say, 500g, which is not heavy, this weight does not matter, the microcontroller is the lightest element here.

    Same size. ATmega 8 SMD is so small that it doesn't matter. In fact, only ATmega64 and its related ones make some (still not big) difference.

    As long as you don't build a bee-sized model, you won't notice a difference in practice ;-)
  • #20
    TechEkspert
    Editor
    fotomh-s wrote:
    This board and this microcontroller are a bit of nonsense. Who needs a USB microcontroller with such a small number of pins? In addition, the USB eats 2 ports ...
    The ADC is there, but it eats the port on the reference voltage ...


    It is worth remembering that USB is not hardware-based, but software-based, which significantly limits the capabilities of such a USB.

    As for the AREF, it can be used, but you can also select internal reference voltages and free the tip,
    There are several pins with ADC input.
  • #21
    fotomh-s
    Level 22  
    I was just wondering if anyone would really have the courage to put a hardware USB into such a bug.
    I was a bit confused by the description where USB- and USB + were marked. Generally, the pin functions are not described, because they depend on the program and everyone has what they want ... ... Although I know that Arudu is sold with "boots".
    Apparently, Microchip or Atmel (I don't know how new / old this chip is), however, did not lose his mind and did not put into a cheap MCU a hardware USB unnecessary in such a game.

    As I wrote before, such a scalak is OK for commercial stews (it was probably designed for them). For amateurs, however, it is an excess of form over content. What does the person who designed this tile want to prove? I do not know. It's a bit like putting a lawn mower engine in a car, it will drive, but it's not a working environment for such an engine ;-)

    The only thing that occurred to me now is that if someone needs a simple system for pain, which probably would not require an MCU at all, it may be an alternative to classic chips / ASICs. You can, for example, make a comparator, PWM, USB / RS232 adapter, LED blinker or some tormentor ;-) It would make sense if the price is sufficiently low.
  • #22
    simw
    Level 26  
    TechEkspert wrote:
    fotomh-s wrote:
    This board and this microcontroller are a bit of nonsense. Who needs a USB microcontroller with such a small number of pins? In addition, the USB eats 2 ports ...
    The ADC is there, but it eats the port on the reference voltage ...


    It is worth remembering that USB is not hardware-based, but software-based, which significantly limits the capabilities of such a USB.

    As for the AREF, it can be used, but you can also select internal reference voltages and free the tip,
    There are several pins with ADC input.

    There is a concept called imagination. Only she limits. Not the number of tips, the amount of flash memory, not whether USB soft or hard. Here are some uses for simple modules like the ATtiny Digispark:
    http://zealota74.blogspot.com/2017/10/uniwersalny-odbiornik-podczarzeniani-do.html
  • #23
    User removed account
    User removed account  
  • #24
    User removed account
    Level 1  
  • #25
    miszczo997
    Level 28  
    tronics wrote:
    Neither I nor you will buy the STM32F103 itself at the price at which this module is sold.

    Stm32f103c8t6 $ 1.5 for single items, $ 1.3 for 10 items.
  • #26
    tronics
    Level 38  
    @ miszczo997
    tme 6.10usd
    farnell 4.38gbp
    mouser 22pln
    rs 4.68gbp
    yeah, right ...

    The cheapest bluepill on ali * is around $ 1.8, and there's a tact switch, microusb, quartz and a handful of smd resistors. If you are able to put something together at this price, estimate. In PL, mega88 alone can cost more.
  • #27
    kys
    Level 11  
    What is the issue of programming this board when we already have it soldered into the system and powered from the outside? Do you have to disconnect this power before programming? And what if I use pins from USB transmission, can connecting them with the rest of the system prevent the program from being loaded?
  • #28
    Slawek K.
    Level 34  
    As with any AVR, if you are programming with bootloader, then pins Rx and Tx must be disconnected. You can also program with SPI, without bootloader.

    Greetings
  • #29
    pier
    Level 23  
    Slawek K. wrote:
    As with any AVR, if you are programming with bootloader, then pins Rx and Tx must be disconnected. You can also program with SPI, without bootloader.

    Greetings


    The digispark is a bit different because the bootloader starts only a moment after turning on the power.
  • #30
    kys
    Level 11  
    Thanks for the answers. In this case, the module will be best disconnected from the system with goldpin connectors when it will need to be programmed