NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » WiFi Sniffer Dog

March 06, 2010
by feilipu
feilipu's Avatar

WiFi Sniffer Dog

I was looking for a "why" for investing my time in this, because with a "why" progress is always faster. And I think this will make an excellent one / two year multi-layer project, that will be able to demonstrate itself at the end. Also it won't consume too much cash.

This post is to create a problem description, expected outcomes, and path I'll be taking. I will also be a reference when I forget where I was going with this.

Why.

  • Being able to find my 'Droid when it has gone missing around the house, and (more reguarly) being able to find my wife's Crackberry is a fairly regular occurrence. So, I'd like to build something that can find both of these WiFi enabled devices. Also, being able to search out iPhones and WiFi APs, like a drug sniffer dog, would be mildly entertaining for family and visitors.

Expected features.

  • Autonomously seek out and approach WiFi sources in order of strength.
  • "Bark" when the device is in close proximity.
  • Navigate & travel at dog speed in an unfamiliar environment.
  • Avoid aggressive obstacles within the map. "Growl" at these obstacles.
  • Reorientate autonomously if an aggressive obstacle "picks up" or "plays".

Assumptions.

  • The floor is flat. Litter can be avoided. -> a cheaper indoor chassis can be used.
  • The room is small. 10m x 10m map can be built, with translation as map edge approached. -> memory conservation.

Initial Plan.

  1. Build chassis platform for use indoors.
  2. Build motor controls to allow straight line, radius, and Bézier motion.
  3. Build emergency collision avoidance.
  4. Build long distance sensors.
  5. Build voice box - bark, growl, yap, whine, etc.
  6. Build area mapping.
  7. Build aggressive object collision avoidance.
  8. Build aggression response.
  9. Build WiFi sensors & target mapping.
  10. Build intelligence logic to enable end result.

Component sourcing.

  • Chassis

1x Pololu 5" inch Robot Chassis RRC04A http://www.robotgear.com.au/Product.aspx/Details/353 1x Pololu 42 x 19mm Wheel and Encoder Set http://www.robotgear.com.au/Product.aspx/Details/307 1x TB6612FNG Dual Motor Driver Carrier http://www.pololu.com/catalog/product/713 1x Pololu Ball Caster with 1" Plastic Ball http://www.pololu.com/catalog/product/956 2x 10:1 Micro Metal Gearmotor http://www.pololu.com/catalog/product/1099

1x Arduino Duemilanove & Prototypying Shield http://arduino.cc/en/Main/ArduinoBoardDuemilanove (will be replaced in step 9. but keep shield)

  • Emergency Sensors

3x Pololu Carrier with Sharp GP2Y0D810Z0F Digital Distance Sensor 10cm http://www.pololu.com/catalog/product/1134

  • Long Distance Sensors.

2x Sharp GP2Y0A21YK0F Analog Distance Sensor 10-80cm http://www.pololu.com/catalog/product/136

  • Voice Box.

1x Piezo Buzzer from NerdKits

  • Aggression Sensors.

1x MMA7260QT 3-Axis Accelerometer http://www.pololu.com/catalog/product/766 1x LISY300AL Single-Axis Gyro http://www.pololu.com/catalog/product/765

  • WiFi Sensors (and revised Microcontroller Platform).

1x BlackWidow 1.0 http://www.seeedstudio.com/depot/blackwidow-10-p-613.html

So, maybe the next post next month, when the chassis us working as expected.

March 12, 2010
by feilipu
feilipu's Avatar

WiFi Sniffer Dog - Part 2

This post covers some of the references and libraries that I've found to be potentially useful.

A trip to the different on-line shops has allowed me to gather most of the pieces... and they're on their way. But, at the moment just reading and researching...

Expected features.

* Autonomously seek out and approach WiFi sources in order of strength.
* "Bark" when the device is in close proximity.
* Navigate & travel at dog speed in an unfamiliar environment.
* Avoid aggressive obstacles within the map. "Growl" at these obstacles.
* Reorientate autonomously if an aggressive obstacle "picks up" or "plays".

