Posts with «microcontroller» label

Play Tetris on a Transistor Tester, Because Why Not?

[Robson] had been using the same multimeter since he was 15. It wasn’t a typical multimeter, either. He had programmed it to also play the Google Chrome jumping dinosaur game, and also used it as a badge at various conferences. But with all that abuse, the ribbon cable broke and he set about on other projects. Like this transistor tester that was just asking to have Tetris programmed onto its tiny screen.

The transistor tester is a GM328A made for various transistor testing applications, but is also an LCR meter. [Robson]’s old meter didn’t even test for capacitance but he was able to get many years of use out of that one, so this device should serve him even better. Once it was delivered he set about adding more features, namely Tetris. It’s based on an ATmega chip, which quite easy to work with (it’s the same chip as you’ll find in the Arduino Uno but [Robson’s] gone the Makefile route instead of spinning up that IDE). Not only did he add more features, but he also found a mistake in the frequency counter circuitry that he fixed on his own through the course of the project.

If you’ve always thought that the lack of games on your multimeter was a total deal breaker, this project is worth a read. Even if you just have a random device lying around that happens to be based on an ATmega chip of some sort, this is a good primer of getting that device to do other things as well. This situation is a fairly common one to be in, too.

Machine Learning on Tiny Platforms Like Raspberry Pi and Arduino

Machine learning is starting to come online in all kinds of arenas lately, and the trend is likely to continue for the forseeable future. What was once only available for operators of supercomputers has found use among anyone with a reasonably powerful desktop computer. The downsizing isn’t stopping there, though, as Microsoft is pushing development of machine learning for embedded systems now.

The Embedded Learning Library (ELL) is a set of tools for allowing Arduinos, Raspberry Pis, and the like to take advantage of machine learning algorithms despite their small size and reduced capability. Microsoft intended this library to be useful for anyone, and has examples available for things like computer vision, audio keyword recognition, and a small handful of other implementations. The library should be expandable to any application where machine learning would be beneficial for a small embedded system, though, so it’s not limited to these example applications.

There is one small speed bump to running a machine learning algorithm on your Raspberry Pi, though. The high processor load tends to cause small SoCs to overheat. But adding a heatsink and fan is something we’ve certainly seen before. Don’t let your lack of a supercomputer keep you from exploring machine learning if you see a benefit to it, and if you need more power than just one Raspberry Pi you can always build a cluster to get your task done just a little bit faster, too.

Thanks to [Baldpower] for the tip!

A First Look at Sony’s Spresense

The Spresense development board is Sony’s debut into the Maker market for microcontrollers, and it’s an impressive one.

Read more on MAKE

The post A First Look at Sony’s Spresense appeared first on Make: DIY Projects and Ideas for Makers.

The Smaller, Tinier Arduino Platform

While many of the Arduino platforms are great tools for gaining easy access to microcontrollers, there are a few downsides. Price and availability may be the highest on the list, and for those reasons, some have chosen to deploy their own open-source Arduino-compatible boards.

The latest we’ve seen is the Franzininho, an Arduino Gemma-like board that’s based on the ATtiny85, a capable but tiny microcontroller by Atmel in a compact 8-pin configuration. This board has everything the Gemma has, including a built-in LED and breakout pins. One of the other perks of the Franzininho over the Gemma is that everything is based on through-hole components, making the assembly much easier than the surface mount components of the Gemma.

It’s worth noting that while these boards are open source, the Arduinos are as well. It’s equally possible to build your own 100% identical Arduino almost as easily. If you want more features, you can add your own by starting from one of these platforms and do whatever you want with it, like this semi-educational Atmel breakout board.

Thanks to [Clovis] for the tip!

Sensing Soil Moisture: You’re Doing it Wrong!

If you compulsively search online for inexpensive microcontroller add-ons, you will see soil moisture measurement kits. [aka] built a greenhouse with a host of hacked hardware including lights and automatic watering. What caught our attention among all these was Step 5 in their instructions where [aka] explains why the cheap soil sensing probes aren’t worth their weight in potting soil. Even worse, they may leave vacationers with a mistaken sense of security over their unattended plants.

The sensing stakes, which come with a small amplifier, work splendidly out of the box, but if you recall, passing current through electrodes via moisture is the recipe for electrolysis and that has a pretty profound effect on metal. [Aka] shows us the effects of electrolysis on these probes and mentions that damaged probes will cease to give useful information which could lead to overworked pumps and flooded helpless plants.

There is an easy solution. Graphite probes are inexpensive to make yourself. Simply harvest them from pencils or buy woodless pencils from the art store. Add some wires and hold them with shrink tube, and you have probes which won’t fail you or your plants.

Here’s some garden automation if this only whet your whistle, and here’s a robotic friend who takes care of the weeds for you.

Filed under: green hacks

Automatic Phone Dialer Illuminates Inner Workings

The invention of the transistor ushered in a lot of technologies that we now take for granted, and one of the less-thought-about areas that it improved living conditions worldwide was by making the touch-tone phone possible. No longer would the world have to fuss with dials to make phone calls, they could simply push some buttons. This technology is still in use today, and it is possible to build external phone dialers that use these tones to make phone calls, as [SunFounder] demonstrates with his latest project.

The tones that a phone makes when a button is pressed correlate with specific frequencies for each number. Automatic dialers like this one help when there are multiple carriers (like different long-distance carriers, for example) where different prefixes can be used to make calls cheaper depending on the destination of the call. A preprogrammed dialer can take all of this complication out of making phone calls. [SunFounder] is able to make a simple dialer from scratch, using an Arduino, its “tone” library, and a speaker that is simply held up to the phone that the call will be placed on.

