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

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.

Comments

author
JurgisP (author)2017-08-10

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.

author
krishnan793 (author)JurgisP2017-08-10

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...

author
JurgisP (author)krishnan7932017-08-16

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.

author
krishnan793 (author)JurgisP2017-08-16

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 ) )

author
thomas.kirchner.3760 (author)2017-08-09

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

author

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.

author
ScottL3 (author)2017-08-10

You could make this open your garage door.

author
krishnan793 (author)ScottL32017-08-10

Yes.. But I don't have any garage to open... :-) But I am planning to make it as a remote control for my DSLR... See this post... http://eionix.blogspot.in/2017/08/creating-wireles...

But thanks for the input...

author
dearnab (author)2017-08-08

Nice instructable..

author
krishnan793 (author)dearnab2017-08-08

Thanks arnab...

author
yousanle (author)2017-08-05

very good!

author
krishnan793 (author)yousanle2017-08-06

Thanks yousanle

About This Instructable

1,716views

15favorites

License:

More by krishnan793:Home Made Micro Aerial Vehicle (MAV) in 5 MinWarehouse Management Using DronesBatman Keychain With ESP8266
Add instructable to: