Engineer Builds a Compass That Finds Pizza | Hack Job | WIRED

WIRED · Intermediate ·📰 AI News & Updates ·5y ago

Key Takeaways

The video demonstrates the creation of a compass that points to the nearest pizza place using a Particle microcontroller module, GPS module, magnetometer, and Google's text search API. The project involves hardware and software design, prototyping, and testing, as well as custom code development and module communication.

Full Transcript

this is a compass it's just like any other compass it's got orienting lines a ruler a rotating bezel and a magnetized needle but do you know what the most frustrating thing is about a compass it only points north but what if there was a compass that could point to something way cooler like i don't know the nearest slice of pizza so that's my challenge wired has given me three weeks to figure out how to turn a regular compass into a compass that points to pizza it's beautiful if i say so myself oh this is so cool it's actually working to the pizza by the way i'm joe grand i'm a computer engineer hardware hacker and former technological juvenile delinquent i built my first circuit board when i was 10 years old and i just love doing this stuff successful so there's a few goals for this project the most important one is to actually build a system that no matter where i am in the world it's going to point me to the nearest pizza place the second goal is to take our mess of wires and components and refine that into something much smaller more like an actual compass that we can just walk around and use the third goal is to make this thing as simple as possible so you just push a button and you follow the leds there's two separate design aspects for this project the hardware and the software [Music] the core of the project is this little module made by particle it's a microcontroller module and a cellular network interface module in one this is going to control all the other peripherals in our design and also let us communicate to the internet over the cellular phone network to get the information that we need to point us in the right direction we have our antenna the next piece is our gps module gps is pretty common these days it exists in all sorts of different devices like in your cell phone which is probably how you're being tracked right now the next thing is a magnetometer this is a digital compass so it's going to measure the magnetic field of the earth and tell me my heading next we have our led indicators of course no electronic product would be complete without a way to power it so we have a small lithium ion battery oh i didn't put a button but whatever maybe i should get a button how can i forget about the button do i want laser missile or top secret i'm gonna go with top secret [Music] so this board here is called a breadboard it's basically a little board where you can plug components into it so it just makes it really easy that when you're prototyping you can take parts in and out as you need to to kind of get stuff working i have these individual components all plugged into the breadboard and wired up at least in an initial configuration i'm not exactly sure how things are going to go once i start writing the code but this at least is going to let me get started now i'm going to go take it over to my other desk and start working on the code but first hold on i gotta hack into the gibson move the satellites around and you're done so my plan now is to work on the code and try to get each of the individual components operating i basically have some sample code that i'm using from the open source community so code that other people have written to support different modules taking that kind of modifying it tweaking it for what i need and just making sure that i can communicate with each thing at a low level error that's usually not good oh all right we finally have some progress leds turn on let go of the button leds turn off so i have the led ring working i have the button working now i need to get the compass working and the gps working and then the cellular connectivity working so i can communicate to the internet over my microcontroller i am still working on some code to get the compass module working i have a little debug terminal over here too so i can send messages from my microcontroller to the screen so i can actually see like what state of the system are we in so right now it's just waiting for a button press so when i go and hit the button press the system should start doing some setup all right welcome to pizza compass the leds turn blue just so we know that we're in a different state when i let go of the button the calibration will stop let go of that and now we can see x y and z values in micro tesla these are basically just readings from the sensor of the magnetic field that it's reading so if we actually spin the unit around we can see those values change now those values don't really mean much to us right now but what we're going to do is along with our calibration values calculate the actual heading of this compass you know which direction is this compass facing taking boring numbers like that and turning it into something useful and then we're going to try to display that as an led on this ring code so just taking some baby steps here i added some code to take the compass information and convert it from the magnetic sensor data into an actual compass heading and we can see down in our little terminal window over here that right now it's about 50 degrees if i rotate my board in a circle that's going to change the heading i wish this was more exciting reminds me of the story when uh well i won't tell you that one so this is pretty cool i now took the heading that we were getting basically divided it by a 360 degree circle to figure out which of the 24 leds on our ring should be lit up as i rotate this board the led stays in the same position so it's maintaining its heading no matter which way we're pointing sort of like an actual compass compass code complete onto the gps i know that the hardware already communicates properly to this particle cloud service but what i haven't figured out yet is how i can send a query with our gps coordinates over the network to get the information back about the nearest pizza place here's what i'm thinking i'm going to push a button on the compass that's going to send my local coordinates over the cellular network to particle particle is going to take that send it as a search query to google with my coordinates and asking for the nearest pizza place google is going to respond with that information send that back to me i'm going to process it and that's going to point us to pizza hopefully because i'm hungry it's kind of funny because being a kind of paranoid old school hacker i tend to avoid google services as much as i can but in this case google just ended up having the best results that we need you know they offer their api to basically let developers and let engineers and let people use their technology and use their search engines without having to physically type stuff in they're kind of just contributing to this general collection of internet of things in this general collection of cloud-based intelligent computing so it's the google maps platform text search it's a certain service you can sign up for with google so i just logged into google sign up for the api all you basically are doing is passing in a query i put pizza of course you could change that to anything else you want because it's google and then the location so you'll pass in the gps coordinates that of course we've captured with our gps module and then the key which is your own private api key that ties this request to your particular account so of course pretty much all of this is gonna have to be blurred out but if i go and paste this into a web browser it's going to go to google query from google and get back in a json format all of the search results so this is basically given my location searching for pizza what's around me a lot of information is transferred behind the scenes that we never see over the internet is in formats like this which is kind of cool latitude and longitude that's what we're going to end up grabbing from this entire blob of information that's what we want to use so let's go ahead and press the button if we look on our screen we can actually see sending request so we are formulating a packet that we need to send over to the particle cloud and then particle sends it to google so it's ending with our coordinates along with some of the other information that it needs there's a whole kind of packet structure that we have to send over to google we already see data received so it went over the network to particle to google back to particle back to us we can see here gps coordinates and then the name of the pizza place which is sunny's pizza that's one of the few pizza places that are around my house now that we have that we can continue to take those coordinates feed it into the algorithm that has to figure out the point to point location and direction and all of that but the fact that we can send data and formulate the packet that we need and then get information back is pretty awesome i'm super excited about that [Music] a circuit board is really a physical manifestation of an electronic product it physically holds the components onto the board but then it also provides the electrical connectivity between all of the components [Music] designing circuit boards is really like creating art and it actually is called artwork when you create the circuit boards that's the technical term is is the circuit board artwork most of the time though circuit boards are inside of products they're not seen so they're really designed and manufactured to fit into an enclosure to be easily tested to make it easy to assemble they're not really worried about aesthetics and how it looks but that's something where a lot of the stuff that i work on i don't put it in a housing i have the circuitry exposed i want it to look not really like a circuit but more of a piece of the larger project so i don't want it to just look like a piece of electronics i spend a lot of time in the circuit board design tool which is not intended to work really with graphics at all to try to make products that look cool and it takes a lot of time takes a lot of tweaking and trial and error to bring in graphics and adjust them and kind of fit well with the actual required electrical connections but that's really to me is what's so satisfying about creating a board is you put in all this effort into essentially a piece of art and you can express yourself in different ways through that medium and get something back so it's a very kind of special sacred process to work on circuit boards so here's a rendering from the circuit board design tool this is the front side of the board i had added the artwork so now we have all these artistic elements we want it to look more like a compass so we have the ruler we have our compass rose down here this is all going to show up as uh immersion gold so this is gonna be gold-plated the gps is gonna go here the button's gonna go here the leds will go here the magnetometer right there in the middle and then the back side will have the other circuitry i thought that looks pretty close to an actual compass especially with the ruler on here and everything i'm super excited as far as production manufacturing of circuit boards there are hundreds of manufacturing facilities around the world that will manufacture your circuit boards you basically provide them with a bunch of design files called gerber plots which is kind of a text representation of your entire circuit board design so i'm going to have a professionally manufactured circuit board and then have it professionally assembled as well i might need to do some touch-up hand soldering but if everything goes well it's going to be manufactured and assembled by machine and then sent back to me the first step is the raw material selection then it's time for drilling the drilled panels are coated with a resist those panels are then taken to a laser plotter which burns an image into the resist film then those panels are placed into a special rinse that removes all of the laser burned portions leaving only the design that i specified for electroplating the boards are put into special pulse plating tanks the exposed copper and the drilled vias are going to be plated which gives us the copper connections the next step is to etch off the copper that was previously protected by the resist film that leaves only the copper traces on the top and bottom layers that i've designed the solder mask is the black coating that i've specified on my board they place the circuit board panels onto a screen printer similar to how a t-shirt is made the assembly process is a little less complicated but there's still a number of steps once the solder paste is applied the boards then go to the pick and place machine the pick and place machine takes all of the parts and places them exactly where they need to go on the circuit board they then go into a reflow oven it's sort of like a giant cookie machine the boards go in follows a very specific heating profile and it comes out at the end a freshly baked circuit board after the boards pass the 3d x-ray they go to aoi automated optical inspection this time the operator is looking at all the components making sure they are soldered down properly nothing sticking up just to get that final last step before the boards are cleaned and sent on their way for our board we need to go through an additional assembly step because the gps module can't go through the wash so it has to be hand soldered there's a pretty clear difference between the parts that i use for the prototype and the parts that i use for an actual production circuit board build the main difference there is for the prototype i was using little modules sort of development boards that are intended to make it easy to connect to a prototyping board like we did run wires to it test all the different features but i don't need all of this stuff around it what i'm using for the production build is just the actual component itself there are some additional components i need for it but i don't need that giant board with all the pins and everything so basically moving from modules that are designed for development into using the individual components intended to be mounted directly onto a circuit board i heard a knock on the door the package is here this is it right here and spare components on the bottom oh i am nervous so many layers it's like peeling an onion so far so good holy moly oh that looks so cool so the compass in the middle the leds along the side our button to start our quest and send the data over the internet our gps module our ruler in case we need to measure things here is the connector for the particle board some of the discrete components and all the traces are on the back side assembled pizza compass board is done we have three of them just in case something goes wrong with one or two but it looks amazing i can't believe how fast we got these things back we're good to go fingers crossed ready to give this a try [Music] it's been three weeks since i started the design and today is the final test let's go find some pizza let's power this thing up plug it in right so first thing we're going to see is the leds initializing so we can make sure they work now we're waiting for the connection to the particle network the green is looking for a gps fix so now we're in the next state which is that the compass is ready for calibration i'm going to hold the button down and all the lights will turn on so now we're in the calibration mode where we need to rotate the board in all of the different axes in order for the magnetometer to read all of the different values so we do it in the x and the y in the z so we push the button to exit calibration now we're in our rainbow color wheel this is just waiting for us to push the button to start our quest over to the pizza place sending the coordinates waiting for a response [Music] and now pointing the pizza so let's see where this takes us so looks like i have to go that way i just reached my first intersection and the compass is pointing as the crow flies so unless i want to walk through a whole bunch of backyards i need to follow the roads so it looks like i need to go right down here i can tell we're getting close because the compass starting to veer off of the straight and point more towards the left so i think this next block up here i'm going to turn left oh this is so cool it's actually working let's turn left now we see green light pointing straight ahead [Music] we made it to the pizza place the compass works let's eat oh thank you pizza i've been waiting three weeks for this pizza oh look at that so there you go that's the pizza compass yes it's a little bit cheesy yes there's other ways to reach the same conclusion uh but that's the beauty of engineering taking something that's in your head and turning it into reality my real reason for doing projects like this is to put them out in the world and see what people do with them the project is fully open source so you can look at the hardware design you can modify the code to do whatever you want this is just my interpretation of what a pizza compass can do you can refine it to do whatever you want maybe change the leds for different animations change the battery consumption to make it last longer or even have it point somewhere different the point is you can learn from it and do whatever you want with it this project wouldn't have been possible so quickly without the contributions of the open source community people who designed the software libraries people who worked on the hardware modules if i had to do all of that from scratch it would have taken me a few months of effort if not more let me know what you think about the project in the comments below what would you point it to

