Posts with «algorithm» label

Weather Station Predicts Air Quality

Measuring air quality at any particular location isn’t too complicated. Just a sensor or two and a small microcontroller is generally all that’s needed. Predicting the upcoming air quality is a little more complicated, though, since so many factors determine how safe it will be to breathe the air outside. Luckily, though, we don’t need to know all of these factors and their complex interactions in order to predict air quality. We can train a computer to do that for us as [kutluhan_aktar] demonstrates with a machine learning-capable air quality meter.

The build is based around an Arduino Nano 33 BLE which is connected to a small weather station outside. It specifically monitors ozone concentration as a benchmark for overall air quality but also uses an anemometer and a BMP180 precision pressure and temperature sensor to assist in training the algorithm. The weather data is sent over Bluetooth to a Raspberry Pi which is running TensorFlow. Once the neural network was trained, the model was sent back to the Arduino which is now capable of using it to make much more accurate predictions of future air quality.

The build goes into quite a bit of detail on setting up the models, training them, and then using them on the Arduino. It’s an impressive build capped off with a fun 3D-printed case that resembles an old windmill. Using machine learning to help predict the weather is starting to become more commonplace as well, as we have seen before with this weather station that can predict rainfall intensity.

Quick and Simple Morse Decoder

[Rostislav Persion] wrote a simple Morse Code decoder to run on his Arduino and display the text on an LCD shield. This is probably the simplest decoder possible, and thus its logic is pretty straightforward to follow. Simplicity comes at a price — changing the speed requires changing constants in the code. We would like to see this hooked up to a proper Morse code key, and see how fast [Rostislav] could drive it before it conks out.

In an earlier era of Morse code decoders, one tough part was dealing with the idiosyncrasies of each sender. Every operator’s style, or “fist”, has subtle variations in the timings of the dots, dashes, and the pauses between these elements, the letters, and the words. In fact, trained operators can recognize each other because of this, much like we can often recognize who is speaking on the phone just by hearing their voice. The other difficulty these decoders faced was detecting the signal in low signal-to-noise ratio environments — pulling the signal out of the noise.

A Morse decoder built today is more likely to be used to decode machine-generated signals, for example, debugging information or telemetry. This would more than likely be sent at fixed, known speeds over directly connected links with very high S/N ratios (a wire, perhaps). In these situations, a simple decoder like [Rostislav]’s is completely sufficient.

We wrote about a couple of Morse code algorithms back in 2014, the MorseDetector and the Magic Morse algorithm. While Morse code operators usually rank their skills by speed — the faster the better — this Morse code project for very low power transmitters turns that notion on its head by using speeds more suitably measured in minutes per word (77 MPW for that project). Have you used Morse code in any of your projects before? Let us know in the comments below.

MIT's light-up robot garden teaches you how to code

If you're teaching kids how to code, what do you do to show that software makes an impact in the real world? MIT has a clever idea: a robot garden. The project lets you control a grid of Arduino-linked "plants" through programming that makes them blossom and light up in pretty (and occasionally mesmerizing) ways. It'll even teach the virtues of distributed computing -- you can tell these leafy robots to bloom or change color in algorithm-driven sequences. The garden is just a demo for now, but it'll eventually turn into an easy-to-replicate curriculum for students who'd otherwise have to settle for seeing their results on-screen.

[Image credit: Jason Dorfman, CSAIL]

Filed under: Science, Software

Comments

Source: MIT News

Morse Decoder’s Lean and Sexy Search Algorithm

Often the Morse Code centered projects that we feature are to help you practice transmitting messages. This one takes a tack and builds an automatic decoder. We think [Nicola Cimmino's] project is well worth featuring simply based on his explanation of the Digital Signal Processing used on the signal coming in from the microphone. Well done. But he’s really just getting warmed up.

What makes this really stand out is a brilliant algorithm that allows conversion from Morse to ASCII using a lookup table of only 64 bytes. This provides enough room for A-Z and 0-9 without chance of collision but could be expanded to allow for more characters. Below is a concise description of how the algorithm works but make sure you take the time to read [Nicola's] project description in its entirety.

The algorithm can be decribed as follows. Have an index inside the lookup string inizialied to zero. Have an initial dash jump size of 64. At every received element (dot or dash) halve the initial dash jump and then increase by 1 the index inside the lookup string if a dot was received and by dash jump size if a dash was received. Repeat until a letter separator is reached, at that point the index inside the lookup string will point to the ASCII corresponding to the decoded morse.

Have you heard of this technique before? If so, tell us about it in the comments below. Before you jump all over this one, realize that Magic Morse uses a different technique.


Filed under: Microcontrollers, radio hacks

Wavefront Algorithm Mapping

Hi, LMRians. I've been reading up on this Wavefront Algorithm Navigation and I understand bits and pieces of it, but not everything. I'm trying to learn up on it so I can use it in my next robot : Project 4L-FRED (Alfred), a butler robot. The robot is suppose to navigate around the house from the dining area to the living room and serve drinks to guests. The robot will have pre-recorded messages like greetings and stuff like asking what drinks the guest would prefer.

read more

New Video

I've posted a new video on the http://ralphsrobots.com site.

This one is about using fixed point math in computer programs in general.

Fixed point runs faster and takes less program memory space. This is because when you use floating point math, sophisticated procudures are automatically linked into your program.

 

 

MAKEmatics – Mathematics for Makers

Makers need to familiarize themselves with the core concepts and the theory involved in creating applications such as Motion Sensing and Face Tracking. As the technology is churning out new hardware day and night, DIYers need to work hard to keep up and always be in touch with the latest technology around them.

-->-->

For example, anyone working with Accelerometers/ Gyroscopes or Inertial Measurement Units needs to understand the theory of Vectors, Force, Gravity and be able to work out complex mathematical problems. They may easily get an Arduino Board and an Accelerometer Breakout or an IMU Board and use a library instead of writing their own code but to truly understand the theory behind it; how the device actually works, is not for the faint of heart.

 

One such problem is the Face Tracking Application. Unless you know the real theory behind how the Algorithm actually works, you can only wonder about that robot which follows its master. Greg Borenstein had an idea of creating a website dedicated to this issue. Makematics – Math for Makers.

 

In an introductory post, Greg writes:

” I hope to show that a normal programmer with no special academic training can grapple with these areas of research and find a way in to understanding them. And as I go I aim to create material that will help others do the same. If I can do it, there’s no reason you can’t.”

More and more people should step forward and create or compile a good amount of research data to help fellow makers and DIYers in solving complex mathematical problems.