Not exactly sure how I think of these projects.
But hey, stops me roaming the streets.
So, for some reason, I decided I needed a Jeff Tracy ashtray, that flips up upon an incoming call, and also flashes the eyes of a Thunderbirds picture.
So, a quick Google results in a picture of said ashtray. I could not find a 3d file of it, so I made one in Tinkercad.
There seemed to be conflicting images around of the colour. Some were silver and some were gold.
After watching a few episodes on Youtube, it became obvious that is was supposed to be gold.
So, a quick Google results in a picture of said ashtray. I could not find a 3d file of it, so I made one in Tinkercad.
There seemed to be conflicting images around of the colour. Some were silver and some were gold.
After watching a few episodes on Youtube, it became obvious that is was supposed to be gold.
Above are the STL files. You need a small 9g servo to make the lid flip up.
I used n Arduino Nano, just because I had one. I also threw in a HC-06 Bluetooth module, so that I could control it from an Android app.
The circuit is fairly simple. You need a nice big capacitor across the HC-06, as they are fairly noisy. The whole thing runs off the 5v USB lead.
I installed a JQ8400 MP3 module. These are my go-to MP3 modules now. I loaded on the required sound files and fired it through a small amplifier.
Finding a small enough speaker was a challenge, but I did eventually find one in my box of parts. I think it came out of a laptop.
The circuit is fairly simple. You need a nice big capacitor across the HC-06, as they are fairly noisy. The whole thing runs off the 5v USB lead.
I installed a JQ8400 MP3 module. These are my go-to MP3 modules now. I loaded on the required sound files and fired it through a small amplifier.
Finding a small enough speaker was a challenge, but I did eventually find one in my box of parts. I think it came out of a laptop.
The servo horn needs sticking to the top piece. I left that unconnected, so that I could get it aligned correctly.
The underside of the top piece has sticky-backed green felt, just as the original had. I also installed a small 'test' button. This just flashes the LEDs and plays a sound effect. There is a BC548 that controls the picture frame LEDs. Finished it off with a small Piezo for the sound effects. |
After horrifically Photoshopping my face onto a Thunderbirds picture (I didn't go for the picture of Brains for obvious reasons), I simply added a couple of white 3mm LEDs behind the eyes.
The Arduino software does nothing more that wait for a Bluetooth command. For instance, that command might be 'LEDSON' or 'LEDSOFF'. This would manually trigger the picture frame LEDs to flash.
When the MIT App Inventor 2 code receives a phone call, it transfers the number by Bluetooth to the Arduino, and that checks to see if it's a valid number. You can run up to ten picture frames off this Arduino Nano.
When you first boot the Android App, it fires over the ten stored number (user selected in the App) to the Arduino, so it knows what to compare the incoming call with.
This means the Arduino doesn't need to be edited to change any numbers. It's all done in the App.
When a valid call is received, it flips up the lid using the servo, and the telephone call sound is transferred to the speaker using a stereo 3.5mm jack.
The Arduino software does nothing more that wait for a Bluetooth command. For instance, that command might be 'LEDSON' or 'LEDSOFF'. This would manually trigger the picture frame LEDs to flash.
When the MIT App Inventor 2 code receives a phone call, it transfers the number by Bluetooth to the Arduino, and that checks to see if it's a valid number. You can run up to ten picture frames off this Arduino Nano.
When you first boot the Android App, it fires over the ten stored number (user selected in the App) to the Arduino, so it knows what to compare the incoming call with.
This means the Arduino doesn't need to be edited to change any numbers. It's all done in the App.
When a valid call is received, it flips up the lid using the servo, and the telephone call sound is transferred to the speaker using a stereo 3.5mm jack.
The servo did tend to be a twitchy pain in the bum. I soon worked out the best way was to leave the servo unattached until it was needed.
When a call comes in: AshtrayMic.attach(A0); and once it was lifted: AshtrayMic.detach();
The App does the usual thing of asking if it can turn on your phones Bluetooth, and then basically listens for a call. I won't go into depth with the App code, as that is a whole new page right there.
When a call comes in: AshtrayMic.attach(A0); and once it was lifted: AshtrayMic.detach();
The App does the usual thing of asking if it can turn on your phones Bluetooth, and then basically listens for a call. I won't go into depth with the App code, as that is a whole new page right there.
So there you have it. F.A.B