Wireless RC Robot with Arduino and XBees

We recently added the XBee Series 3 to the catalog. What's great about Series 3 is that you can configure it to be compatible with the legacy XBee firmware! As a result, we updated our Exploring XBees and XCTU tutorial.

Exploring XBees and XCTU

March 12, 2015

How to set up an XBee using your computer, the X-CTU software, and an XBee Explorer interface board.

Looking for more XBee fun? The SparkFun RedBot kit is a great way to get your feet wet in the world of robotics. The last experiment of the kit goes over controlling the RedBot using an XBee tethered to your computer and a serial terminal. As a bonus, we recently released a new tutorial that explores different Arduino Serial objects used for the ATmega328P and the SAMD21 microcontrollers. In the process, we will control the RedBot from the wireless joystick kit using a pair of XBee Series 3s configured with the legacy XBee Series 1 firmware. For more information, check out the Wireless RC Robot with Arduino and XBees tutorial (and note you'll need to solder the wireless joystick controller's components to the board)!

New!

Wireless RC Robot with Arduino and XBees

March 12, 2019

In this tutorial, we will expand on the SIK for RedBot to control the robot wirelessly with XBee radios! We'll explore a different microcontroller and wirelessly control the RedBot at a distance.

comments | comment feed

Read more »

A brilliant clock made out of 128 LED-lit ping pong balls

Ping pong balls have long been known as excellent LED diffusers, but few have taken this technique as far as Thomas Jensma. His colorful clock features 128 LEDs, arranged in an alternating pattern, and housed in a stretched-out hexagonal wood frame. 

Everything is controlled by an Arduino Nano, along with an RTC module for accurate timekeeping. Demos of the clock can be seen below, cycling through numbers and testing out the FastLED library.

Code for the build is available in Jensma’s write-up. This also includes tips on using table tennis balls as diffusers, as well as how to create an orderly array out of these spheres—useful in a wide range of projects.

Read more »

Adafruit PCB Manufacturing Line

 

The Adafruit PCB Manufacturing Line is quite impressive. Ladyada (Limore Fried) goes through the entire process start to finish describing what each piece in the line does. Questions from the MIT students at the end are interesting also.

“Ladyada is the hacker @ Adafruit, founded in 2005 by MIT hacker & engineer Limor “Ladyada” Fried. Her goal was to create the best place online for learning electronics and making the best designed products for makers of all ages and skill levels. Adafruit has grown to over 100+ employees in the heart of NYC with a 50,000+ sq ft. factory. Adafruit has expanded offerings to include tools, equipment and electronics that Limor personally selects, tests and approves before going in to the Adafruit store.”

Read more »

Automatic Light Switch on the Internet of Things

Backstory

I just moved into my first new home and found the lighting situation in my garden-level office to be absolutely horrendous fluorescent tubes. For the time being I'm using two very large lamps, but I'm bad at remembering to turn them off when I leave, and getting across the room in the dark when I arrive is a dangerous affair. I decided to put my things on the Internet of Things by designing an automatic light switch using the SparkFun ESP8266 Thing Dev, SparkFun Quad Relay, and an infrared LED/receiver pair as a tripwire to turn the lights on and off. You can find all the parts I used for this project below.

Resistor Kit - 1/4W (500 total)

added to your cart!

Resistor Kit - 1/4W (500 total)

In stock COM-10969

Resistors are a good thing, in fact, they're actually crucial in a lot of circuit designs. The only problem seems to be that …

$7.95
153
SparkFun Qwiic Quad Relay

added to your cart!

SparkFun Qwiic Quad Relay

33 available COM-15102

The SparkFun Qwiic Quad Relay is a unique power accessory board, used for switching 4 high powered devices from your Arduino …

$29.95
SparkFun ESP8266 Thing - Dev Board

added to your cart!

SparkFun ESP8266 Thing - Dev Board

In stock WRL-13711

The SparkFun ESP8266 Thing Dev Board is a development board that has been solely designed around the ESP8266, with an integra…

$16.95
69
Jumper Wires - Connected 6" (M/M, 20 pack)

