Batman Keychain With ESP8266

3,234

21

12

Introduction: Batman Keychain With ESP8266

I have recently bought a batman key chain from amazon. There is a small button in the key chain, when pressed it lights the batman's eye and sounds a pathetic tune. So I thought of customising it a bit.

The key chain will be able to produce a pacman monotone with a customizable light from the batman's eye. The tune is customizable. I chose pacman tone because it was easy to generate the monotone. If anybody can come up with a batman monotone I am happy to replace the tone.

Things needed.

  1. ESP8266 01
  2. 3.7 V LiPo Battery
  3. USB LiPo Charger
  4. Old earphone speaker
  5. LEDs
  6. 220 resistor

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Open the Keychain

The above video shows how it behaves when I got the key chain. Now open the key chain. There is enough room to put some custom electronic parts.

Step 2: Find an Old Earphone and Take One of Its Speaker

Earphone speakers are small and if you are going to generate some monotone sound, it is loud enough to be used in our purpose.

Step 3: Connection

Make the connection as per the circuit diagram. I have used 3 SMD (Red, Green, and Blue) LEDs. I soldered it to a small protoboard with 220 ohm resistor in series with the LEDs. You can use any LEDs, but SMD will save you a lot of space.

Connect the LiPo charger to the battery.

Step 4: Program the ESP

Program the ESP01 using a USBtoSerial converter. You can use arduino IDE for programming ESP8266.

Step 5: Put Everything Back Inside the Keychain

Make some space using your dremel tool to put everything inside the key chain.

Step 6: Test Your Keychain & Future Additions

Things that can be added in the futuree

  1. Pressing for a long time will enable a hotspot
  2. Option to change the tone by writing it to EEPROM on the go (ESP8266 has 512 bytes of EEPROM).
  3. Option to play PCM encoded 8 bit WAV file.

MacGyver Challenge

Participated in the
MacGyver Challenge

First Time Author Contest

Participated in the
First Time Author Contest

Be the First to Share

    Recommendations

    • LED Strip Speed Challenge

      LED Strip Speed Challenge
    • Sculpting Challenge

      Sculpting Challenge
    • Clocks Contest

      Clocks Contest

    12 Discussions

    0
    JurgisP
    JurgisP

    2 years ago

    Its overkill to use ESP8266 for such kind of task, i would rather use some Attiny, but you migt add some aditional functionalitirs in the future.

    0
    eionix
    eionix

    Reply 2 years ago

    Yes. But compare the prices. You can buy both using the same price. I am also planning to control my DSLR using this one. From phone, I can remotely trigger the shutter and also set time lapse option (which is not present in my nikon DSLR). See this http://eionix.blogspot.in/2017/08/creating-wireles...

    0
    JurgisP
    JurgisP

    Reply 2 years ago

    Attiny also can blast IR :) you can get Attiny a bit cheaper but it's irelevent when you making only one copy. Maybe the main advantage would be power consumtion.

    0
    eionix
    eionix

    Reply 2 years ago

    I know ny controller can do that job. :P But I need it to be controlled by my phone. From phone I will set the time lapse config and it will trigger automatically. Regarding power consumption I think, it will be the reverse. Most of the avr uC will consume much less current comparing with esp8266 without enabling any deep sleep. (I have seen people messing with deep sleep mode in esp8266 resulting in much less current consumption < 1mA. ( https://openhomeautomation.net/esp8266-battery ) )

    0
    thomas.kirchner.3760

    don't you need a flyback diode across the speaker?
    Also, you may want to consider playing wav files from SPIFFS memory. I posted some code for that a while ago at http://www.esp8266.com/viewtopic.php?f=6&t=8562

    0
    eionix
    eionix

    Reply 2 years ago

    I already read your post in esp8266 forum. I will definitely try that out. But quality of the sound will not be that good,right?

    I don't think it will create ny problems due to back emf, but adding a diode will be a good idea. Thanks for the input.

    0
    ScottL3
    ScottL3

    2 years ago

    You could make this open your garage door.

    0
    dearnab
    dearnab

    2 years ago

    Nice instructable..

    0
    eionix
    eionix

    Reply 2 years ago

    Thanks arnab...

    0
    yousanle
    yousanle

    2 years ago

    very good!

    0
    eionix
    eionix

    Reply 2 years ago

    Thanks yousanle