Optional features.

* Follow someone around whether or not they have a WiFi device (using thermal sensor?).

Assumptions.

* The floor is flat. Litter can be avoided. -> a cheaper indoor chassis can be used.
* The room is small. 10m x 10m map can be built, with translation as map edge approached. -> memory conservation.

Initial Plan.

  1. Build chassis platform for use indoors.
  2. Build motor controls to allow straight line, radius, and Bézier motion.
  3. Build emergency collision avoidance.
  4. Build long distance sensors.
  5. Build voice box - bark, growl, yap, whine, etc.
  6. Build area mapping.
  7. Build aggressive object collision avoidance.
  8. Build aggression response.
  9. Build WiFi sensors & target mapping.
  10. Build intelligence logic to enable end result.

  11. Build Thermal sensors & target tracking.

Component sourcing.

* Chassis

1x Pololu 5" inch Robot Chassis RRC04A http://www.robotgear.com.au/Product.aspx/Details/353 1x Pololu 42 x 19mm Wheel and Encoder Set http://www.robotgear.com.au/Product.aspx/Details/307 1x TB6612FNG Dual Motor Driver Carrier http://www.robotgear.com.au/Product.aspx/Details/319 1x Pololu Ball Caster with 1" Plastic Ball http://www.robotgear.com.au/Product.aspx/Details/370 2x 10:1 Micro Metal Gearmotor http://www.robotgear.com.au/Product.aspx/Details/344

1x Arduino Duemilanove http://arduino.cc/en/Main/ArduinoBoardDuemilanove (will be replaced in step 9.) 1x Arduino Proto Shield http://www.sparkfun.com/commerce/product_info.php?products_id=7914

Reminder to read the Duemilanove information at the Arduino web site http://arduino.cc/en/Main/ArduinoBoardDuemilanove

The Society of Robots web site is filled with relevant projects and help. Should be able to get a lot of code examples from here. http://www.societyofrobots.com

The wiki pages on robots are full of info too. http://en.wikibooks.org/wiki/Category:Robotics

* Emergency Sensors

3x Pololu Carrier with Sharp GP2Y0D810Z0F Digital Distance Sensor 10cm http://www.robotgear.com.au/Product.aspx/Details/309

* Long Distance Sensors.

2x Sharp GP2Y0A02YK0F Analog Distance Sensor 20-150cm http://www.robotgear.com.au/Product.aspx/Details/272 1x SRF10 Dual Transducer Ultrasonic Ranger http://www.robot-electronics.co.uk/htm/srf10tech.htm

* Voice Box.

1x Piezo Buzzer from NerdKits

* Aggression Sensors.

1x MMA7260QT 3-Axis Accelerometer http://www.pololu.com/catalog/product/766 1x LISY300AL Single-Axis Gyro http://www.pololu.com/catalog/product/765

* WiFi Sensor (and revised Microcontroller Platform).

1x BlackWidow 1.0 http://www.seeedstudio.com/depot/blackwidow-10-p-613.html

* Thermal Sensor.

1x Thermopile Array http://www.robotgear.com.au/Product.aspx/Details/294

So, maybe the next post once some more details are to hand.

Construction NOTES to self. R(emember this when building)

  1. Build chassis platform for use indoors.

Chassis platfrom comes from Pololu, so it will be good to use their Orangutan libararies wherever possible. I will need to modify them as the Arduino runs at 16MHz (not at 20MHz).

Should I modify Arduino/Blackwidow to use 20MHz crystal, to save modifying all the Orangutan, and also to gain 33% more cycles/sec?

Have purchased CRYSTAL 22.1184MHZ HC49/US Crystal from Digi-Key. Everyone loves to overclock their stuff, why should the AVR be different? And this frequency gives a 0% error on UART serial speeds (similar to the Nerdkits crystal). I bought 50x so if anyone wants one / some, let me know.

Webbot Lib is a library that addresses most issues associated with building robots. http://webbot.org.uk/iPoint/30.page