added to your cart!

Jumper Wires - Connected 6" (M/M, 20 pack)

In stock PRT-12795

These are 6" long jumper wires with male connectors on both ends. Use these to jumper from any female header on any board, to…

$1.95
2
IR Receiver Diode - TSOP38238

added to your cart!

IR Receiver Diode - TSOP38238

In stock SEN-10266

Use this simple IR receiver for infrared remote control of your next project. With low power consumption and an easy to use p…

$1.95
Transistor - NPN, 50V 800mA (BC337)

added to your cart!

Transistor - NPN, 50V 800mA (BC337)

In stock COM-13689

This is the BC337, an NPN silicon BJT (Bipolar Junction Transistor). This little transistor can help in your project by being…

$0.50
LED - Infrared 950nm

added to your cart!

LED - Infrared 950nm

In stock COM-09349

This is a very simple, clear infrared LED. These devices operate between 940-950nm and work well for generic IR systems inclu…

$0.95
2
Note!If you're interested in a hardware-focused tutorial on how to set up a 38kHz IR signal using a 555 timer, check out the Boss Alarm Tutorial.

Infrared

The largest hurdle to this project was creating a 38kHz infrared signal that would act as an invisible tripwire to activate the lamps. The next hurdle was creating a second tripwire to act in conjunction with the first to accurately track people entering and exiting the room. Before we dive into the coding aspect of this project, first you must understand a smidge about infrared. Infrared is EVERYWHERE! Just outside of the visible spectrum, infrared is given off by our body in the form of heat, the sun blasts IR from space all the time and, not to be outdone, other stars share their IR with us as well. Because of this, the infrared tripwire must be modulated to be recognized by the IR receiver.

To create this signal I wanted to start from the ground up to get a better understanding of microcontroller timings. Generating a 38kHz signal from a SparkFun ESP8266 Thing operating at 32MHz will require some delays, but for how long? What will be the duty cycle of this signal, if any? To start I did some simple math:

Frequency of the SparkFun ESP8266 thing: 32MHz
Frequency of the IR signal: 38kHz
Number of cycles in one period of the IR signal (32MHz/38kHz): ~824.105
Period of one clock cycle for the ESP8266 Thing (time = 1/frequency): 31.25ns (wowzers)
Multiply the number of clock cycles to delay, by the length of the clock cycle: ~26.3us.
Final Result: ~26.3us

Logic Analyzer

Alright that's good enough for a starting point. If I did not have a logic analyzer at this point then I wouldn't be able to fine tune the signal to discover some other unknown time hang ups. I took the final result and wrote the IR LED high for half the calculated delay time using the delayMicroseconds() function (13us) and low for the other half (another 13us). Analyzing the signal showed that the signal was too slow, but why? After some investigation I found that writing the pin high takes some time to complete, which is not really something I've had to take into consideration before. I mean of course it does, but this is exactly the kind of stuff that is so great to come across when doing a project, because this is how I learn something new.

The time to write a pin high on an ESP8266 is approximately ~1.5us. Reducing the delay to about 23us gave just enough delay to generate a 37.89MHz wave which is enough for my purposes. Implementing the signal wasn't as successful. Looking at the datasheet for the IR receiver I discovered that blasting it with a IR signal continuously only forces the receiver to turn off signal capture for a time.

I searched our website for some help and came across Nate's tutorial on rebuilding the Lumitune, which really brought the whole thing together. If you look at the tutorial, he provides code for this large project that revolves around blocking an IR signal to play a piano key. In his code he simply pulsed the IR LED for a short burst and immediately read thereafter to see if it had been read. He delays for one millisecond between these bursts to keep from overloading the IR receiver. Of course! Sometimes you go down the rabbit hole and have a hard time getting perspective on your project. This is exactly what I needed to find. I set up the first and second IR transmitter/receiver pair and had two working tripwires. I futzed with the duty cycle to see how it affected the receiver, but found that 50 percent was sufficient.

This is screen shot of the logica analyzer display a 38kHz wave.
A screenshot from the logic analyzer of both the IR signal and just above, the IR receiver going low.

