Adafruit’s Trinket and digiStump’s Digispark board are rather close cousins. Both use an ATtiny85 microcontroller, both have USB functionality, and both play nice with the Arduino IDE. [Ray] is a fan of both boards, but he likes the Trinket hardware a bit better. He also prefers the Digispark libraries and ecosystem. As such, he did the only logical thing: he turned his Trinket into a Digispark. Step 1 was to get rid of that pesky reset button. Trinket uses Pin 1/PB5 for reset, while Digispark retains it as an I/O pin. [Ray] removed and gutted the reset button, but elected to leave its metal shell on the board.
The next step was where things can get a bit dicey: flashing the Trinket with the Digispark firmware and fuses. [Ray] is quick to note that once flashed to Digispark firmware, the Trinket can’t restore itself back to stock. A high voltage programmer (aka device programmer) will be needed. The flashing process itself is quite a bit easier than a standard Trinket firmware flash. [Ray] uses the firmware upload tool from the Micronucleus project. Micronucleus has a 60 second polling period, which any Trinket veteran will tell you is a wonderful thing. No more pressing the button and hoping you start the download before everything times out! Once the Trinket is running Digispark firmware, it’s now open to a whole new set of libraries and software.
This is nice (or “this is a hack!”) I like when people ‘ports’ software to more hardware (or coerce hardware to use a different software than it was meant to). endresult being more choice in soft/hardware for everyone.
Good one Ray.
Can you use this to control sewage pump?
Dafuq?
Yes you can. You probably want a relay, it would need to be rated for the needs of the motor on the pump.
Some comments:
>The flashing process itself is quite a bit easier than a standard Trinket firmware flash. [Ray] uses the firmware upload tool from the Micronucleus project.
You can actually use the update tool to install micronucleus without using an ISP programmer. But make sure the USB pins are the same, I did not check!
https://github.com/micronucleus/micronucleus/tree/master/upgrade
>Micronucleus has a 60 second polling period, which any Trinket veteran will tell you is a wonderful thing.
It’s only 6, but the newest release (1.11) does not time out when no program was loaded, which is quite handy. You can also choose from a number of different entry modes.
Worth adding that the custom Digistump version of the Arduino IDE uses a procedure where you hit upload and then plug/turn on the board – so this makes the polling period matter less – as the software is already actively looking for the board. The confusion here may be that the software looks for 60 seconds before it gives up and assumes you didn’t mean to hit upload.
I like these, but until they hit the china knockoff level I really wont use them. I buy the Pro Micro clones off ebay for $2.95 each and can put them in everything. The price-point on these are so high that I can not justify buying them. I so wish that adafruit could order 22 million at a time to deliver decent pricing.
Interestingly – China is actively cloning the Digispark (search Digispark on ebay, aliexpress, or taobao – any that say Rev3 are a clone) – but they still generally sell for $12+ which is the same price as buying a real one including shipping. Itead studio makes a pretty blatant knockoff (directly links to our software download and send people to us for support) – but the price still can’t compete with pro mini clones – I think the competition among Chinese vendors is just very fierce for those – or Atmel had a huge number of seconds of that chip/someone is cloning that chip.
Yes, the $4 pro mini clones look to have some variety of non-Atmel chip.
(Last I looked – may no longer be the case.)
Well time passed, and as somebody expected, finally digispark clones costs now around USD $1.20 in ali http://s.click.aliexpress.com/e/f2372jm in quantities of one!