13
AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with Prof. Justin Seipel (ME) Fall 2015 RoboXplorer Hacking and Arduino Control This workshop is organized in the following sections: Hacking the RoboXplorer Testing the hacked RoboXplorer RoboXplorer blink RoboXplorer speed control and further experimentation Hacking the RoboXplorer The RoboXplorer robot platform’s actuators (motor and 2 front LEDs) are initially wired so that all of them are connected to the power source (4.5V battery compartment) at the same time. We would like to change this wiring, so that we can control each actuator separately with the Arduino board (digitally and through PWM control). So let’s take the RoboXplorer apart and get started! 1) Completely disassemble your RoboXplorer, taking off the white outside top shell, disconnecting all the legs and carefully disconnecting and lifting out the drive train. Make sure to keep all loose parts together! 2) For now, we are only going to work with the drive train element. First, let’s disconnect the front faceplate with the LED “eyes.” You’ll need a small Phillips (crosshead) screwdriver for this:

RoboXplorer Arduion hackingweb.ics.purdue.edu/~fwinkler/AD41700_F15/AD41700_Arduino_work… · AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: RoboXplorer Arduion hackingweb.ics.purdue.edu/~fwinkler/AD41700_F15/AD41700_Arduino_work… · AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with

AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with Prof. Justin Seipel (ME) Fall 2015 RoboXplorer Hacking and Arduino Control This workshop is organized in the following sections:

-­‐ Hacking the RoboXplorer -­‐ Testing the hacked RoboXplorer -­‐ RoboXplorer blink -­‐ RoboXplorer speed control and further experimentation

Hacking the RoboXplorer The RoboXplorer robot platform’s actuators (motor and 2 front LEDs) are initially wired so that all of them are connected to the power source (4.5V battery compartment) at the same time. We would like to change this wiring, so that we can control each actuator separately with the Arduino board (digitally and through PWM control). So let’s take the RoboXplorer apart and get started! 1) Completely disassemble your RoboXplorer, taking off the white outside top shell, disconnecting all the legs and carefully disconnecting and lifting out the drive train. Make sure to keep all loose parts together! 2) For now, we are only going to work with the drive train element. First, let’s disconnect the front faceplate with the LED “eyes.” You’ll need a small Phillips (crosshead) screwdriver for this:

Page 2: RoboXplorer Arduion hackingweb.ics.purdue.edu/~fwinkler/AD41700_F15/AD41700_Arduino_work… · AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with

Winkler, Arduino Workshop 04 AD41700, Fall 2015, p.2      

Immediately put the two screws into your component box, otherwise you will loose them! Taking off the front faceplate will give us access to the LED wiring:

3) You can take off the white LED mounting plate from the RoboXplorer drive train element and cut the red and black wire, disconnecting the two LEDs from the robot’s power supply – remember: we would like to control each one independently with the Arduino:

You can already cover the tips of the cut off wires on the drive train with electrical tape (hot glue, gaffer tape or scotch tape will work as well) – we need to insulate them so that there is no chance that their exposed wires will ever touch each other (shorted circuit!)

Insolate these cut off ends.

Page 3: RoboXplorer Arduion hackingweb.ics.purdue.edu/~fwinkler/AD41700_F15/AD41700_Arduino_work… · AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with

Winkler, Arduino Workshop 04 AD41700, Fall 2015, p.3      

4) Now take out the LEDs from their mounting plate and cut off their anodes (longer legs, the ones connecting to the red wire) as close as possible to the red wire and solder new, longer wires to the LEDs’ anodes. Chose different colors, so you can tell the left and right LED apart, I chose orange for the left LED and brown for the right LED:

5) Carefully de-solder the diode and the black wire from the two resistors and solder a ground wire in their place (I chose blue, black would be fine, too) Remember that color coding helps, later on you won’t be able to see the wires’ connections to parts anymore, so you need to be able to tell their function by looking at their color.

Page 4: RoboXplorer Arduion hackingweb.ics.purdue.edu/~fwinkler/AD41700_F15/AD41700_Arduino_work… · AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with

Winkler, Arduino Workshop 04 AD41700, Fall 2015, p.4      

6) Next carefully fit everything back into the LEDs’ plastic mount:

7) Since the wires don’t fit through the plastic mount’s opening anymore we need to drill a new hole in the top of the front cover, like this:

Page 5: RoboXplorer Arduion hackingweb.ics.purdue.edu/~fwinkler/AD41700_F15/AD41700_Arduino_work… · AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with

Winkler, Arduino Workshop 04 AD41700, Fall 2015, p.5      

8) You can now safely route the wires through the hole in the front cover, attach the front cover to the base mounting plate and re-attach the LED assembly to the drive train with the two screws:

9) This was the hardest part of the RoboXplorer modification. The next steps are comparatively easy! First cut off the power connector from the side of the RoboXplorer, leaving enough wire on either end (power connector end and RoboXplorer end):

Page 6: RoboXplorer Arduion hackingweb.ics.purdue.edu/~fwinkler/AD41700_F15/AD41700_Arduino_work… · AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with

Winkler, Arduino Workshop 04 AD41700, Fall 2015, p.6      