The Code

To have this work correctly I mentioned that my goal was to have two IR tripwires working together to determine whether a person was entering the room. With two I can determine whether a person is coming or going from the room, because it informs me of the direction they're walking.

Direction is vital because I can keep track of the number of people entering or exiting a room. By keeping track of the number of people in the room, I can prevent the lights from turning off whenever any one person departs the room and instead only when the room is empty. That's an important distinction and a common use case for my automatic light switch. Of course this is not a perfect system; I can imagine an instance where two separate people, one leaving and one entering, trigger both IR tripwires simultaneously. I can imagine a line of Redcoats walking down my hallway shoulder to shoulder, and my setup only senses one person when there are actually three in a line.

For all the edge use cases I'm simply going to put a button near the entrance to turn off the lights, and because we're on the internet, I'll be able to turn the lights on and off with my phone as well. To implement this well, I want the second IR tripwire to trigger after the first in a specific window of time so that I can accurately determine direction. Is there something else I should be considering? Let me know below.

The code for setting up two SparkFun EP8266's was not difficult. Our hookup guide shows how to set up a simple server and the client example code provided by Espresif was all I needed to get communication between the two working. Looking toward, the future I want the web page to have a better indicator for the lights. If you're interested in the code for your own project or are feeling curious, I've linked all the code below.

Infrared Circuit

Belolw is the circuit for the infrared tripwires. One thing to note is that the IR LED can use up to 50mA of current, which is more than the pin on the ESP8266 can provide. I use a NPN transistors with 68 Ohm resistors to provide the proper current. I actually breadboarded the circuit on two seperate breadboards so I could separate them as much as possible. However, the IR LEDs still managed to trigger the wrong receivers so I used aluminum foil to create a cone around each LED.

alt text

The ESP8266 controlling the SparkFun Qwiic Quad Relay was hooked up to the I2C pins. Check out the hookup guide for the Quad Relay if you want to know more. That's all, folks! In the GIF below I show a single lamp being turned with the specific order using the "direction" logic talked about in the code above, followed by the lights turning off by going in the opposite "direction."

This gif shows the IR leds getting covered in a particular order to turn on the lamp and then in the opposite order to turn off the lamp.
Notice the Aluminum cones?

The Physical Housing

The design for the physical housing of the project will have to occur sometime after this post. As of right now it's just a hodge podge of wires. My plan is to place the IR LED and receiver pairs some distance apart in the hallway. I'll probably laser cut small boxes to house the hardware with a small hole to direct the LED and alternatively, a small hole to house the receiver.

Looking to the future

As I was working on the write up for this project it occurred to me that if two people were walking close together that the logic of the code would not work. The first tripwire will be off until the first person either triggers the second or the window of time to trip the second ends. If two people are close together then a person could slip in without being sensed! I think instead it would be smarter to create a "stack" of entrances and exits, where each tripped tripwire has an associated time stamp. I can then compare tripped tripwires and their timestamps and make decisions based on the time between them. Let me know if you guys have any suggestions in the comments below!

comments | comment feed

Read more »

Food Robots

 

We have seen some food robots before. Looks like we might be on the verge where the robots are going to be used for what they are good for such as show in the video where the robot spreads pizza sauce perfectly or can finally pick apples as good as a human. Just as in any industry when simple tasks such as flipping a burger is automated some of these jobs will be replaced. However fewer high tech jobs will replace the simple jobs since the robotic systems will now need to be installed, repaired and monitored. How long will it be before gas stations and fast food restaurant have no onsite employees. I think it could be soon!

 

 

Read more »

Official Arduino Day in Milan: Schedule and Streaming

Arduino Day is quickly approaching and we are blown away by the amazing support of the Arduino community, with over 650 events in more than 100 countries scheduled for March 16th.

As recently announced, the Official Arduino Day (register here) — directly organized by the Arduino team — will be held in Milan at the Milano Luiss Hub for Makers and Students, in collaboration with Manifattura Milano Camp.

The agenda of the official event includes an exhibition of Arduino projects, free kids activities, several keynotes by Arduino team members and, last but not least, an ‘Ask Me Anything’ with Massimo Banzi. The talks and the AMA will be live streamed via Arduino’s homepage, YouTube, and Facebook.

Here’s a look at the Official Arduino Day’s program:

11.00 AM (CET): Doors open and exhibition of Arduino projects, in collaboration with WeMake

2:30 – 5:30 PM (CET): EDU activities for children ages 5 to 15

1:45 – 3:15 PM (CET): Talks by local makers, in collaboration with WeMake (in Italian)

3:30 – 5:30 PM (CET): Keynotes by the Arduino team. These sessions will be streamed on Arduino’s homepage, YouTube, and Facebook.

3:30 – 3:35: Welcome by Massimo Banzi and Fabio Violante

3:35 – 3:50: The State of Arduino with Massimo Banzi and Fabio Violante

3:50 – 4:15: Winners of the Arduino Day Community Challenge

4:15 – 4:30: Arduino and the open-source community

4:30 – 5:00: Arduino for IoT with Luca Cipriani and Gianluca Varisco

5:00 – 5:15: Arduino Education with Nerea de la Riva Iriepa

5:15 – 5:30: Closing remarks

6:00 – 7:00 PM (CET): Ask Me Anything with Massimo Banzi

The AMA will also be streamed on the Arduino homepage, YouTube and Facebook. Have a question? Please register on the Arduino Forum and submit it by 6:45 PM (CET) at this link.

We look forward to celebrating Arduino Day with everyone!  In the meantime, don’t forget to share your events on social media using the hashtag #ArduinoD19.

Mancano poche ore ad Arduino Day, e siamo grati ed emozionati per l’incredibile supporto della nostra Community, che organizzerà nella giornata del 16 Marzo 2019 oltre 650 eventi in oltre 100 nazioni.

Come annunciato di recente, Official Arduino Day, ovvero l’evento direttamente organizzato dal team Arduino (registrazione qui) si terrà a Milano presso Milano Luiss Hub for Maker and Students (Via Massimo D’Azeglio, 3 – zona Porta Garibaldi), in collaborazione con Manifattura Milano Camp.

L’agenda dell’evento ufficiale include una mostra di progetti Arduino, delle attività edu per bambini/e teenager dai 5 ai 15 anni, un programma di talk con il team Arduino e, infine, una sessione di Ask Me Anything con Massimo Banzi. Le talk e l’AMA saranno trasmessi in streaming sull’homepage di Arduino e sui canali Youtube e Facebook .

Ecco il programma di Official Arduino Day a Milano:

11.00 AM: Open Day e mostra di progetti Arduino, in collaborazione con WeMake

1.45 – 3.15 PM: Community Talk a cura di maker locali, in collaborazione con WeMake

2.30 – 5.30 PM: Attività educative per bambine/i e teenager. Le attività sono gratuire e continuative, non serve prenotazione.

  • 5-8 anni: Laboratorio di pasta modellabile conduttiva Anche i più piccoli possono giocare con l’elettricità! Con la pasta modellabile si può dare spazio alla manualità e alla creatività, con (in più) la magia dei led!
  • 8-12 anni: Laboratorio di tinkering “Voglio Fare l’Inventore” Oggi tutti possono fare gli inventori! Flussi di energia, luci, suoni e movimenti non sono mai stati così facili da realizzare. Programmando con i sensori e attuatori, si possono costruire un’elica, un semaforo e addirittura un braccio robotico.
  • 12-15 anni: Laboratorio di robotica “mBot and basic robotics” I robot sono tutti intorno a noi, non solo umanoidi ma anche automobili ed elettrodomestici! Con un’ app, cacciaviti e un pizzico d’ingegno, è possibile imparare le prime mosse per dargli vita e controllarli!

3.30 – 5.30 PM: Talk con Massimo Banzi e Arduino team. Le talk saranno disponibili via streaming sui canali social Arduino.

3.30 – 3.35: Welcome con Massimo Banzi e Fabio Violante

3.35 – 3.50: The State of Arduino con Massimo Banzi e Fabio Violante

