Tell us about yourself!

Complete Your Profile
  • annekh510 commented on amandaghassaei's instructable Arduino Audio Output11 months ago
    Arduino Audio Output

    You're right the output of the arduino is between 0 and 5 V, but the requirements for the speaker is that the input is a wave centred around 0 vaults. So in this circuit the input is from the arduino digital pins, converting to a voltage between 0 and 5 V in the resistor ladder described in step 1 and how to write to this from the arduino in step 2. Then the next few steps do a bunch of stuff retaining this voltage range to prepare it for output. Then in step 7 it gets shifted from that range to being centred around 0 V ready for output to the speaker. Hope this helps - I haven't built it yet due to the amplifier chip being obsolete and not being entirely sure what to replace it with, but I've been reading and rereading to try an understand as best I can.

    View Instructable »
  • ATtiny85/45/25 LED Dice (Super Simple and CHEAP!)

    I took the idea but started from scratch with both the circuit and the code.I put resistors in for the LEDs and even worked out the relative sizes of the one for the single LED vs two LEDs so they all had the same current and thus brightness. The one major thing I found was that a 3V battery would not power two LEDs, I didn't try every colour/size I had on hand and I can't remember if I tried without a resistor, but my doodles suggest each LED needs 2V, so two in series need 4V. Your circuit diagram fried my brain, so I've only just realised it works by doing it in series. However this did lead to me finding some really nifty battery holders that take two coin cells and have an on/off switch, I haven't found anything I like as much that takes a single battery.I found I needed to debounc...

    see more »

    I took the idea but started from scratch with both the circuit and the code.I put resistors in for the LEDs and even worked out the relative sizes of the one for the single LED vs two LEDs so they all had the same current and thus brightness. The one major thing I found was that a 3V battery would not power two LEDs, I didn't try every colour/size I had on hand and I can't remember if I tried without a resistor, but my doodles suggest each LED needs 2V, so two in series need 4V. Your circuit diagram fried my brain, so I've only just realised it works by doing it in series. However this did lead to me finding some really nifty battery holders that take two coin cells and have an on/off switch, I haven't found anything I like as much that takes a single battery.I found I needed to debounce the button. To make the code a bit clearer I stuck the dice rolling code into a separate function. Having done that I figured I might as well play and added a function that flashed the lights going round in a circle to build up some tension whilst the dice got rolled.It's still on a breadboard at the moment, I might try a 2 dice version, but I can't figure out a way to do it with a single ATtiny85, I don't have much experience with it and I don't think enough pins can do PWM and I'm not sure if it has enough processing power to implement that in software.

    My guess is that if they have a shared switch to turn them on then they'll be running the setup at the same time and will get the same reading for the analogRead, as long as that input is left floating stick a slight time delay in the setup and hopefully you get two different seeds.

    View Instructable »