• Category Archives Hardware
  • Idea: Arduino Based BPM counter

    I was thinking about my turntables that I have and about spinning trance and thought to myself that I don’t have any way to tell what the BPM is of the song, there are mixers that have this built in and I have seen rack mount stand alone units but nothing small and portable. My device would be handheld with stereo jack and rca jacks for input. Knowing that all analog music is just a wave form, why not measure the wave of a specific frequency (e.g. bass) using a band pass, then calculate when the peaks hit and get the BPM.

    This seems like a very simple thing to do but wont know till I start putting something together.

    parts that I will need:

    • Arduino or other ATmega chip
    • RCA connections
    • Darlington transistor pair (chip or separate transistors)
    • a few LEDs
    • Resistors asst
    • 2x 7 or 8 segment display or serial LCD module
    • maybe more parts, odds and ends

    This could be made into a kit or a sellable project. Hopefull in Jan I will be able to start putting this together for my proof of concept and show it off….


    Just thinking on how would i calculate BPM, so I started with Google….didnt get very many specific code, alot of applications that do it for you but no real source code to extract the equation from so i kept looking, and found this  http://www.conradaskland.com/blog/2008/02/how-to-calculate-delay-time-to-tempo-beat/

    He explains on how to calculate the delay time between beats

    * Delay time for crotchet in ms = 60000/BPM (Beat Per Minute)
    * Delay time for Quaver in ms = 60000/BPM/2 (Beat Per Minute)
    * Delay time for Semi-Quaver in ms = 60000/BPM/4 (Beat Per Minute)

    so I used my Horrible math skills and came up with

    BPM= 60K/Delay , then so on and so fourth.

    so now the hard part pattern recognition, The tactile Metronome project seems to be the closest on what I want to create there project is here http://wayneandlayne.com/metronome/ , This should give me a good start on my project/

  • Quick and Dirty Tilt switch for under $.10

    I needed a very simple tilt switch for a project my friend is working on, and i decided to go cheap. all that’s need for this hack, is a straw with wrapper, a BB, 2 wires and a little bit of electrical tape.

    Start by opening up the straw and keep the wrapper, tear the wrapper in half, one is used as part of the plug for the top the other is for the bottom plug. Now roll the half the wrapper, after its rolled tight wrap a little bit of electical tape and insert it into the straw, make sure its tight. you can use a lighter to melt it a little butnot too much or it may start on fire. For the other plug, this time wrap the wrapper around one of the wires, make sure you have stripped at least 1/4″ of insulation. roll it a few times, the add the other wire to the roll after a few  wrapps of the other one. now roll them both together and in the end you should have 2 leads sticking out of the plug and there not touching. Check for shorts first in the plug. Now add a BB to the straw and insert the other plug. Now you have finished the super quick and dirty Tilt switch. My design can be improved on but for now it will work for right now. you may substitute other cylinders/tubes for the switch housing(e.g. pens, paper rolled around a pencil, pvc tubing).

    tilt switch close uptilt switch constructiontilt switch materialstilt switchtilt switch constructiontilt switchmaterialssetup materials

  • Sugru? This stuff looks awsome!


    I recently found this site selling this weird putty that reminded me of Mighty Putty, But this stuff is so much better than that.
    It dries flexible and stays flexible at all temperatures. So i decided to buy some here http://sugru.com/ . So i bought 2 of there multi colored multi hack pack. I just hope it ships before February 2010. Next i will have to find a place that sells polymorph.

  • One Step Closer to Finishing My Eye

    ready to test
    ready to test

    My IR eye is finally built and is ready to test, and see if my eye really works or not, my first readings were pretty good, by using a TV remote i tested each photo transistor to make sure it was working correctly before i attached it to the servo.
    The whole assembly is partially made out of recycled materials, the x axis base is made from an old cd that i was going to toss, and the y axis mount was made from a shelf bracket (found it in one of my boxes), the main base is made out of an old cardboard box that was bound for the recycling.
    Finished connections
    Finished connections

    I will have a build page up as soon as i finish some of the code.
    With Video!

  • IR eye

    This project is the first step in my motion tracking. This Eye was built and adapted from an LRM post here .

    DSCN0219DSCN0221please dont laugh at my soldering job, its what i can manage with that kind of board, I like the ones that mimic a breadboard setup. With very little trouble i finished soldering in about 2 hours but had to go back a desolder one transistor and replace it and resolder one wire. After that i tested each IR sensor by themselves to make sure they all worked, each one gave a little different reading off the same IR source but that can be fixed with a little calibration in the software. But for now my goal is to hook it up to 2 servos and control the x and y for the motion tracking, eventually i would like to put this into an enclosure that looks like an eye.
    This is to make sure all 4 eyes are working
    const int sensepin0 = 0;
    const int sensepin1 = 1;
    const int sensepin2 = 2;
    const int sensepin3 = 3;
    int sensorValue0 = 0;
    int sensorValue1 = 0;
    int sensorValue2 = 0;
    int sensorValue3 = 0;
    void setup() {
    void loop() {
    sensorValue0 = analogRead(sensepin0);
    sensorValue1 = analogRead(sensepin1);
    sensorValue2 = analogRead(sensepin2);
    sensorValue3 = analogRead(sensepin3);
    Serial.print("sensor = ");
    Serial.print(" ");
    Serial.print(" ");
    Serial.print(" ");

    this will test all 4 sensors and print to the serial port.

    also this code is written for the arduino but can be adapted to other microprossecors.

    Here is a screenshot of the schematic as well

    ScreenshotNext i will mount it to the servo and start writing the logic for 1 of the axis, but my question is how to mount this to a servo with stuff wround the garage. I will answer this question soo.

    and this is why you should never place you MC on your keyboard…………..Screenshot-1that large stack to the left is about 30 print screen applications running. I placed my arduino on my print screen button for about 10 secs before I realized what was going on.


    • 4x 2n 2222 NPN transistors (generic NPN)
    • 4x 220 Ohm 1/4w resistors
    • 4x NPN photo transistors
    • a bunch of wire
    • Arduino

  • twitter script for linux

    Well let me give you an interesting script i found on Tech Republic………..

    Its how to Tweet from the command line using cURL, its very simple and to the point….just like a script should be
    if [ $(echo "${tweet}" | wc -c) -gt 140 ]; then
    echo "FATAL: The tweet is longer than 140 characters!"
    exit 1
    curl -k -u ${user}:${pass} -d status="${tweet}" https://twitter.com/statuses/update.xml >/dev/null 2>&1
    if [ "$?" == "0" ]; then
    echo "Successful tweet!"

    to us it just type this
    $ ~/bin/tweet "social server rules"
    the only other thing to worry about is you have to escape “?”, “!” -> “?”, “!”

  • Evo T20 project OS choice

    So i have Decide on my Distro that I want to use for my Evo. Its called Linux from Scratch,
    its a way to build your OS from compiling all the components, into a working linux.
    You can find more info here
    so far i have completed the Pre setup and getting the too chain compiled for the enviroment.
    there have been a few Hiccups here and there which i will get into in just a moment. Currently my Goal is to have a working linux under 16 megs so i dont have to buy more smart media cards, especially at $30+ for 128 megs, on out dated technology. but that is besides the point..

    Issues that  i have had so far

    1. Wget list has 2 broken links, I will list the 2 packages a little later
    2. Binutils would not compile, it was my mistake that i had made a few days ago while i was, the Tools link was pointing at the wrong Device, deleted it and remade it so it point to the correct folder
    3. after that i have run into another compile error dealing with GCC the error stated ../../gcc-4.3.2/gcc/double-int.h:184: error: expected ')' before 'double_int'
      ../../gcc-4.3.2/gcc/double-int.h:185: error: expected declaration specifiers or '...' before 'mpz_t'
      In file included from ../../gcc-4.3.2/gcc/c-lang.c:26:
      ../../gcc-4.3.2/gcc/tree.h:4895: error: expected declaration specifiers or '...' before 'mpz_t'
      ../../gcc-4.3.2/gcc/tree.h:4895: error: expected declaration specifiers or '...' before 'mpz_t'
      and still looking into what that means but shouldn’t take too long to figure out
    4. maybe more later

    So far This has been an interesting adventure, and would highly recomend that any linux admin should try this out and learn about how linux actuelly works, not many people understand how it all fits together and what it takes to make your own distro that you have complete control over…

    well now back to some more compilling! 🙂

    Edit : these are the errors after the warnings make[3]: *** [c-lang.o] Error 1
    make[3]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
    make[2]: *** [all-stage2-gcc] Error 2
    make[2]: Leaving directory `/mnt/lfs/sources/gcc-build'
    make[1]: *** [stage2-bubble] Error 2
    make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
    make: *** [all] Error 2

    update 8/20/09

    So i went to the mailing list and asked my question and apperently the mpfr and gmp need to be in the source directory of gcc,  in my opnion the note in 5.3 assumes that your in the source directory of the package after its unpacked “Before issuing the build instructions for a package, the package should be unpacked as user lfs, and a
    cd into the created directory should be performed. The build instructions assume that the bash shell is
    in use.” is the exact wording, this should be rephrased  to be more clear, but that’s my opinion so back to compiling the tool chain

    Update 9/1/09

    Using V6.5 i started over and have had no diffuculty in compiling the OS on a USB drive except of my own typos, as soon as i can boot it i will put up a screenshot and also a copy of the USB drive image

    Update 12/26/09

    Never buy crappy USB drives…….Never again will i buy that really cheap drive from that off brand you have never heard of……..i lost my image on that drive but i am recompiling it and doing it again it was fun project and now i can do it a little faster now. This time it will only take a few days to create again.

  • EVO T20 Project

    I had this Idea a while back, that i could take a low power cheap pc and make it into a re-purposed server. So i Decided to buy a few thin clients that where cheap, so i ended up with these 16mb flash 32 mb ram, 300MHz power house…… Now that i look at it i probably should have shopped around a little to get one with more memory, but fret not i did  have an extra 128mb sodimm, I’m am also waiting to get a 128mb SM card from ebay so i have more flash.

    but let me get to the point.

    I want to Run Linux on this thing , then add custom packages like a proxy, a web-server, FTP with a USB stick, or a music streamer , any application that could be just plug and play and you have your instant server, of course all server applications need a little setup but lets make them smart so they configure themselves no matter where you plug them in and have a network ,  but also have overrides for the advanced user.

    but this is all but a dream at the moment so let me begin with what i have

    • Evo T20 16m//30m
    • Ubuntu setup with TFTP  and DHCPD
    • a network or a crossover cable
    • an original firmware file for you Evo (for me it the win ce .net)
    • a hex editor and a some interesting tools

    Continue reading  Post ID 312

  • 2 Upcomming Hardware Projects

    Just recently, a friend gave me a IBM x Series 350 server, with extra processors and memory, It is missing the SCSI drives which im trying to look for as cheap as possible so far luck is not in my favor because each drive new costs about $90 for each drive and finding the bays and then the drives i might be able to get the price down to about $50- $60 dollars, also im looking for 2 Heat sinks for the 2 extra processors that i want to stick in there. More on this later, the next project i have is i have some thin clients coming, this project will be interesting, i have to hack some firmware and load up Linux on this little machine, the nice thing is some of the ground work is already laid out for me in some helpful walk through and project pages that i have read up on.
    More Info to come as i progress with these projects later