Original Description

Do you know what the most frustrating thing about a compass is? It ONLY points North. But what if a compass could point to something....more appetizing? WIRED has challenged maker Joe Grand to figure out how to make a compass that points to pizza, in just three weeks. Check out Joe Grand here: YouTube: https://www.youtube.com/c/JoeGrand Website: http://www.grandideastudio.com/ Twitter: https://twitter.com/joegrand Pizza Compass Project Page: http://www.grandideastudio.com/portfolio/pizza-compass Shoutout to Advanced Assembly and Royal Circuits for their incredible work and turnaround: https://aapcb.com/ https://www.royalcircuits.com/ Special thank you to PieVino: https://www.pievinopizza.com/ Sources from the coding community include: neopixel Pololu_LSM303 TinyGPS++ Still haven’t subscribed to WIRED on YouTube? ►► http://wrd.cm/15fP7B7 Listen to the Get WIRED podcast ►► https://link.chtbl.com/wired-ytc-desc Want more WIRED? Get the magazine ►► https://subscribe.wired.com/subscribe/splits/wired/WIR_YouTube?source=EDT_WIR_YouTube_0_Video_Description_ZZ Follow WIRED: Instagram ►►https://instagram.com/wired Twitter ►►http://www.twitter.com/wired Facebook ►►https://www.facebook.com/wired Get more incredible stories on science and tech with our daily newsletter: https://wrd.cm/DailyYT Also, check out the free WIRED channel on Roku, Apple TV, Amazon Fire TV, and Android TV. ABOUT WIRED WIRED is where tomorrow is realized. Through thought-provoking stories and videos, WIRED explores the future of business, innovation, and culture.
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from WIRED · WIRED · 6 of 60

1 Accent Expert Gives a Tour of North American Accents - (Part 3) | WIRED
Accent Expert Gives a Tour of North American Accents - (Part 3) | WIRED
WIRED
2 Every Spider-Man Suit From Marvel's Spider-Man: Miles Morales & Spider-Man Explained | WIRED
Every Spider-Man Suit From Marvel's Spider-Man: Miles Morales & Spider-Man Explained | WIRED
WIRED
3 Eric Andre Answers the Web's Most Searched Questions...Again | WIRED
Eric Andre Answers the Web's Most Searched Questions...Again | WIRED
WIRED
4 LILHUDDY Answers the Web's Most Searched Questions | WIRED
LILHUDDY Answers the Web's Most Searched Questions | WIRED
WIRED
5 Caleb McLaughlin Explores His Impact on the Internet | Data of Me | WIRED
Caleb McLaughlin Explores His Impact on the Internet | Data of Me | WIRED
WIRED
Engineer Builds a Compass That Finds Pizza | Hack Job | WIRED
Engineer Builds a Compass That Finds Pizza | Hack Job | WIRED
WIRED
7 Hacker Breaks Down Hacking Scenes From Movies & TV | WIRED
Hacker Breaks Down Hacking Scenes From Movies & TV | WIRED
WIRED
8 Polo G Answers the Web's Most Searched Questions | WIRED
Polo G Answers the Web's Most Searched Questions | WIRED
WIRED
9 The Simpsons’ Hank Azaria Answers the Web's Most Searched Questions | WIRED
The Simpsons’ Hank Azaria Answers the Web's Most Searched Questions | WIRED
WIRED
10 Zack Snyder Answers the Web's Most Searched Questions | WIRED
Zack Snyder Answers the Web's Most Searched Questions | WIRED
WIRED
11 TWICE Answer the Web's Most Searched Questions | WIRED
TWICE Answer the Web's Most Searched Questions | WIRED
WIRED
12 Former Air Force Pilot Breaks Down UFO Footage | WIRED
Former Air Force Pilot Breaks Down UFO Footage | WIRED
WIRED
13 The Lord of the Rings Expert Answers More Tolkien Questions From Twitter | Tech Support | WIRED
The Lord of the Rings Expert Answers More Tolkien Questions From Twitter | Tech Support | WIRED
WIRED
14 MONSTA X Answer the Web's Most Searched Questions | WIRED
MONSTA X Answer the Web's Most Searched Questions | WIRED
WIRED
15 Why Humans Can’t Lift as Much as Ants (And How We Could) | WIRED
Why Humans Can’t Lift as Much as Ants (And How We Could) | WIRED
WIRED
16 Siri, Alexa and Google Home Answer the Web's Most Searched Questions | WIRED
Siri, Alexa and Google Home Answer the Web's Most Searched Questions | WIRED
WIRED
17 Former FBI Agent Answers Body Language Questions From Twitter | Tech Support | WIRED
Former FBI Agent Answers Body Language Questions From Twitter | Tech Support | WIRED
WIRED
18 Former FBI Agent Breaks Down Body Language Pet Peeves | WIRED
Former FBI Agent Breaks Down Body Language Pet Peeves | WIRED
WIRED
19 Rich Brian and NIKI Answer the Web's Most Searched Questions | WIRED
Rich Brian and NIKI Answer the Web's Most Searched Questions | WIRED
WIRED
20 Spy Satellite Expert Explains How to Analyze Satellite Imagery | WIRED
Spy Satellite Expert Explains How to Analyze Satellite Imagery | WIRED
WIRED
21 Olympic Runner Allyson Felix Answers Track Questions From Twitter | Tech Support | WIRED
Olympic Runner Allyson Felix Answers Track Questions From Twitter | Tech Support | WIRED
WIRED
22 The Physics Behind Gymnastics, Explained (Vaults, Tumbles and Flips) | WIRED
The Physics Behind Gymnastics, Explained (Vaults, Tumbles and Flips) | WIRED
WIRED
23 M. Night Shyamalan Answers the Web's Most Searched Questions | WIRED
M. Night Shyamalan Answers the Web's Most Searched Questions | WIRED
WIRED
24 Henry Golding Answers the Web's Most Searched Questions | WIRED
Henry Golding Answers the Web's Most Searched Questions | WIRED
WIRED
25 Chainsaw Artist Carves a Throne From a Giant Tree | Good Form | WIRED
Chainsaw Artist Carves a Throne From a Giant Tree | Good Form | WIRED
WIRED
26 Emily Blunt & Dwayne Johnson Answer The Web's Most Searched Questions | WIRED
Emily Blunt & Dwayne Johnson Answer The Web's Most Searched Questions | WIRED
WIRED
27 Former FBI Agent Explains How to Negotiate | WIRED
Former FBI Agent Explains How to Negotiate | WIRED
WIRED
28 BTS Answer the Web's Most Searched Questions | WIRED
BTS Answer the Web's Most Searched Questions | WIRED
WIRED
29 John Cena & Pete Davidson Test Workout Gadgets | WIRED
John Cena & Pete Davidson Test Workout Gadgets | WIRED
WIRED
30 Jennifer Hudson Answers the Web's Most Searched Questions | WIRED
Jennifer Hudson Answers the Web's Most Searched Questions | WIRED
WIRED
31 Computer Scientist Explains Machine Learning in 5 Levels of Difficulty | WIRED
Computer Scientist Explains Machine Learning in 5 Levels of Difficulty | WIRED
WIRED
32 Bella Thorne Tests Beauty & Fashion Gadgets | WIRED
Bella Thorne Tests Beauty & Fashion Gadgets | WIRED
WIRED
33 Rita Ora Answers the Web's Most Searched Questions | WIRED
Rita Ora Answers the Web's Most Searched Questions | WIRED
WIRED
34 Beekeeper Answers Bee Questions From Twitter | Tech Support | WIRED
Beekeeper Answers Bee Questions From Twitter | Tech Support | WIRED
WIRED
35 Dove Cameron Answers MORE of the Web's Most Searched Questions | WIRED
Dove Cameron Answers MORE of the Web's Most Searched Questions | WIRED
WIRED
36 Daniel Radcliffe Answers MORE of the Web's Most Searched Questions | WIRED
Daniel Radcliffe Answers MORE of the Web's Most Searched Questions | WIRED
WIRED
37 Body Language Expert Breaks Down His Own Body Language | WIRED
Body Language Expert Breaks Down His Own Body Language | WIRED
WIRED
38 Every Ape in Planet of the Apes Explained | WIRED
Every Ape in Planet of the Apes Explained | WIRED
WIRED
39 Dear Evan Hansen Cast Answer The Web's Most Searched Questions | WIRED
Dear Evan Hansen Cast Answer The Web's Most Searched Questions | WIRED
WIRED
40 On My Block Cast Answer the Web's Most Searched Questions | WIRED
On My Block Cast Answer the Web's Most Searched Questions | WIRED
WIRED
41 Every Aston Martin in James Bond Explained | WIRED
Every Aston Martin in James Bond Explained | WIRED
WIRED
42 William Shatner Answers the Web's Most Searched Questions | WIRED
William Shatner Answers the Web's Most Searched Questions | WIRED
WIRED
43 Body Language Expert Explains How to Show Confidence | WIRED
Body Language Expert Explains How to Show Confidence | WIRED
WIRED
44 Madison Beer Answers the Web's Most Searched Questions | WIRED
Madison Beer Answers the Web's Most Searched Questions | WIRED
WIRED
45 B.I Answers the Web's Most Searched Questions | WIRED
B.I Answers the Web's Most Searched Questions | WIRED
WIRED
46 Amanda Seyfried & Finn Wittrock Answer the Web's Most Searched Questions | WIRED
Amanda Seyfried & Finn Wittrock Answer the Web's Most Searched Questions | WIRED
WIRED
47 Marshmello Answers the Web's Most Searched Questions | WIRED
Marshmello Answers the Web's Most Searched Questions | WIRED
WIRED
48 Nina Dobrev Answers the Web's Most Searched Questions | WIRED
Nina Dobrev Answers the Web's Most Searched Questions | WIRED
WIRED
49 Kit Harington Answers the Web's Most Searched Questions | WIRED
Kit Harington Answers the Web's Most Searched Questions | WIRED
WIRED
50 Every Prototype that Led to a Realistic Prosthetic Arm | WIRED
Every Prototype that Led to a Realistic Prosthetic Arm | WIRED
WIRED
51 Why the Toilet Needs an Upgrade | WIRED
Why the Toilet Needs an Upgrade | WIRED
WIRED
52 How PlayStation 5 Was Built (feat. Mark Cerny) | WIRED
How PlayStation 5 Was Built (feat. Mark Cerny) | WIRED
WIRED
53 YouTube Search Team Answers the Web's Most Searched Questions | WIRED
YouTube Search Team Answers the Web's Most Searched Questions | WIRED
WIRED
54 How Stop-Motion Movies Are Animated at Aardman | WIRED
How Stop-Motion Movies Are Animated at Aardman | WIRED
WIRED
55 Testing Kitchen Gadgets with Matty Matheson & Benny Blanco | WIRED
Testing Kitchen Gadgets with Matty Matheson & Benny Blanco | WIRED
WIRED
56 Shang-Chi's Simu Liu Answers the Web's Most Searched Questions | WIRED
Shang-Chi's Simu Liu Answers the Web's Most Searched Questions | WIRED
WIRED
57 Are We Living In The Matrix? | WIRED
Are We Living In The Matrix? | WIRED
WIRED
58 Every Stop a Shipping Container Makes from China to Chicago | WIRED
Every Stop a Shipping Container Makes from China to Chicago | WIRED
WIRED
59 Baker Answers Baking Questions from Twitter | Tech Support | WIRED
Baker Answers Baking Questions from Twitter | Tech Support | WIRED
WIRED
60 Eric Nam Answers the Web's Most Searched Questions | WIRED
Eric Nam Answers the Web's Most Searched Questions | WIRED
WIRED

This video teaches you how to create a custom compass device that points to the nearest pizza place using a combination of hardware and software components. The project involves designing and building a circuit board, writing custom code, and integrating GPS and magnetometer modules.

Key Takeaways
  1. Build a system that points to the nearest pizza place
  2. Refine the hardware and software design to make it smaller and more user-friendly
  3. Make the system as simple as possible to use
  4. Write custom code for module communication and functionality
  5. Test and debug the system to achieve initial success with LED and button functionality
  6. Use a compass module to read magnetic field values in microtesla
  7. Calculate the actual heading of the compass by taking boring numbers and turning them into something useful
  8. Display the heading as an LED on a ring code
  9. Use the GPS module to capture coordinates and send a query to Google's text search API to find the nearest pizza place
💡 The key insight from this video is that with the right combination of hardware and software components, you can create a custom device that can point to a specific location, such as the nearest pizza place.

Related Reads

Up next
In the case of AI, leadership can create urgency but it simply cannot force adoption from a room
Steno
Watch →