10) Solder extension wires on either set of wires (power connector and RoboXplorer end):

Make sure that exposed solder joints are covered with electrical tape (hot glue or scotch tape):

Page 7: RoboXplorer Arduion hackingweb.ics.purdue.edu/~fwinkler/AD41700_F15/AD41700_Arduino_work… · AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with

Winkler, Arduino Workshop 04 AD41700, Fall 2015, p.7      

11) Now it’s time to put everything back together! First, connect the power connector to the sub-chassis:

Then click the drive train back into the RoboXplorer’s sub-chassis:

Page 8: RoboXplorer Arduion hackingweb.ics.purdue.edu/~fwinkler/AD41700_F15/AD41700_Arduino_work… · AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with

Winkler, Arduino Workshop 04 AD41700, Fall 2015, p.8      

12) Assemble the legs, connect them with the drive train and add the half rings on top to make them stay in place:

13) In order for all the wires to make it to the RoboXplorer’s outside (so we can connect them to the Arduino) we need to drill some holes in the top chassis, I drilled 3 to separate the various wires (LEDs, power, motor connection):

Page 9: RoboXplorer Arduion hackingweb.ics.purdue.edu/~fwinkler/AD41700_F15/AD41700_Arduino_work… · AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with

Winkler, Arduino Workshop 04 AD41700, Fall 2015, p.9      

14) Carefully feed the wires through the holes and safely click the top chassis back in place, your RoboXplorer should now look like this:

15) Attaching a breadboard for easy prototyping: in this step I use the adhesive backing – I only strip off pieces of the protective tape – to stick the breadboard to the top (flat) part of the RoboXplorer:

Page 10: RoboXplorer Arduion hackingweb.ics.purdue.edu/~fwinkler/AD41700_F15/AD41700_Arduino_work… · AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with

Winkler, Arduino Workshop 04 AD41700, Fall 2015, p.10    

16) Add some strong double-sided tape to the underside of the Arduino board (relatively close to the USB jack)

… and stick the board to the back of the RoboXplorer, like this:

Page 11: RoboXplorer Arduion hackingweb.ics.purdue.edu/~fwinkler/AD41700_F15/AD41700_Arduino_work… · AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with

Winkler, Arduino Workshop 04 AD41700, Fall 2015, p.11    

17) The previous picture already shows how I connected all the wires together to recreate the initial functionality of the RoboXplorer (when flipping the power switch at the underside of the robot, the motor and the lights turn on). You should test this with your hacked robot, to make sure all is working. I haven’t connected the Arduino board yet, this will come in the next step.

Also, now some of the building tips, discussed in workshop 01 will become very important, see in the pictures below how important it is to keep wires short and close to the breadboard and Arduino’s surface:

Page 12: RoboXplorer Arduion hackingweb.ics.purdue.edu/~fwinkler/AD41700_F15/AD41700_Arduino_work… · AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with

Winkler, Arduino Workshop 04 AD41700, Fall 2015, p.12    

With long wires this will happen:

18) After you made sure your RoboXplorer is still moving with LEDs lit up, let’s try and connect the Arduino, so that in the first step we use the “blink” program from previous workshops to make the LEDs blink rather than stay on. I am using a 2222 NPN transistor since the LEDs seem fairly strong and I don’t know exactly the current they are drawing, as not to risk damaging the Arduino board. This is what the circuit looks like (I use pin 3 on the Arduino), and I uploaded the blink code from the Arduino Examples onto my board.

Page 13: RoboXplorer Arduion hackingweb.ics.purdue.edu/~fwinkler/AD41700_F15/AD41700_Arduino_work… · AD41700 Robots, Art and Culture Prof. Fabian Winkler (AD/ETB) in collaboration with

Winkler, Arduino Workshop 04 AD41700, Fall 2015, p.13    

Here is the top view of the circuit, notice how the motor wires are not yet connected, they are just in random positions on the breadboard:

Things to try now by yourself A) Try making the LEDs behave differently from each other. You’ll have to change your circuit to do so. B) Also, connect the motor to the Arduino, first using a TIP 120 transistor (see page 3 of workshop 03) and then the SN754410 motor driver IC (see page 4 of workshop 03). I haven’t tried this out myself yet, if the motor draws too much power we need separated power supplies for Arduino and the RoboXplorer. For now you can use the USB power from your computer to power the Arduino if needed and connect the motor to the RoboXplorer’s power. C) Augmenting the RoboXplorer with sensors: you can now think about adding sensors to the RoboXplorer platform as well, some that might influence its built-in actuators, e.g. photocells that turn on the LEDs when the ambient light gets darker, or a potentiometer that allows the motor to change its speed or direction. However, you can also think of sensors that take some of the RoboXplorer’s behavior and turn it into some other form of output. For example, mounting an accelerometer on the robot that measures its up and down/left and right movement and turn this into sound feedback (e.g. by controlling the frequency of a tone, creating a rhythm or do simple sound synthesis).

Arduino power (Vin) and GND Motor wires

not connected to anything yet!

Power and GND from batteries.

Both power bus lines connected on breadboard.