Will get system power from Liquidware Lithium Backpacks. Medium for AVR. Large for Motors. https://www.liquidware.com/shop/show/BP/Lithium+Backpack

  1. Build motor controls to allow straight line, radius, and Bézier motion.

Basic information on how to get differential drive working. http://www.societyofrobots.com/programming_differentialdrive.shtml

Then how to add PID control to the system. http://www.societyofrobots.com/programming_PID.shtml http://en.wikipedia.org/wiki/PID_controller

Some of the Orangutan & Pololu libraries are directly relevant: OrangutanMotors - basis for control of the DC motors. PololuQTRSensors - basis for reading the Quadrature sensors from Pololu. PololuWheelEncoders - basis for reading the Encoders on the Wheels.

CourbeBezier Libraries are interesting for describing Bezier curves. http://jppanaget.com/doku.php/wiki:bezier_curves

  1. Build emergency collision avoidance.

Some of the Orangutan & Pololu libraries are directly relevant: OrangutanPulseln - basis for reading the short range sensors. OrangutanDigital - basis for reading the short range sensors.

  1. Build long distance sensors.

A very good description of the chosen Sharp optical rangefinders. http://www.societyofrobots.com/sensors_sharpirrange.shtml

Sharp rangefinders are noisy, and need a 22uF capacitor placed across the power rail.

And this is a description of the Sonar Ultrasonic rangefinders. http://www.societyofrobots.com/sensors_sonar.shtml

Some of the Orangutan libraries are directly relevant: OrangutanAnalog - basis for reading the Sharp Optical Rangers

  1. Build voice box - bark, growl, yap, whine, etc.

This code at Arduino might be useful. http://www.arduino.cc/en/Tutorial/PlayMelody http://www.arduino.cc/playground/Code/MusicalAlgoFun

  1. Build area mapping.

Using the wavefront technique seems very relevant, from Society of Robots http://www.societyofrobots.com/programming_wavefront.shtml

Gradient technique is seen to be better than wavefront. http://en.wikipedia.org/wiki/Gradient

  1. Build aggressive object collision avoidance.

Some of the Orangutan libraries are directly relevant: OrangutanSPIMaster - can drive the interfaces with the WIFI device on Blackwidow. OrangutanSPIMaster - can drive the interfaces on the Ultrasonic Ranger.

See how behaviour based robotics applies to object avoidance. http://en.wikipedia.org/wiki/Behavior-based_robotics

Use the 6DOF Atomic Gyros & Acelerometer code as basis.

  1. Build aggression response.

Some of the Orangutan libraries are directly relevant: OrangutanSPIMaster - can drive the interfaces on the Acceleration & Yaw sensors. OrangutanSPIMaster - can drive the interfaces on the Ultrasonic Ranger.

  1. Build WiFi sensors & target mapping.

Some of the Orangutan libraries are directly relevant: OrangutanSPIMaster - can drive the interfaces with the WIFI device on Blackwidow.

A general website for location technique comparisons http://www.positioningtechniques.eu/lbs_technique_checker.asp

The RTLS from 802.11k is useful, as are the equations for solving based on iso-power intersections of two circles. http://mathworld.wolfram.com/Circle-CircleIntersection.html http://local.wasp.uwa.edu.au/~pbourke/geometry/2circle/ There is a C code example to be followed.

This navigation example using the A* algorithm. http://www.societyofrobots.com/programming_nav_a_star_demo.shtml http://www.policyalmanac.org/games/aStarTutorial.htm

Steering Behaviours http://www.red3d.com/cwr/steer/

  1. Build intelligence logic to enable end result.

Webbot Lib is a library that addresses most issues associated with building robots. http://webbot.org.uk/iPoint/30.page

Use the Seeker2 source where possible, from Society of Robots. Research into finite state machines required.

Also there is an Experimental Robot Platform code that is being provided ERP_WebbotLib that will be very relevant. http://www.societyofrobots.com/robot_ERP.shtml

RidgeSoft has a lot of tutorials http://www.ridgesoft.com

  1. Build Thermal sensors & target tracking.

Some of the Orangutan & Pololu libraries are directly relevant: OrangutanServos - can drive the PCM interfaces to the pan servo for Thermopile Sensor (option).

March 12, 2010
by feilipu
feilipu's Avatar

*** PIN OUTS DEFINED For http://asynclabs.com BlackWidow 1.0

PB0 WiFi Digital Input Interrupt 0

PB1 Motor A AIN1 PWM Output (changed from PB3 on pololu 3pi). Disable WiFi LED!

PB2 SPI Slave Select for WiFi

PB3 SPI MOSI for WiFi

PB4 SPI MISO for WiFi

PB5 SPI SCK for WiFi

PB6 CRYSTAL

PB7 CRYSTAL

PC0 LISY GIRO Z Axis Analogue Sensor to 3.3V

PC1 IR Analogue Distance Sensor GP2Y0A02YK0F (20cm-150cm) to ~2.8V

PC2 IR Analogue Distance Sensor GP2Y0A21YK0F (10-80cm) to ~2.8V

PC3 Piezo Speaker

PC4 I2C SDA for Ultrasonic Ranger SRF10 Addr 0xE0 & Thermopile Sensor Addr 0xD2

PC5 I2C SCL

PC6 RESET

PD0 Wheel Encoder Digital Input Interrupt 16

PD1 Wheel Encoder Digital Input Interrupt 17

PD2 Wheel Encoder Digital Input Interrupt 18

PD3 Motor A AIN2 PWM Output

PD4 Wheel Encoder Digital Input Interrupt 20

PD5 Motor B BIN1 PWM Output

PD6 Motor B BIN2 PWM Output

PD7 PIR Sensor Digital Input Interrupt 23

March 12, 2010
by feilipu
feilipu's Avatar

Small rework, should make PIR easier.

  • PB0 (ICP1) WiFi Digital Input Interrupt 0
  • PB1 (OC1A) Motor A AIN1 PWM Output (changed from PB3 on 3pi). Disable WiFi LED!
  • PB2 (SS & OC1B) SPI Slave Select for WiFi
  • PB3 (MOSI) SPI for WiFi
  • PB4 (MISO) SPI for WiFi
  • PB5 (SCK) SPI for WiFi
  • PB6 (XTAL1) CRYSTAL
  • PB7 (XTAL2) CRYSTAL

  • PC0 (ADC0) LISY GIRO Z Axis Analogue Sensor to 3.3V

  • PC1 (ADC1) IR Analogue Distance Sensor GP2Y0A02YK0F (20cm-150cm) to ~2.8V
  • PC2 (ADC2) IR Analogue Distance Sensor GP2Y0A21YK0F (10-80cm) to ~2.8V
  • PC3 (ADC3) Piezo Speaker
  • PC4 (ADC4) I2C SDA for Ultrasonic Ranger SRF10 Addr 0xE0 & Thermopile Addr 0xD2
  • PC5 (ADC5) I2C SCL
  • PC6 (RESET)

  • PD0 (RXD) Wheel Encoder Digital Input Interrupt 16

  • PD1 (TXD) Wheel Encoder Digital Input Interrupt 17
  • PD2 (INT0) PIR Sensor Digital Input Interrupt 18
  • PD3 (INT1) Motor A AIN2 PWM Output
  • PD4 (XCK) Wheel Encoder Digital Input Interrupt 20
  • PD5 (T1) Motor B BIN1 PWM Output
  • PD6 (AIN0) Motor B BIN2 PWM Output
  • PD7 (AIN1) Wheel Encoder Digital Input Interrupt 23
March 27, 2010
by johnh
johnh's Avatar

Just glancing through, haven't had time to check all of your products, but it looks like an interesting project. One thing you might want to look at is a Linux distro known as WeakNet Linux Assistant. WeakNet includes a tool that can use a WiFi card to look for a device based on hardware MAC address. I have no idea what the process would be to implement this on your hardware, but I thought that it might be interesting, if only to provide ideas.

Post a Reply

Please log in to post a reply.

Did you know that you can build a digital read out (DRO) for a lathe or milling machine? Learn more...