[SunFounder] points out that he built this more because he’s interested in the inner workings of phones, and not because he needed a purpose-built dialer. It’s a good demonstration of how phones continue to use DTMF though, and how easy it is to interface with such a system. It might also suit a beginner as an introduction to the world of phreaking.

Filed under: phone hacks

Hackaday Prize Entry: Oscilloscope for the Masses

If you head down to your local electronics supply shop (the Internet), you can pick up a quality true-RMS multimeter for about $100 that will do almost everything you will ever need. It won’t be able to view waveforms, though; this is the realm of the oscilloscope. Unlike the multimeter’s realistic price point, however, a decent oscilloscope is easily many hundreds, and often thousands, of dollars. While this is prohibitively expensive for most, the next entry into the Hackaday Prize seeks to bring an inexpensive oscilloscope to the masses.

The multiScope is built by [Vítor] and is based on the STM32-O-Scope which is built around a STM32F103C8T6 microcontroller. This particular chip was chosen because of its high clock speed and impressive analog-to-digital resolution, which are two critical specifications for any oscilloscope. This particular scope has an inductance meter built-in as well, which is another feature which your otherwise-capable multimeter probably doesn’t have.

New features continue to get added to this scope by [Vítor]. Most recently he’s added features which support negative voltages and offsets. His particular scope is built inside of a model car, too, but we believe this to be an optional feature.

Filed under: The Hackaday Prize, tool hacks

Balancing Robot Needs Innovative Controller and Motor

A self-balancing robot is a great way to get introduced to control theory and robotics in general. The ability for a robot to sense its position and its current set of circumstances and then to make a proportional response to accomplish its goal is key to all robotics. While hobby robots might use cheap servos or brushed motors, for any more advanced balancing robot you might want to reach for a brushless DC motor and a new fully open-source controller.

The main problem with brushless DC motors is that they don’t perform very well at low velocities. To combat this downside, there are a large number of specialized controllers on the market that can help mitigate their behavior. Until now, all of these controllers have been locked down and proprietary. SmoothControl is looking to create a fully open source design for these motors, and they look like they have a pretty good start. The controller is designed to run on the ubiquitous ATmega32U4 with an open source 3-phase driver board. They are currently using these boards with two specific motors but plan to also support more motors as the project grows.

We’ve seen projects before that detail why brushless motors are difficult to deal with, so an open source driver for brushless DC motors that does the work for us seems appealing. There are lots of applications for brushless DC motors outside of robots where a controller like this could be useful as well, such as driving an airplane’s propeller.

Filed under: robots hacks

Only One Button? No Problem!

Sometimes less is more. This is especially true when dealing with microcontrollers with limited I/O pins. Even if you have lots of I/O, sometimes you are need to pack a lot into a little space. [Hugatry] was inspired by the simple interface found on a lot of flashlights: one button. Push it and it turns on. Push it again, and it switches modes. You cycle through the modes until you finally turn it back off. One button provides mutliple functions. The question is how can you use a power switch as an I/O device? After all, when you turn the power off, the microprocessor stops operating, right?

[Hugatry’s] answer is quite simple. He connects a resistor/capacitor network to an I/O pin (or multiple pins). When the processor turns on initially, the pin will read low and the capacitor will charge up. If you turn the power off, the CPU voltage will fall rapidly to zero, but the voltage on the capacitor will discharge slower. If you wait long enough and turn the power on, there’s no difference from that first power on event. But if you turn the power on quickly, the capacitor voltage will still be high enough to read as a logic one.

What that means is that the processor as part of its start up can detect that it was recently turned off and take some action. If it remembers the previous state in nonvolatile memory, you can have the code cycle through multiple states, just like a flashlight. You can see a video of the setup, below.

[Hugatry] included some simple Arduino code that illustrates the concept. However, the technique is simple enough that you can adapt it to other projects easily.

Think one button isn’t enough to do anything interesting? Think again. Then again, Amazon probably has a patent on things with one button.

Filed under: Arduino Hacks, Microcontrollers

Animated Progress Bar Shows LCD New Tricks

A small LCD screen can be extremely helpful with small microcontroller projects. Not everything needs to communicate to a fancy server using an ESP8266. However, if the simplicity of the character displays irks you, it’s possible to spice them up a little bit with custom characters and create animations, like [Fabien] did with his animated Arduino progress bar. (Google Translate from French)
The project started out simply enough: all [Fabien] needed was a progress bar. It’s easy enough to fill in the “characters” on the 2×16 character LCD screen one-by-one to indicate progress, and the first version of this did exactly that. The second version got a little bit fancier by adding a border around the progress bar and doubling its resolution, but the third version is where knowing the inner machinations of the microcontroller really paid off. Using a custom charset reuse optimization, [Fabien] was able to use 19 custom characters at a time when the display will normally only allow for eight. This was accomplished by placing the custom characters in memory in the correct order, to essentially trick the microcontroller into displaying them.
These types of microcontroller hacks get deep into the inner workings of the microcontroller and help expose some tricks that we can all use to understand their operation on a deeper level. Whether you’re using PWM to get a microcontroller to operate a TV, or creating the ATtiny-est MIDI synth, these tricks are crucial to getting exactly what you want out of a small, inexpensive microcontroller.

Filed under: Microcontrollers