title title title title

PQ Robotics Club

SEEK Robotics Meetings

    Below are the meeting summaries:

Next Meeting 21 Jul: NodeBots  The meeting was held at the Univ of Phoenix Learning Center in San Marcos (300 Rancheros Drive). I discussed the use of JavaScript in robotics and the IoT. With the advent of Node.js and the ability to communicate with microcontroller boards (via node-serialport) the robotics world is now exposed to being programmed with JavaScript. The number of Makers using Node.js in combination of Johnny-Five, which is the API that bridges Node and several microprocessor board's I/O, is growing each day. In fact, the International NodeBot Day is 30 July of this year. Sad thing is San Diego is not represented. I hope local Makers will become more interested and start building NodeBots to show off next year. For the Arduino processors, you just have to load the Firmata sketch onto the board. The Johnny-Five framework uses Firmata to reach the general purpose I/O. Johnny-Five works with Node as a JavaScript client and completes the interface. You need a host computer running an OS that can support Node.js. That can be a normal computer like a laptop or something like the Raspberry-Pi. To fully utilize the NodeBot concept and be autonomous, the serial interface should be WiFi. The host can then use Terminal to run the program and to interact asynchronously to change things on the fly.

Using Node.js for IoT is nicely implemented using the MQTT protocol, which is hosted by a Broke app like Mosquitto. Node's npm app can install Mosquitto directly from you terminal. What is going on with MQTT is like a central location being a client and server that similar to a post office with boxes to place messages. A client will subscribe to a topic. A topic is like one of the boxes in the post office. A subscriber is can use this message and do something with it like a server. Once this messaging system is setup, a GUI interface can be set up to use a browser to display buttons to sent messages and sensor elements to display messages coming from a client like a temperature sensor, etc. I demo-ed a app called Node_Red that use drag-and-drop modules that can be opened to set the parameters like what topics to subscribe to or what topic data is going to be received on. Since a browser is used to design and display the GUI controls and displays and it all is run over a WiFi connect via the Internet, you can control devices and read sensors on a smart phone.


The January 21, 2016 Larry Kavounas presented the point of view that programming for a client or business contract involves a little more detailed process than programming as a hobbyist.

When you have a client, the project has to be spec'd to avoid any discrepencies and state in writing the limits of the project. This is the only way to cost out the project and match features that could expand or be missing. All parties need to be represented in a fair way. Larry made the point that once the job is underway, you have to be thorough and test all aspects of the project to avoid errors or poor performance that will cost your reputation as well as rework costs. This results in detailed documentation as you go to give you leverage for debugging and identification of where you met the specification. Larry used a live demo of an example project of a garage parking device (figure at the left) to aid in stopping at a designated location with plenty of warning as a car approaches the selected location. See the slides by clicking here.

Larry's guide to programming habits include extensive comments and a conservative approach so that most anyone could be led through the code and it be clear how it operates. Modulerize code for clarity and effecient use of code. Show intermediant results. Stick to your coding experience and outsource to experts for areas you are not confident with.

Later Larry talked to us about patents. Your expectations depend on your passion, money available, and time to work up all the details to file a successful patent. A patent attorney's advice is essential to stay on track and be in complience with the law. The central depository for patent information is the governement site that can be found at the US Patent Office website.

Click here for Larry's slides on patent info.

Here is the program example:

Our January 7th session will the fifth one in the series. We will get into the details of using shift registers and how to use the 555 timer. These are hardware tips that are used in a lot of designs to off-load tasks from your processor. In fact, these tips can make your projects much more efficient and reduce the number on control pins from the Arduino. In the meantime, click here to view the slides.

Here some reference files:

The December 10, 2015 looked at some oddities starting with demo-ing a code-to-voice board that can be integrated into your projects that need to communicate with the user aurally. I originally used the Emic2 board to provide voice over a telephone line to give the caller instructions to push the appropriate buttons to turn on power to various things using just the touch tone buttons on a phone. Since all the software is handled on the board, all the programmer has to do is supply special ASCII characters to change speaking voices, change volume, or tempo - those things are only needed to be set once and some of this is just as well left to the default. So in affect, you type in your text into print statements attached to your instance name of the Emic2 Class and hook up a speaker. If you need volume, you'll have to add an audio amp.

I demo'd a PIR sensor and we ran through the code. In this case, when motion was detected, the Arduino played a song. We looked at quadrature encoders. This demo included a serial interface to a program running on Processing to display a radial line from the center of a black screen that rotated CW or CCW with the encoder movements. The PIR code demo'd how Arduino can be programmed to play a tune and the encoder code illustrated the use of Arduino interrupts, both are great techniques to add to a project.

Another fun board to use in a project is one that has a MSGEQ7 chip, which is a 7-band audio equalizer. The output is a shifting DC level in sync with the amplitude of the audio in each of the bands in succession. This can be used with a PWM channel on the Arduino to change the energy seen by a FET, which is capable of delivering a lot of current to a lighting system (LED strings, etc.) The one I demo'd had 3 channels, one for red, blue, and green. The lower band was ignored, the next two where tired together as well as the remaining bands to have 2-bands per red, blue, and green. You could, of course, create a channel for each of the seven bands. The software is particularly clever in that it adjusted the range of the PWM channels to center up on loudest to softest to maximize the flicker effect of each of the colors without over driving the audio input.

