Hello Builders! This project is about making an unmoving object such as a lamp and turning it into you desk companion. Given that SLAMP runs on an Arduino the possibilities of controlling lights, fans and wifi connected appliances become endless. SLAMP controls its outputs based on the input given by the user. This input had to be natural feeling and not robotic, hence voice command was a necessity in designing this project. To simplify the project and to eliminate the use of a computer so that SLAMP operates completely independent of anything an android phone is used for the voice command recognition. The head movement is carried out by two 55g servos. This project is useful as it allows the user to have a single point unit controlling multiple objects, this allows for a total elimination of remotes and switches. This effectively reduces the amount of steps taken by the user to complete a task making this the perfect robot candidate.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Parts
The parts required for this project can all be found on amazon. The total cost was $110 given that you have the basic things like tool around.
2. HC-05 Bluetooth transceiver ( http://www.amazon.com/gp/product/B00L083QAC?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s03 )
3. Two 55g servos (9kg/cm @ 4.8v) http://www.amazon.com/gp/product/B015N2J7GW?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s02
4. 9v power supply ( a power brick will work ) To reduce the amount of wires the brick was opened and the inner circuit was taken out. (http://www.amazon.com/gp/product/B00CP1QLSC?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s03)
5. 5v power supply ( a power brick will work) To reduce the amount of wires the brick was opened and the inner circus was taken out.
6. 9v power jack.(male) (http://www.amazon.com/gp/product/B00CP1QLSC?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s03 )
Hot Glue Gun
Step 2: Solder Bluetooth Transceiver
1. Solder a red wire to the TX of the HC-05
2. Solder a black wire to the RX
3. Solder red to VCC and a black wire to the GND
If you need longer range from your phone to SLAMP then solder a wire to the HC-05's antenna band.( The golden zig zag pattern on the board. ) Soldering a wire to this will extend its antenna, the other end of the wire will go outside the lamp in an open area.
Step 3: Pan/ Tilt Servo Mount
We are going to have to make our rig that mimics the function of a human neck. So if we were to see rotation of 180 degrees ( looking left or right) and looking up and down. These to functions are basically called Pan/ Tilt motion.
This can be done by mounting a servo on top of another.
1. Cut the Servo wires short.
2. Connect VCC and GND on both of them
3. Screw in the servo heads.
4. Apply a dab of hot glue on top of the X axis servo.
5. Firmly hold the servo in place until the hot glue sets.
The servos should now have the ability to move independently of each other.
Step 4: Lamp Head Servo Mount
The lamp head is mounted on to the frame with screws.
1. Unscrew the Lamp Head.
2. Apply hot glue to the Lamp Head holders plate.
3. Firmly hold the servo in that place till its securely mounted.
4. Pour a dab of hot glue on to the servos head and hold the Lamp head on top of it.
If the lamp head you have it too heavy to be held up by hot glue try using epoxy glue. The epoxy glue will ensure it staying in its place.
Step 5: Servo Wire Extension
Since the wires on our servo aren't merely long enough to go all the away till the base we are going to have to extend them.
1. Solder a 3ft wire to the signal pin of both servos.
2. Solder a 3ft VCC and GND wire to the servo's VCC and GND.
Check to see if your lamp is constructed out of hollow tubes, if yes, then you can cover your wires by putting them through the tubes. In this case the tubes do exist.
3. Put the wires through the hollow frames.
4. Drill a 1/4" hole in the base for the wires to go in through. ( For the servo wires the hole can be made behind the main lamp holder. )
5. Drill 2 more 1/4" holes on the base for the AC wire and the light control wire.
Step 6: Power Bricks
The 9v and 5v power bricks supplies need a source of AC input for it to function so instead of adding two separate long AC wires.
1. Solder AC wire to the ACin pins on the 9v power brick.
2. Solder two 5" wires to the ACin of the 5v power brick, solder the other ends to the 9v power bricks ACin.
3. Solder a red wire to the VCC of the 5v brick and GND to the GND of the brick.
4. Solder a power jack to the 9v power brick.
Step 7: Connect the HC-05
1. Plug in the power jack ( Make sure the power brick is not connected to the wall)
2. Solder all of the GND wires.
3. Connect the VCC of HC-05 module to the 3.3v pin on the Arduino.
4. Connect the TX of HC-05 to RX of Arduino
5. Connect the RX of HC-05 to TX of Arduino
Step 8: Glue the Components
The base of many lamps are made out of aluminum which is conductive, gluing the circuits and boards directly to this would short everything. To ensure that this doesn't happen we are going to use playing cards or some other card board surface to divide the metal and metal.
1. Hot Glue the cards down to the bottom of the base.
2. Hot Glue the Arduino on to the cards.
3. Hot Glue the HC-05 module on to the card
4. Hot Glue the both of the power bricks on to the cards. (MAKE SURE THAT THE AC PIN OR JOINT DO NOT TOUCH ANYTHING, failure to follow this may result in injury or death).
1. Connect the tilt servo to pin 10 and pan servo to pin 9.
2. Connect the VCC and GND coming from the servos to GND and the 5v pin on the POWER BRICK( Make sure its not Arduinos 5v pin as the arduino cannot supply the power required by the servos.)
3. Connect a 3ft wire on pin 13 going to an led.
To connect a Light bulb to the SLAMP we have to use a component called a relay.
I have an Instructables on how to use them:
https://www.instructables.com/id/LinkIt-One-Relay-Light/ - I made this
If you want to add the capability of controlling your light bulb with SLAMP make sure to check out the link above. I made the 'ible of a micro controller very similar to that of Arduino so the tutorial and the circuit schematic would be the same.
Step 9: Code It
Plug in the SLAMP to the computer and upload the code given in the link below. It will turn on and off a light on pin 13, make the SLAMP 'Dance', and make it move its head in a manner which makes it seem like its saying ' yes' or 'no'.
To add your own commands simply add this:
if( voice == "*ENTERYOURCOMMANDHERE")
// ENTER YOUR DESIRED ACTION HERE
To control SLAMP we are using voice commands, the voice commands could be sent through a computer (online voice command decoder) or a phone.
Pointing out one is like pointing out a web browser they all work its just different in some ways.
Open the app of your choice and go into the bluetooth settings. Turn on your SLAMP by plugging it in.
In a few seconds HC-05 should come up on screen. Pair with it using the passcode, ' 1234' or '0000', but in some cases your phone will automatically do that for you.
Once connected you're done! You now have a world controlling robot which moves and provides light.
Step 10: Conclusion and Improvements
SLAMP on its own cannot do much but connecting other sources to it and giving it control of your house will enable it to do much more and save you the time. In its fibers the servo movements serves for nothing but one reason and that is to personalize the user with SLAMP. The reaction that SLAMP has gotten is always fun to watch as a smile grows across the face of the person looking at it when it moves, " WOAH!! Thats so cool! ", This is exactly what SLAMP was initially designed for, but as it was built and improved the uses and tasks it could complete were a bonus.
The current version of SLAMP ( SLAMP V2) has the ability to play, stop, change music. It can control any IR device( TV, Camera Shutter..etc), It now moves at random intervals( more natural feeling when being on the table). I would like to hear your suggestion on how he can be further improved. Hope you like SLAMP:)