3.50 – 4.15: Arduino Day Community Challenge: Winners

4.15 – 4.30: Arduino and the open-source community

4.30 – 5.00: Arduino for IoT con Luca Cipriani e Gianluca Varisco

5.00 – 5.15: Arduino Education con Nerea de la Riva Iriepa

5.15 – 5.30: Chiusura

6.00 – 7.00 PM: Ask Me Anything con Massimo Banzi

Anche l’AMA (Ask me anything) sarà trasmesso in streaming sulla homepage di Arduino e sui canali Youtube e Facebook. Vuoi fare una domanda? Per favore, registrati sull’Arduino Forum e invia la tua domanda entro le 6.45 cliccando qui.

Non vediamo l’ora di festeggiare Arduino Day, nel frattempo non dimenticarti di condividere  il tuo evento sui social con l’hashtag #ArduinoD19.

Read more »

Making of a New Nixie Tube


A Nixie Tube is an old piece of technology, Dalibor Farný has resurrected the old technology by working through the techniques to build new tubes by hand. The video shows the tedious process of the low volume creation of them. Lots of complex mechanical steps are needed from spot welding to glass blowing is needed.

“The nixie tube is a vintage display device which had been used until 70s when it was replaced with LED displays. The complex knowledge of manufacture of nixie tubes literally died with tube factory’s engineers, glassblowers and machine operators.
I discovered nixie tubes in 2011 and since then, I’ve devoted all my time to studies of nixie tubes and its manufacturing processes. After years of intensive work, with help of many people, I eventually succeeded and have revived the knowledge and equipment for production of nixie tubes.”

Read more »

Remote debugging with USB based JTAG/SWD debug probes

ip-based-debugging-with-usb-debug-probe

Erich Styger wrote an article on how to turn a USB debug probe into a IP-based debug solution:

For some projects it is not possible to have the device under debug available on my desk: the board might be in another room, on another site or in a place where physical access is not possible or even dangerous. In that case an IP-based debug probe (see Debugging ARM Cores with IP based Debug Probes and Eclipse) is very useful: as long as I can access its IP address, that works fine. It is an excellent solution even if the board is moving or rotating: hook it up to a WLAN access point and I still can use it as it would be on my desk.

More details on MCU on Eclipse homepage.

Read more »

Water Meter Cloud Monitoring Interface

 

 

In some areas water meters have methods of connecting external monitoring equipment to determine water usage over time. This is normally done by a switch that pulses after a certain amount of water consumption. This was the case for sfrwmaker. He has a water meter that has an internal reed switch which closes once per revolution of the last metering wheel of his water meter. He has created a Water Meter Cloud Monitoring Interface which uses atmega328p-pu microcontroller and an esp8266 controller. The system sends data over wifi to the Blynk cloud service to allow the data to easily be stored and monitored over time.

“The esp8266 controller is not very power efficient and cannot run on the batteries for long time. And we would like to use it as web server any time, so it must be powered by the external power supply. It is not good idea to connect the water meter directly to the esp8266 controller because usually the water meters are installed in the dark, tiny space without any access to the external power outlet and WiFi access.”

 

 

 

Read more »

John Park’s Workshop — LIVE! 3/14/19 @adafruit @johnedgarpark #adafruit

JOHN PARK’S WORKSHOP — LIVE! Coming up at 4pm ET / 1pm PT this Thursday! LIVE TEXT CHAT IS HERE in the Adafruit Discord chat!

Plus, MakeCode Minute, Product of the Week, Tools & Techniques, and more.

The live video will be on Youtube LIVE, Twitch, Periscope (Twitter) and Facebook.

Join maker John Park in his workshop each week as he builds, demos, hacks, and mods projects live on air! “John Park’s Workshop — LIVE” is the place to see creative projects come to life, as John uses a wide variety of tools and techniques to make everything from mystery boxes to pinball controllers to drink robots, using digital fabrication, hand and power tools, microcontrollers, and more. Come on into the chat to participate in the fun! Every Thursday @ 4pm ET/1pm PT!

Read more »