Next was an introduction to shift registers, mainly the 74HC595 chip. The next session will go into more depth of how to use this chip and it's brother in crime, the 74HC165.

Last but not least we hacked a stepper motor driven sled that used interrupts to reverse motion at one end of the path and an IR sensor to reverse the motion at the other end. Lots of Arduino tricks here and we get introduced to stepper motors and the Adafruit motor driver board, which by the way, uses a 74HC595 to provide the driver chips with their command signals. We didn't have time to get into the 555 timer. We'll do that after the holidays. Click here to see the slides.

On December 3, 2015, the Arduino pack got together to work on the Shield-Bot, but it turned into the session I planned to do for 10 December. Oh well, it was fun. I got a little deep into the electronics of how logic gates play a major roll in creating what we now call a computer. Without these little gates, none of the computer world would exist. They are also useful to the hobbyist to off-load your processor, do stand-alone designs that don't need a processor, or to hard-code for security reasons. (Zumo bots shown in the picture)

We went over how to hookup a LCD display, I2C and the SPI serial bus interfaces, and demo'd driving motors via a PS3 controller using BlueTooth. We finished up with a demo of using a stepper motor to move a sled back and forth between a IR distance sensor and a optical interrupter at the other end. This provide a good set up to demo the use of an interrupt sequence in the Arduino sketch. The motor driver board I used has a 74HC595 shift register on it that rapidly refreshes inputs to the actual H-bridge (two complete H-bridges on two separate chips) such that suppling a PWM to the switch regulates the speed of the attached motor and as the same time maintains direction bits. This is a clever way to issue data in a serial fashion and use it as a parallel output to the motor control inputs. We will be doing much more with shift registers in future discussions.

Here's the slides used for the discussion. Click here.

On November 19, 2015, John Wolf continued the tech sessions with the Intermediate Arduino session. The PPT slides for the meeting can be seen by clicking here. The objectives of this session was to explain C++ Classes and how they form the basis for third party libraries used with Arduino. It's easy just to grab a library like an LCD Library and use it without knowing how it works and that's fine, but it doesn't take much to learn how these libraries are structured and fundamentally how a C++ Class works.

I intended to cover how the SPI, I2C, and UART serial interfaces work that come with the Arduino, but we ran out of time. I did get to demo a complex Arduino centered project that used a temperature sensor that talked to the Arduino via a I2C bus that provided Centigrade readings. The sketch compared this value to a set point controlled by up and down buttons. If the temperature rose above the set point, a fan was turned on via a relay to cool the sensor back down. An LCD display was used to see the current temp, the set point, and a custom icon that indicated whether the fan was on or off. Additionally, the UART/USB serial interface was used to send the temp data over to a program running in Processing, a graphical app to graphically display the temp in Centigrade and Fahrenheit.

Coordinating all this functionality with the Arduino sketch is straight forward and provides a realistic application of the microcontroller.

To demonstrate how a Class works, I chose a Class called Telegraph that supports sending Morse Code to a speaker and LED. The Serial Monitor was used to actually send a message to the Arduino to be converted into Morse Code. The sketch then printed out the code and the letter being send on the Serial Monitor screen, beeped the speaker, and flashed the LED. The work is all being done in the Class. The sketch includes the Class and all the user has to do is instantiate the Class with a constructor syntax and send the message out to the Class.

We spent a lot of time going over basic C language statement we need to write the sketch like the "if", "while", "for", "switch", and "do-while" statements. I introduced hexadecimal numbering system so we could read as ASCII table. To use the table, we needed to index a letter or number. Also, we needed the Line Feed index to recognize when the user finished his message input and start the processing. It's a lot to comprehend, but we have the experience in the room, since most of the people there had programmed or were active programers.

Next time, I'd like to demo more working with the Processing app for cool interactions with Arduino sketches and more on to controlling motors and how digital logic plays a major part in how all this electronics works its magic.

On October 8, 2015, John Wolf gave a presentation entitled, "Basic Arduino", which was an introduction to microcontrollers with a focus on the Arduino family of processors. There were several demo examples to support the presentation slides. Click here to see the slides.

    It begins with junk,
    Then add software...
    And you have a project!

Seek Robotics has had four meetings to this point in mid-October and we've just begun to dig down into the art and science of robotics, electronics, and the mysterious world of software development. The Basic Arduino session was a jumping off place to draw the group onto one path. There are many forks in the road to pursuing a study in robotics. We have to start somewhere. The issue is, "It's so much easier to make progress if we already know all there is on the subject, but the truth of the matter, our knowledge is scattered and tattered at best. After all, this is a hobby not a vocation." So here we are, on the path to somewhere. Where do we go from here? I have an idea. I believe if we could just continue for a few more sessions and I can get through the fundamental uses of the Arduino class of processors, it will provide a solid foundation one could apply to any project or move on to any other microcontroller. The beauty is the Arduino is easy to teach from. The software is easy to write, and the libraries available and shields available can provide a great experience for the beginner, one with the funds to plop down a few hundred bucks and devote a bunch of weekends. After that, brother, you're on your own! Your feedback would be appreciated.

Here are some reference files: