Close
0%
0%

Custom Sonic Screwdriver

Custom DIY Sonic-Screwdriver.
Not a replica, just our own version.

Similar projects worth following
Big fan of Doctor Who, one day i decided to think of my own real-life version of the sonic screwdriver. So I over-engineered a stick shaped device containing Bluetooth, NFC, FM-radio transceiver, ultrasonic range-finder, microphone, speaker, 6-DOF IMU, Screen, IR communication, multimeter, and bottle opener.
With the Sci-Fi contest I got motivation and started developing a much simpler prototype of the Sonic Screwdriver.

This version (on the picture) features :
- 128x32 OLED Screen
- Ultrasonic Range Finder
- ATMEGA328P
- A speaker salvaged from an old smartphone
- All is powered by a 550mAh lithium battery
(The joystick seen on the photo is not used for now)

I also wanted to add an IR transceiver and an RGB LED but the actual crapy proto-board does not allow that.

The OLED Screen

It was bought at Adafruit. I made all the testing and code with it on a breadboard, when it was done I unsoldered the screen and necessary components and soldered everything back on an half SOIC-28 adapter (same sapcing as the ribbon, minus one pin) so i could fit it (the adafruit board is way too large).

Ultrasonic RangeFinder

Also bought at Adafruit. As for the OLED screen I had to modify it to make it fit in a tube (the square board would have its corner stick out of the case).

Sound

Actualy the most interresting part of this project.

The Amp+Speaker part is made in the worst possible way: Its a BC547 transistor directly driving a smartphone speaker.

The sound generation however is a bit more achieved. I took the 8-bit raw data of the sonic's soundwave (explained later) and put it in a PROGMEM array. A 16-bit timer generates an interrupt in wich the program reads the values in the array, one by one at a frequency of 44 kHz (this frequency changes depending on the distance measured by the range-finder). The read value is then loaded on an 8-bit timer that generates a PWM signal at 62 kHz. Apparently the speaker's impedence is sufficient to filter correctly the PWM signal and lets a clear sound output.

How to get the 8-bit raw soundwave data:

First, i downloaded the original Sonic Screwdriver sound. Editing the file with Audacity I isolated a part that is the shortest posible, repeats nicely and still sounds like the Sonic Screwdriver. Then I exported the sound as a RAW unsigned 8-bit PCM file (in the save dialog select the type "Other uncompressed formats" then click Options").
The next step is to read the file with an hexadecimal editor (I used Frhed) and save the data in hexadecimal form. With Frhed I obtained something like this:

807f7e7d7b7a7a7b7d<br>1868c90918f8a837b7<br>6c666469748496a4ad<br>ca2907a65534b4f5f7<br>94acbbbeb29c80624a

and to make an array we need something more like that:

0x80, 0x7f, 0x7e, 0x7d, 0x7b, 0x7a, 0x7a, 0x7b, 0x7d8

So I wrote a little program in VB.net to reformat my 11k bytes of raw data. link , souce


Here is the C sources for the microcontroller.

When using arduino IDE, you have to comment the interrupt routine for timer0 overflow "ISR(TIMER0_OVF_vect)" in the "hardware/arduino/avr/cores/arduino/wiring.c" file (around line 44).

DISCLAMER: The code I made is a total mess of obscures variable names, commented stuff used for debug or testing and very little explaination, and contains some errors (that have no impact at the use, but if you copy paste some parts, do it with care).
I am actualy working on an other project, but one day I will rewrite this. However, if you have any question, ask me and I will answer as clearly as I can.

  • 1 × ATMEGA328P Microprocessors, Microcontrollers, DSPs / ARM, RISC-Based Microcontrollers
  • 1 × 128x32 OLED Screen bought at Adafruit.com
  • 1 × Maxbotix Ultrasonic Rangefinder - LV-EZ1
  • 1 × Speaker
  • 1 × NPN transistor

View all 7 components

  • Let the problems begins

    Muphins04/22/2014 at 12:33 0 comments

    The OLED Screen is dead. We had a little problem with it a few days ago (the internal charge pump was getting hot) and it appeard that it was caused by bad soldering. The pads of the ribbon were getting corroded. Resoldering the thing properly solved the issue. But maybe the charge pump was too much damaged and died after a few uses.

    Now the power pins appear as a short cut.

View project log

Enjoy this project?

Share

Discussions

rikabim557 wrote 06/03/2021 at 10:19 point

Oh its amazing to see this type of unique project information I am also working on a range finder project you can see here.

  Are you sure? yes | no

Ethan Durrant wrote 10/12/2014 at 00:09 point
I am doing a quite similar project, but am still in the planning and brainstorming phase, haven't started on the hardware. I like your use of an ultrasonic sensor on the end, I may have to borrow that idea in my design ( if it's no problem to you of course ). You can check out mine here:
http://hackaday.io/project/3067-MY_SONIC_SCREWDRIVER
there isn't much on it as of now, but will add to it soon.

  Are you sure? yes | no

Muphins wrote 11/11/2014 at 10:53 point
Hi, I'm glad you like it. There is absolutely no problem, you can borrow what ever you want. Good luck for your project.

  Are you sure? yes | no

pcaliman wrote 05/25/2014 at 14:11 point
Very good project!!! I'm huge fan too, and afther the 50th aniversary, I started to think about a disign of my own Sonic Screwdriver. I decided to use a Screen too to have an Input/output interface, but I use a LCD 16X2, the use of the 182x32 OLED is a Better Idea. In my case i decided to use a 16f877A pic. The Joystick is an excelent way to move the cursor in futere aplications, I was using buttons, but the Joystick reduce a lot the space. I really congratulate you!!! I just found this page yesterday while I was looking in internet others SS projects. Keep in touch!!

  Are you sure? yes | no

davedarko wrote 05/18/2014 at 17:06 point
hey there, do you have any code or information on how you did the sound and the modulation?

  Are you sure? yes | no

Muphins wrote 08/04/2014 at 13:09 point
Hi, sorry for the long time without reply.
I have updated the details of the project where i explain this.

  Are you sure? yes | no

davedarko wrote 08/04/2014 at 13:58 point
thank you, I will definitely look into that :)

  Are you sure? yes | no

Gadgetglenn73 wrote 05/02/2014 at 04:31 point
this is very similar in concept to an SS project i am looking into as well. when i have a little more hopefully i will be able to share with you

  Are you sure? yes | no

Muphins wrote 04/21/2014 at 09:32 point
Thank you for your interest :)
The description is coming soon

  Are you sure? yes | no

davedarko wrote 04/21/2014 at 05:38 point
So from the looks you've got a display, an amped piezo speaker on a dip atmegaX8 with a joystick? what's on the top? How is it powered?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates