• www.azx7.com In the News...
  • From A to Z, 7 Days of the Week



We are global leaders in Data Security and System Fixes for iOS & Android, and has been in the business for more than 10 years. We provide users with tools like device content management, data recovery, password recovery, system repair and other practical mobile phone and computer essentials.

Today, our products and services are trusted by more than 70 million of users worldwide!

Enjoy creating more with Clip Studio Paint! The ultimate digital drawing software. Start drawing now! 

New DIY projects and creative ideas on electronics, arduino etc for you

---------- 1 ----------

I Turned The New LattePanda 3 Delta Into A Rugged Cyberdeck

Title: I Turned The New LattePanda 3 Delta Into A Rugged Cyberdeck

Date: Wed, 17 Aug 2022 12:04:46 +0000


Today we’re going to be using the new LattePanda 3 Delta from DF Robot to build a cyberdeck that packs up into a rugged, waterproof case that you can take with you almost anywhere. The LattePand 3 Delta is a pocket-sized single board computer with a powerful processor and a great combination of IO. It […]

The post I Turned The New LattePanda 3 Delta Into A Rugged Cyberdeck appeared first on The DIY Life.

Category: Electronics Projects

Source: Michael Klements

Today we’re going to be using the new LattePanda 3 Delta from DF Robot to build a cyberdeck that packs up into a rugged, waterproof case that you can take with you almost anywhere.

Cyberdeck In Pelican Case

The LattePand 3 Delta is a pocket-sized single board computer with a powerful processor and a great combination of IO. It can run a range of operating systems, like Windows 10 or 11 and distributions of Linux and it even has an onboard Arduino that provides 12 Analogue inputs, and 23 digital IO pins.

As the name suggests, this is the 3rd generation of LattePanda board and it features a few upgrades, the most significant being the new quad-core Intel N5105 processor running at 2.0Ghz, with a burst frequency of up to 2.9Ghz. It provides double the CPU performance of the previous LattePanda and three times the GPU performance.

Here’s my video on unboxing the LattePanda 3 Delta and building the cyberdeck, read on for the write-up:

What You Need To Build Your Own Cyberdeck

Equipment Used

  • Atomstack X20 Pro Laser Cutter – Buy Here
  • Electric Screwdriver Set – Buy Here

First Look At The LattePanda 3 Delta

The LattePanda 3 Delta comes in a black branded box with the board’s PCB and large heatsink and cooling fan as the main feature. It’s also got its specifications and contents listed on the side panels.

LattePanda 3 Delta In Box

First up when we open the box is the LattePanda in a clear plastic case. In addition to the board, this case also includes a quick start guide and a small packet with the Bluetooth and WiFi antennas.

LattePanda 3 Delta Unboxing

Beneath it are two power cables for different outlets (American and European), a set of nylon standoffs to mount it on and then the power adaptor.

Included With The LattePanda 3 Delta

The power adaptor is a branded 45W USB-C adaptor that supports power delivery up to 20V at 2.25A, so there is plenty of power for the LattePanda to work with. I like that the adaptor has a removable cable so you can replace it to suit your country’s power outlets. Or if it gets damaged.

LattePanda 3 Power Adaptor With Power Delivery

In addition to the upgraded CPU, the LattePanda 3 Delta also has 8GB of LPDDR4 RAM, 64GB of eMMC storage, dual-band WiFi 6 and Bluetooth 5.2.

First Look At The LattePanda 3 Delta

On the bottom of the board, we’ve got an M.2 B-Key port for a mobile network module or SATA SSD and an M.2 M-Key port for an add-on graphics card or NVME SSD. There’s also a sim and microSD card slot.

M.2 Ports On Bottom

There are three ways to hook it up to a display, you can use the obvious HDMI port on the side or the eDP connectors on the bottom or drive a display through the USB type C port that’s also used for power. So you’ve got support for dual 4K monitors through the HDMI and USB C ports.

Underside of LattePanda 3 Delta

There are three USB 3 ports on the side, one USB3.2 Gen 2 port (on the left) that supports data transfer up to 10Gb/s and two USB3.2 Gen 1 ports (on the right).

USB Ports on the Side

On the opposite side is the USB type C port for power input, a 3.5mm audio jack, a gigabit Ethernet port and the HDMI port.

Ports on the Top

My favourite feature of the LattePanda 3 Delta is the onboard Arduino which gives you a lot of options for IO for your electronics projects. These pins along with a range of other interfacing pins are broken out on headers on either side of the cooling fan. The board has been designed with makers in mind, so it’s also got some additional features like a watchdog timer that’ll reboot your system if it detects that it is no longer responding or has crashed.

Booting It Up For The First Time

Now let’s install the antennas and get it booted up. The Bluetooth and WiFi antennas are physically identical and need to be installed on the pins alongside the small silver Intel adaptor on the bottom of the board.

Installing The Antennas on the LattePanda

The LattePanda 3 Delta comes with Windows 10 pre-installed but it’s easy to set up to dual boot a Linux OS as well. You can also upgrade the Windows 10 install to Windows 11 if you’d like.

First Boot To Windows 10

Another nice feature of the LattePanda is that it can be powered via USB C or through the 12V JST PH2.0 4 Pin connector next to it. Their documentation also says that you can switch between the two while powered without interruption, which is pretty cool. The board will automatically switch to the supply that provides the highest voltage.

The onboard fan is impressively quiet. It’s PWM controlled so it ramps up when the CPU is loaded, but with low-intensity tasks, you can barely hear it.

Fan Noise Is Impressively Low

Turning The LattePanda 3 Delta Into A Cyberdeck

Since the LattePanda 3 Delta is aimed at being a powerful mobile computer, I thought it would be great to turn it into a cyberdeck. So I’m going to do that by installing it in a Pelican case along with an HD touch display, a fold-up keyboard and a low-profile mouse.

Cyberdeck Components To Be Used

As the brains of the cyberdeck, I wanted the LattePanda to be visible, rather than hidden behind the display or keyboard. I also want to provide a path for adequate airflow and I want to be able to access the IO pins for hooking up sensors and other external devices if I need them.

LattePanda Should Be Visible On Cyberdeck

I want to maintain the Pelican case’s waterproof design, so I don’t want to drill holes in the sides for cables or ports. I’m going to rather reroute the ports on the board to ports on the main deck to plug into.

Making Up The Custom Components

I sketched up some parts to hold all of the components in Inkscape, these consist of the bottom deck with a holder for the LattePanda and divisions for the keyboard and mouse, and then the top deck to hold the display.

Design of Components in Inkscape

I then laser-cut the components from a sheet of 3mm mdf. You’ll need a sheet of about 400mm x 400mm to cut all of the components from. I laser cut the acrylic cover from some 3mm clear acrylic, 2mm acrylic will also work.

I glued the pieces together using some PVA wood glue, clamping them together while the glue dried. I first glued the port frames and magnet holder into place, then the edges of the keyboard and mouse holder and then finally glued the support box together.

Once the glue was dry, I gave the parts a coat of general purpose primer and then a few coats of satin black spray paint. I allowed the parts to dry for a few hours in the sun before moving on to assembling the cyberdeck.

Spraying Components With Black Spray Paint

Installing The Components In The Case

Now we can start putting the Cyberdeck together. I’m going to start by installing the display in the top holder.

To hold the display in place, I’m going to use some M3 x 12mm button head screws and nuts. I pushed a screw through the front panel and held it in place with a nut on the back. I then used a second nut as a spacer before the display and then held the display in place with another nut. I did this so that I could accurately control the depth of the display behind the front panel/frame so that it was flush.

Installing Button Head Screws For Display

We need two cables for the display panel, one HDMI cable for the display input and one micro-USB cable for power and the touch input.

Installing the HD Touch Display

These can be fed through the cutout at the bottom which will then run into the bottom of the case where the LattePanda is.

To mount the LattePanda, I’m going to use some 6mm high M3 nylon standoffs. I’m not using the ones that came with the LattePanda as I want to mount it close to the base board so that there is more room underneath the compartment for cables.

LattePanda 3 Delta Installed In Holder

I bought a couple of extension cables so that I can reroute the ports to the surface of the cyberdeck rather than having to reach the sides of the LattePanda to plug cables in. These press into the cutouts in the MDF so that the front of the port is flush with the deck surface. The press fit is quite tight so that they’re doing most of the support work for the port.

Pressing Cables Into Port Cutouts

We can then use a bit of hot glue on the back as an extra measure to hold them in place.

Gluing The Cables Into Their Holders

I cabled tied the extension leads together to neaten up the wiring and to make it easier to install into the base of the pelican case.

Cable Management Behind LattePanda

Now get them installed in our Pelican case.

The display panel fits into the top and we can then secure it with some hot glue. I tried to put the glue behind the panel as far as possible so that it’s less visible.

Installing Display Into Cyberdeck

I fed the HDMI and USB cables through to the LattePanda and again cable tied these to some of the existing cables to hold them in place. We can then glue the bottom into place in the Pelican case as well.

Installing Base Into Cyberdeck

To finish it off, let’s add the clear acrylic cover over the board. This has a cutout for the fan and I’m going to install four magnets in the corners to hold it in place on four magnets on the MDF panel. I’ve held all of these magnets in place with some UV glue.

That’s it, our Cyberdeck is now complete and ready to use.

Cyberdeck Completed

Final Thoughts

The onboard Arduino allows you to hook up sensors, servos and displays directly to the IO pins, so it’s great for tinkering with electronics or deploying as a project solution. By adding some of DF Robots hats to the Arduino pins, you can easily hook up grove sensors, I2C displays and even use industrial communication protocols like RS232 or RS485.

Plugging In Cables For First Boot

The touch display is a little small to work with comfortably, but it’s a nice addition if you’re working in an area where the mouse is not practical to use.

Using Touch Display To Interact With Lattepanda

I’ve hooked up the USB3.2 Gen 2 port to the top panel, so we’ve got a port that is perfect for use with high-speed devices, something like an SSD or a high-speed network adaptor would be ideal.

Plugging Drive into USB 3.2 Gen 2 Port

For additional IO you can also use a power delivery adaptor like this on the USB C port. This one adds an SD card reader, two more USB ports and an HDMI port while still allowing you to power the LattePanda through the same USB C port.

USB C Adaptor To Provide Additional IO

Overall I think the new LattePanda 3 Delta is an awesome little single-board computer. It has enough power to be used as a standalone computing device and, with the addition of the onboard Arduino, it’s perfect for makers to use for their electronics projects.

Let me know what you think of the new LattePanda Delta 3 in the comments section below. Also, let me know what you think of my cyberdeck and if there is anything you’d add or do differently.

The post I Turned The New LattePanda 3 Delta Into A Rugged Cyberdeck appeared first on The DIY Life.

I Turned The New LattePanda 3 Delta Into A Rugged Cyberdeck

---------- 2 ----------

What Makes TMC2208 Stepper Motor Drivers Silent

Title: What Makes TMC2208 Stepper Motor Drivers Silent

Date: Thu, 30 Jun 2022 02:38:20 +0000


A while ago I did a bit of an experiment to compare the sound level between TMC2208 and A4988 stepper motor drivers. At the time, A4988 drivers were more commonly used on 3D printers and other hobby CNC devices. Since then, most 3D printer and CNC laser manufacturers have moved towards replacing at least the […]

The post What Makes TMC2208 Stepper Motor Drivers Silent appeared first on The DIY Life.

Category: Arduino Tutorials

Source: Michael Klements

A while ago I did a bit of an experiment to compare the sound level between TMC2208 and A4988 stepper motor drivers. At the time, A4988 drivers were more commonly used on 3D printers and other hobby CNC devices. Since then, most 3D printer and CNC laser manufacturers have moved towards replacing at least the X and Y axis motors with the silent TMC2208 stepper motor driver or some other variant of silent motor driver. A question that has come up quite a lot in the video’s comments was how these drivers manage to drive the motors with such a significant sound reduction and if there was any trade-off.

So rather than just show you some diagrams, I thought I’d set the motor and drivers up again and try to show you through actual measurements.

Here’s my video of the test – read on for the write-up, although the video is the best way to hear the sound difference for yourself.

What You Need To Set Your Own Test Up

To set up your own test like I’ve done, you’ll need a few basic components:

I’m going to be using a Pokit multimeter to take current measurements using the oscilloscope function. You don’t need one of these if you just want to hear the sound difference or tinker with controlling the motors.

Understanding How Stepper Motors Work

There are some really good resources online to explain how stepper motors work, so I’m not going to go into too much detail. The simple explanation is that stepper motors have a number of poles and the driver energises the coils in the motor to align the rotor with these poles in a sequence to rotate it.

Stepper Motor Operating Principle

The simplest way to do this is to turn one pole on and the other off, causing the rotor to jump from one pole to another. This is simple to do electrically but causes the most noise as it induces a lot of vibration within the motor.

We can reduce the noise by rather slowly energising the one coil while de-energising the second coil so that we gently pass the rotor from one step to the next. The most optimal way to do this without producing any vibration is by producing a sinusoidal wave.

Sine Wave Produced By Stepper Motor Driver

The better the stepper motor driver can replicate a sinusoidal waveform, the quieter it’s going to be able to run the motor. But replicating a sine wave perfectly requires more expensive electronics, so there is a bit of a tradeoff.

There are a few other sources of noise or humming in a stepper motor caused by things like magnetic fields, current ripple and chopper frequency. But their contribution is generally significantly less than this is.

So let’s have a look at the current waveform that the two drivers produce.

The TMC2208 Driver Test Setup and Code

I’ve got a similar setup to the last test with the two drivers hooked up in the same way to an Arduino.

TMC2208 Motor Driver Test Setup

The drivers are both connected to digital outputs 3 and 4 on the Arduino for step and direction control respectively. So we just need to plug our motor into the one we want to test. I’ve also added a 10K potentiometer, connected to analogue pin A0, to adjust the time delay between step pulses, which in turn will control the motor speed.

Potentiometer To Adjust Stepper Motor Speed

The Arduino sketch is very basic, just assigning the pin modes in the setup function and then looping through reading in the potentiometer position and stepping the motor with the measured time delay.

//The DIY Life
//Michael Klements
//30 April 2020

int stepPin = 3;          //Define travel stepper motor step pin
int dirPin = 4;           //Define travel stepper motor direction pin
int motSpeed = 5;         //Initial motor speed (delay between pules, so a smaller delay is faster)

void setup() 
  pinMode(stepPin, OUTPUT);                 //Define pins and set direction
  pinMode(dirPin, OUTPUT);
  digitalWrite(dirPin, HIGH);

void loop() 
  motSpeed = map(analogRead(A0),0,1023,50,1);           //Read in potentiometer value from A0, map to a delay between 1 and 50 milliseconds
  digitalWrite(stepPin, HIGH);                          //Step the motor with the set delay
  digitalWrite(stepPin, LOW);

Testing the Waveforms from the A4988 and TMC2208 Stepper Motor Drivers

We’re going to start with the A4988 driver by first taking a look at the sound level at different speeds.

Adjusting Stepper Motor Speed on A4988 Motor Driver

The sound level throughout the range of speeds was an average of around 50-60dB. The sound was obviously being amplified by the wooden desk and wouldn’t be that loud with a proper vibration damping mount, but this way you get a good idea of the improvement.

To measure the waveform I’m going to use this Pokit multimeter and oscilloscope and I’m going to connect it in series with one of the motor coils to measure the current flowing through the motor coil.

Pokit Multimeter

In the video, you may notice that the motor sounds a bit weird when it’s connected and the oscilloscope isn’t measuring anything. This is because the oscilloscope opens the circuit when it isn’t taking readings. So the motor effectively only has one coil connected to the drive. You’ll see the shaft isn’t turning any more and is just sort of jumping in the same spot. So we’re only interested in the sound the motor makes during readings after I’ve pushed the red record button.

A4988 in Full Step Mode

With the A4988 driver running in standard full-step mode, you can quite clearly see that the driver is producing a very square wave.

Current Waveform Full Step A4988

It also doesn’t matter if we increase the motor speed, we still get a similar square wave that just repeats more often in the same timeframe. So this waveform is obviously quite far from a sine wave and therefore produces the most vibration within the motor, leading to the most noise being generated.

That’s not the end of the road for the A4988 driver, it can actually produce somewhat of a sine wave through microstepping.

Microstepping is essentially the ability for the driver to partially energise the coils to position the rotor in positions between the two poles, and it does so in a way that resembles a sine wave. So the most positions (microsteps) you can do between each pole, the better your sine wave is going to look.

The A4988 can do half, quarter, eighth or sixteenth step microstepping by pulling a combination of three pins high. So let’s see what those look like – we’ll start with half step mode.

A4988 in Half Step Mode

With the A4988 driver running in half step mode, we now got something that is starting to look a bit like a sine wave – but there is obviously still a lot of room for improvement.

Current Waveform Half Step A4988

The motor also sounded like it was running a little smoother than in full step mode. Looking at the waveform produced, you can clearly see two steps on our sine wave above and below 0.

A4988 in Eighth Step Mode

Now let’s try and improve upon our results with eighth step mode. So in this test, we should now have eight increments between the zero and the maximum on our sine wave.

Current Waveform Eighth Step A4988 No Scaled

The first thing you’ll notice is that the sine wave doesn’t fit into our timeframe anymore. That’s because the driver now only moves 1 micro step for each pulse, so our motor is effectively moving 8 times slower than it was in full step mode. So, for example, a motor with 200 steps per revolution running in eighth step mode will now have 1600 steps per revolution.

Current Waveform Eighth Step A4988 Scaled

If we adjust the time scale, we can see our full sine wave and we’ll also notice that our motor is again moving smoother, and slower than it was when in half step mode.

A4988 in Sixteenth Step Mode

Lastly lets try sixteenth step mode, which is the most that this A4988 driver can do.

Current Waveform Sixteenth Step A4988

You’ll again notice that the motor is moving half as fast as eight step mode and we’re getting a wave that’s now looking a lot like a sine wave.

That’s now the end of the road for our A4988 driver. The micro stepping has made it run much smoother and a bit quieter, but it’s still quite noisy. So let’s swap over to our TMC2208 driver now.

TMC2208 Running In Legacy Mode

For compatibility with the A4988 driver’s code, we’re going to be running the TMC2208 driver in Legacy Mode. This mode essentially allows the driver to act as a drop-in replacement for the A4988 driver.

TMC2208 Sound Level

If you watched the video, at this stage you probably hadn’t noticed that the motor was running. That’s obviously a significant improvement over the A4988 drivers that produced around 50-60dB. The TMC2208 driver operates nearly silently, even when you change the speed.

A big part of how it does this is that the TMC drivers produce 256 microsteps, so sixteen times more than what the A4988 drivers do.

Let’s now hook up the oscilloscope and see what the waveform look like.

Current Waveform TMC2208

As with the previous test, the motor makes a bit of noise when the oscilloscope isn’t taking measurements as its only got a single pole connected, so it’s jumping back and fourth around the same pole. It does however go silent again when the oscilloscope is running.

As with the A4988 driver, if we change up the speed we still get the same smooth sine wave, it just repeats more often in the same time interval.

Current Waveform TMC2208 Higher Speed

So you can see that’s a significantly improved sine wave over even the best one that the A4988 driver was able to produce.

Finals Thoughts on the TMC2208 Motor Driver Test

So now you have a basic understanding of what the TMC2208 drivers do differently to run almost silently.

As for any drawbacks. There are two primary ones.

One is a slight reduction in incremental torque, which is not usually an issue unless you’re operating near the motors torque limitations.

The second is not so much to do with the motor but to do with the microcontroller telling the driver what to do. As I’ve mentioned earlier, microstepping requires more pulses from the microcontroller to move the motor a full step. So, running in sixteenth step mode requires your microcontroller to output 16 times more pulses than it would need to in full-step mode. If you’re doing this across multiple motors or while doing other tasks, your controller quickly gets bogged down just keeping the motors running and may not be able to keep up.

Out of interest, during the tests, I was running the drivers with a 12V supply to the motor.

That’s it for today, I hope you’ve learned something and found this explanation useful. Let me know in the comments section what you’ve used these drivers for and check out some of my other projects for ideas.

Test Setup of A4988 and TMC2208 Stepper Motor Driver

The post What Makes TMC2208 Stepper Motor Drivers Silent appeared first on The DIY Life.

What Makes TMC2208 Stepper Motor Drivers Silent

---------- 3 ----------

Meet Bittle, an Advanced Open-Source Robot Dog by Petoi

Title: Meet Bittle, an Advanced Open-Source Robot Dog by Petoi

Date: Thu, 26 May 2022 11:41:52 +0000


This is Bittle, a ready-to-run advanced open-source robot dog by Petoi that is based on the OpenCat robotic pet framework. If you’ve ever wanted to explore building your own robotic quadruped, but have felt overwhelmed by the amount of information and options available or have been at a loss with where to start, then Bittle […]

The post Meet Bittle, an Advanced Open-Source Robot Dog by Petoi appeared first on The DIY Life.

Category: Arduino Projects

Source: Michael Klements

This is Bittle, a ready-to-run advanced open-source robot dog by Petoi that is based on the OpenCat robotic pet framework.

If you’ve ever wanted to explore building your own robotic quadruped, but have felt overwhelmed by the amount of information and options available or have been at a loss with where to start, then Bittle is the perfect product for you. So in this review, we’ll take a look at what Bittle is, how it works and what it can be used for.

Have a look at my video review to see Bittle in action, or read on for the written review:

Where To Get Bittle

Bittle is primarily available for purchase online through Petoi’s website or their Amazon store and comes in three packages:

  • Base Kit – Includes all of the parts required to assemble your own robot dog
  • Pre-assembled Kit – All of the components included in the base kit, but pre-assembled and ready-to-run
  • Developer Kit – The pre-assembled kit with 10 replacement servos and an extra battery pack

Petoi have sent me the pre-assembled kit to try out and share with you, so that’s the kit that we’ll be taking a look at in this review.

What’s Included In The Box

The base kit comes in a branded box with clear protective inserts to hold the included components in place.

Bittle Packaging

Included is Bittle, along with a battery pack with an integrated charging circuit, and then an accessories kit.

Inside Bittles Pre-assembled Kit Box by Petoi

The accessory kit includes an infrared remote, a spare servo and some screws, a calibration tool, a small screwdriver and a pack of modules that allow communication with Bittle. These modules include a USB programming module, a Bluetooth module and a WiFi module.

Included Accessories With Bittle

Assembling Bittle

If you’ve bought the base kit then you’ll need to do some assembly work before you can start using Bittle, including making up the legs, mounting the servos in place at the joints and connecting the wiring through to the control board that makes up Bittle’s body.

Bittle By Petoi Packaged

If you’ve got the pre-assembled kit, like I do, then you’ll just need to snap the head into place and plug in the battery. You’ll also need to move the servos to the correct starting position as they’re packed with the joints bent in the opposite direction to make Bittle more compact.

Preparing Bittles Legs For Power Up

The body and components feel like they’re well made and are good quality. Part of what makes this robot dog look great and function so well is that they’ve taken the time to design and manufacture custom parts – like the servo arms that have been specifically designed to join the leg components with the inclusion of a spring to provide a bit of shock absorption.

Bittles Servo Joints

Controlling Bittle With The Infrared Remote

Once assembled, the included 21 button IR (infrared) remote allows you to start playing around with some of the core functions of Bittle right away. It’ll allow you to walk, run, turn and do a couple of pre-programmed skills right out of the box using a small infrared receiver on Bittle’s back.

Included IR Remote Control

The arrow keys control Bittl’s walking/movement directions along with speed settings and 11 skill buttons allow you to execute some of the pre-programmed skills.

Getting the first movement out of Bittle is as easy as plugging in the battery pack and then aiming the remote at his back when you press one of the buttons.

Here’s Bittle waving hello…

Bittle Waving Hello For The First Time

Exploring Bittle’s Control Board

Once you’ve tried out Bittle using the IR remote, you can either dive right in to coding your own skills or you can download the mobile app (for iOS or Android) to unlock some additional functionality, including calibration and customized commands. Either way, you’ll need to remove the black cover on the top to get to the control board to plug in one of the communication modules.

Under the cover is a custom-designed controller called NyBoard with an integrated Atmega328P chip, PCA9685 PWM servo driver, MPU6050 motion sensor, an infrared sensor and a number of ports and interfaces to add sensors and devices to.

Nyboard, Bittle's Control Board

There appears to have been some revisions made to this board as some of the versions I’ve seen online have a row of RGB LEDs along one side. The core functionality however seems to be largely the same.

NyBoard Controller

I really like that they haven’t trimmed this board down to only suit the functionality and IO that the standard Bittle configuration requires. Leaving additional servo outputs, I2C interfaces and digital IO ports gives you a lot of options to build upon the basic design and make your own modifications and additions to the robot dog. This along with the open-source software means that you’re getting a development platform to learn on, build upon and explore, rather than just a finished product that you’ll probably get bored with after a couple of weeks. Part of the fun in building your own quadruped or robotic pet is that you never really finish it, there is always something else you can add, tune or modify and Bittle retains this – being a platform to build upon rather than just being a finished product.

Coding Routines, Skills And Features

Coding is best done through the Arduino IDE, and you’ll need to use the included communication module to allow your computer to program Bittle. This allows you to plug Bittle into your computer using the included micro-USB cable.

Plugging In The USB Programmer and Cable

If you’re not comfortable with the Arduino IDE, you can use Python as an alternative. They even have a drag-and-drop coding interface for beginners. So there really is something for every level of experience.

Bittle's Drag and Drop Programming Interface

Their documentation is really good and covers everything you may need to do to use and maintain Bittle as well as documentation and instructions for adding your own sensors, skills and features.

Coding New Skills On Bittle Using The Arduino IDE

Calibrating Bittle’s Leg Positions

In Petoi’s documentation, they mention that the pre-assembled kit is only coarsely tuned. So they recommend running through the calibration process for best results. I’m going to run through the calibration sequence using their iOS app. To use the app, I need to plug in the Bluetooth communication module to allow my phone to communicate with Bittle.

Installing The Bluetooth Communication Module On Bittle

To help out with the calibration process, I also 3D printed their stand with the calibration arms built into it.

We can then open up the app to pair Bittle to the phone and start the calibration process. If you head over to calibration mode, the legs will move to their calibration positions and you can then make adjustments to their positions.

Bittles Legs In Calibration Mode

Course adjustment is made by removing the arm from the servo and aligning it as best you can. You’ll need to remove the screw that holds the servo arm to the servo in order to remove it.

Course Calibration Adjustment

Fine adjustment is then done in the app until Bittle’s legs are at perfect 90-degree angles, by aligning the legs with the stand or with the included calibration tool.

Using The Calibration Tool To Check Bittle's Legs

You can select each join in the image at the top of the screen and then make adjustments to it using the + and – signs. It’ll only let you just the servo between an upper and lower limit before asking you to rather make a course adjustment.

Fine Calibration Adjustment Using The App

The stand is also useful for trying out new movements and testing commands without having to worry about where Bittle is going or if it’s going to fall off your desk.

Working On Or Repairing Bittle

All of Bittle’s components either screw or snap into place. So it’s super easy to take apart if you need to swap out a servo, change a spring or make changes to the wiring or control board. You just need a screwdriver and you’re good to go.

Replacing A Joint Servo

If you’re doing a lot of work on it then you’ll want to get a better screwdriver than what’s included with the kit as it’s a bit small and cumbersome to work with.

The wiring is also all held in place and partially hidden by snap-on covers over the legs. These help ensure that they don’t interfere with the joint movements and also keep Bittle looking neat.

Using The iOS App To Control Bittle

We’ve already paired the app with Bittle in the calibration process, so now let’s try some customized commands. Bittle has a number of controls and skills that are preprogrammed, these can be set up to run individually or as part of routines using text inputs through the app or the Arduino IDE.

So let’s try one of them. The code to look or check around is ck, so we type in kck to run the command and we can give the quick command a name “Look Around”.

Using Text Commands To Control Bittle

We now have a quick button to look around, which he’ll do each time we push the button.

Creating Custom Butttons For Bittle In The App

We can try commands that aren’t available through the infrared remote, like play dead, or march on the spot. We can also string commands together to create routines and behaviour sequences.

Bittle Playing Dead

The onboard IMU knows the orientation of Bittle, so if he stumbles or falls over, it will automatically activate a routine to flip him back over and onto his feet.

Bittle seems to manage quite well on most flat surfaces. It walks best on surfaces that are a little bit rough, like wood or concrete, but struggles on very uneven or loose surfaces like stones, sand or pebbles.

You can also use the IMU to allow Bittle to balance on uneven surfaces or when pushed or bumped.

Bittle Balancing When Being Pushed Externally

Final Thoughts on Bittle

Petoi have clearly put a lot of time and effort into creating a good quality product that is great for a range of experience levels. If you’ve never programmed anything in your life, you’ll still be able to get started with the basic drag-and-drop interface, and the open-source code allows experienced programmers to make any changes they’d like to build upon and improve Bittle.

They also have a number of external sensors already available and are working on some additional ones to add functionality to Bittle.

Additional Sensors Like Camera Vision For Object Tracking

These include sensors like obstacle avoidance and object tracking through a smart camera. So definitely check out the sensors if you’ve already got your own Bittle, and visit their web store if you’d like to get your own robot dog or cat.

Let me know what you think of Bittle in the comments section below and let me know if you have any project ideas that you’d like to see me try out with him.

Bittle Waving Goodbye

The post Meet Bittle, an Advanced Open-Source Robot Dog by Petoi appeared first on The DIY Life.

Meet Bittle, an Advanced Open-Source Robot Dog by Petoi

---------- 4 ----------

3D Printed Wireless Joystick Controlled Animatronic Eyes

Title: 3D Printed Wireless Joystick Controlled Animatronic Eyes

Date: Tue, 12 Apr 2022 12:03:43 +0000


In this project, we’re going to be making a set of wirelessly controlled animatronic eyes. I’ve been wanting to do this project for a while, so when Quantum Integration launched their new Motor & Servo Driver board, this project immediately came to mind. Their new board is based on the PCA9685 driver chip, so you […]

The post 3D Printed Wireless Joystick Controlled Animatronic Eyes appeared first on The DIY Life.

Category: 3D Printing

Source: Michael Klements

In this project, we’re going to be making a set of wirelessly controlled animatronic eyes. I’ve been wanting to do this project for a while, so when Quantum Integration launched their new Motor & Servo Driver board, this project immediately came to mind. Their new board is based on the PCA9685 driver chip, so you can also build a similar setup using an ESP32 or Arduino if you’d like.

Here’s my video of the build, read on for the write-up:

What You Need For This Project

Equipment Used

Some of the above parts are affiliate links. By purchasing products through the above links, you’ll be supporting this channel, with no additional cost to you.

Designing & Printing The Animatronic Eye Components

I started out by drawing up a 3D model in Fusion 360. I knew roughly what I wanted the final set of eyes to look like, but naturally had to make a few tweaks along the way.

Fusion360 Animatronic Eye Model

I wanted the eyes to be able to move left and right as well as up and down, so I needed two servos for each of them. I also wanted to have eyelids that could blink, and in future maybe wink independently, so I needed another two servos for those movements as well. At the centre of each eyeball is a small brass universal joint and I’m going to use some cotton thread to connect each eyeball to the servos rather than using solid pushrods.

I had to go through a couple of trial prints to see what tolerances and clearances worked well. My first set of eyeballs was too big and got caught on the eyelids, but making them too small also left large weird looking gaps between the eyes and the eyelids, so that was also no good.

I also had to split the base to allow the screws that hold the eyelids to be installed so close together.

But eventually, I had a set of 3D prints that could be assembled into a working set of eyes.

3D Printed Animatronic Eye Components

If you’d like to 3D print your own eyes, the 3D model files for my projects are now available to my Patrons on Patreon or on my Etsy store.

Assembling The Eye Components

To assemble the eyes, we just need two small universal joints for 3mm shafts and some M2 screws and nuts.

M2 Screws and Universal Joints

These are the ones that were locally available for me. I’ve linked very similar ones in the parts list, but you might need to make some minor adjustments to fit the ones that are available to you. You’ll also some cotton thread or thin string to connect the eyeballs to the servos.

Let’s start by adding the thread to the eyeballs. We just need to glue a 10cm length of thread to four opposing inside edges of each eyeball. The eyeballs are round and don’t have any holes in them, so it doesn’t matter which four locations you choose, as long as they are equally spaced. I used a drop of superglue on the end of each length of thread.

Glue Threads Onto Back Of Eyeball

We can then press the universal joints into the 3D printed bases. Mine are a tight fit, but if yours are a bit loose you can secure them with a little bit of glue as well. Just make sure that you don’t get glue in the universal joint’s pins or it’ll lock up.

Press Universal Joint Into 3D Printed Base

Then we can push each of the eyeballs onto the universal joints as well.

Press Eye Onto Universal Joints

Now let’s add our eyelids. These pivot around some M2 screws in the holder on either side of each eye. Prepare the base by screwing these M2 screws into each side, with just one or two turns of thread exposed on the inside.

Screw Eyelid Screws Into Base Supports

A 3D printed pushrod is then going to be connected between each eyelid and the servo behind it to open and close it. The top pushrod is the longer one with a small extension on it to connect to the bottom pushrod.

Screw Pushrods Into Eyelids

The screws need to be adjusted a bit, you want them tight enough that they hold the components in place, but still allow free movement. You might need to iteratively tighten or loosen them to get them right.

Pushrods Assembled Onto Eyelids

Place the set of eyelids between the screws on the base and slowly tighten them until the eyelids are held in place. Make sure that the screws don’t protrude too far on the inside of the eyelids and touch the eyeballs.

Assembled 3D Printed Components And Eyeballs

The pushrod should be free and easy to gently push and pull to open and close the eyelids.

Pushrods Should Be Easy To Open and Close Eyelids

Once we have our eyes and eyelids assembled, we can add our servos. I’m using 6 micro servos, three for each eye. 

These are just glued into place on their supporting faces as they’re shown in the model. Install the servos on both base assemblies with the second eye being a mirror image of the first.

Glue 3 Servos Onto Each Eye Assembly

Lastly, tie the cotton thread to your two front servos. This was quite a fiddly job – make sure that you tie them off so that there is a bit of tension on the eye to stop it from wobbling. Also, don’t screw the white control arms onto the servos yet as you might need to adjust them once the servos are powered and centred.

Servos Connected To Eyeball and Eyelids

With that done, the eyes are now complete and are ready to add the electronics to.

Connecting The Electronics

As I’m using the Quantum Integration system, I need a build base to wirelessly control the eyes and I’m going to use one of their four new DIY kits, the Motor and Servo Driver to drive the servos.

Quantum Integration Builder Base

The Motor & Servo driver board allows you to control up to 8 servos and 4 motors with the I2C interface on your builder base, so it’s perfect for the 6 servos used in our project. The boards come as a kit with all of the surface-mounted components pre-soldered, you just need to add the through-hole ones.

Quantum Integration Motor And Servo Driver Board

Once the board is assembled, we can pair up the driver and builder base and plug in our servos. As I mentioned earlier, the driver uses the I2C interface, so we just need to make connections between the 5V, GND, SCL and SDA pins on each. The builder base is going to get its power through the servo driver board, so we only need to supply power to the driver board, which we do through the 5V and GND pins on the left of the board.

Note: You don’t actually need the jumper between 5V and VM that I’ve used as the servos are powered through the 5V supply. VM only supplies power for the DC motor outputs.

Connecting Power Jumpers To Motor and Servo Driver Board

Then just plug the servos into the driver board and we can then move on to programming it. I’ve connected the servos on outputs 1-6 as below:

  • 1 – Left Eye – Left Right
  • 2 – Left Eye – Up Down
  • 3 – Left Eye – Blink
  • 4 – Right Eye – Left Right
  • 5 – Right Eye – Up Down
  • 6 – Right Eye – Blink
Completed Electronic Components

Creating The App and Firmware

Now let’s log into our Q-Server and have a look at the App to control the eyes. 

Quantum Integration Animatronic Eye App

We’d got two joystick inputs on the left, one for the left stick and one for the right stick. The x and y axis on the left stick will control the eye movement and the button on the right stick will control the blinking.

These then feed into the three controls on our web dashboard, so that we can control the eyes from the web interface as well. We have two analogue sliders, one for the left and right movement and one for the up and down movement, and then a button to blink.

The web controls then feed into some ranging blocks which set directions and travel limits for the servos and then finally feed into each of the six servos on the right. So we have the left and right movement servos at the top, the up and down movement servos in the middle and the blinking servos at the bottom.

Lastly, before we run the app, we need to create our builder base firmware to tell the builder base which servo is connected to which driver output. These are identified by a channel number for each servo object as follows:

  • Servo 1 – Channel 3
  • Servo 2 – Channel 2
  • Servo 3 – Channel 1
  • Servo 4 – Channel 0
  • Servo 5 – Channel 15
  • Servo 6 – Channel 14
Builder Base Firmware

I started out by only enabling a single eye to test the App and firmware. It looked like the eye movement was set up nicely and the blinking worked well too.

Testing A Single Eyeball's Movement

We can now finish off the build by screwing the two bases together and marking the eyeballs with a pupil using a black Sharpie. If you’ve printed the eyeballs with the back surface on the print bed then the concentric circles of each layer can be used as a guide for marking the pupils.

Screwing The Base Together
Drawing on the Pupils With Sharpie

The Completed Eyes & Final Thoughts

Completed Eyes

Overall I’m quite impressed with how well these animatronic eyes turned out. The blinking works better than I expected it, and the cotton thread to the eyes holds up really well as a cheaper alternative to solid pushrods. I definitely think that solid pushrods are a more robust solution, but these work perfectly for a short term solution. 

Let me know what you think of them in the comments section below.

The post 3D Printed Wireless Joystick Controlled Animatronic Eyes appeared first on The DIY Life.

3D Printed Wireless Joystick Controlled Animatronic Eyes

---------- 5 ----------

All-In-One Indoor Air Quality Monitor With CO2 Sensor

Title: All-In-One Indoor Air Quality Monitor With CO2 Sensor

Date: Thu, 10 Mar 2022 11:23:35 +0000


In this project, we’re going to be making an all-in-one indoor air quality monitor with an IOT dashboard using an infrared CO2 sensor from DFRobot and a BME280 environment sensor. CO2 is a colourless and odourless gas that is a by-product of combustion, produced by gas heaters and stoves, and also by metabolic processes in […]

The post All-In-One Indoor Air Quality Monitor With CO2 Sensor appeared first on The DIY Life.

Category: 3D Printing

Source: Michael Klements

In this project, we’re going to be making an all-in-one indoor air quality monitor with an IOT dashboard using an infrared CO2 sensor from DFRobot and a BME280 environment sensor.

CO2 is a colourless and odourless gas that is a by-product of combustion, produced by gas heaters and stoves, and also by metabolic processes in humans and animals. It typically exists in a concentration of around 300-400 ppm (parts per million) outdoors, but when the average adult exhales, they can produce a concentration almost 100 times greater than this. With poor ventilation, the CO2 concentration in an indoor space can build up quite quickly. Early signs of increased concentrations of CO2 include the inability to concentrate and tiredness, while high concentrations of CO2 can lead to headaches, dizziness and even difficulty breathing, and eventually loss of consciousness.

Ideally, we’d like to keep the concentration of CO2 in an indoor environment below 1,000 ppm, anything above this starts to lead to drowsiness and impaired concentration and the upper limit for what is considered to be safe is 5,000 ppm – so that’s actually the upper limit for our infrared CO2 sensor – since it has been specifically designed for this sort of use.

Gravity Infrared CO2 Sensor

Our CO2 sensor uses infrared light to measure the concentration of CO2 within the air and then produces a 0-2V analogue signal.

DF Robot Firebeetle ESP32-E Microcontroller

We’re going to read this signal using an ESP32 based microcontroller by DFRobot called a Firebeetle board. I’ve used one of these boards previously for my weather station because they have a great range of IO, integrated WiFi and Bluetooth connectivity and they’re designed to be power efficient. They even include a battery charging circuit and a JST connector plug for a lithium-ion or lithium-polymer battery.

I’m going to be using the board’s WiFi connectivity to send the measured data to Prometheus, which is an online time-series database, and I’ll then be creating a dashboard to view the data using Grafana. This dashboard will be able to be accessed on any internet-connected device with a browser and will allow time-based trends of the data to be created. I also want to include some local indication on the device so I’m going to be doing that with an I2C OLED display.

BME280 Sensor and I2C OLED Display

Finally, since I’ve already got a microcontroller and display, it would be good to measure some other environment metrics as well, so I’m going to also include a BME280 temperature, pressure and humidity sensor.

Watch my video of the build here, or read on for the full write-up:

What you Need For This Project

To complete this project, you’ll need the following main components in addition to basic wiring, header pins etc.:

Designing And 3D Printing The Housing

My goal is to build all of the components into a single desktop or wall-mountable device that I can power using a USB outlet and move around the house if I want to.

I quite like the futuristic look of the CO2 sensor, so I’m going to make the front cover of the housing clear so that we can see into it, and see the microcontroller, display and sensors. So for this reason it would be good to mount the four boards in a flat, rectangular layout as shown below.

Arrange The Boards In A rectangular Shape

I designed the case in Fusion360, using a simple layout with 3D printed standoffs to mount each of the four components.

Fusion360 Design of Case

I then added a screw on a clear acrylic cover to the front. I also added some ventilation holes along the top and a cutout for the USB cable on the side.

Fusion360 Case Design With Cover

I 3D printed the case in black PLA. It’s just a single print and I didn’t need to add any supports as the cutouts are relatively small and are rounded at the corners. This depends on your printer’s abilities but I think most printers would cope with these small overhangs without requiring any print supports.

3D Printed Case On Kywoo Tycoon Slim

I laser cut the front cover from 2mm clear acrylic.

Laser Cutting The Side Panels

The front cover is a basic rectangular shape with the same profile as the housing and I’ve added a cutout for the CO2 sensor and one for the BME280 sensor so that they’re both exposed to the outside air.

3D Printed and Laser Cut Components

Making Up A Wiring Harness

Before I install all of the components into the case, I’m going to make up a wiring harness to connect them together. The display and BME280 sensor both use the I2C interface to send and receive data and the CO2 sensor just needs a power supply and a connection to one of the analogue inputs.

Here is a basic wiring diagram for the connections:

Air Quality Monitor Wiring Diagram

I initially used analogue input A4, shown in the subsequent photos, but I moved this to A0 as A4 doesn’t work when using WiFi on the Firebeetle board.

One important note is that the CO2 sensor requires a 5V supply. Its analogue output is compatible with 3.3V microcontrollers as it doesn’t go above 2.0V, but it still requires 5V to power it. For this reason, I’m going to be powering the sensor with 5V directly from the USB supply, while the display and BME280 sensor will be powered using 3.3V from the Firebeetle’s onboard regulator.

I made the wiring harness up using coloured ribbon cable as well as male and female header pins and I added some coloured heat shrink over the soldered connections.

Wiring Harness To Connect Components Together

Installing The Components In The Case

With the standoffs already 3D printed on the housing, it’s relatively simple to install all of the components in the case.

I’m going to start by using some M3 brass inserts to make the M3 screws that hold the lid in place a bit more durable. These are just melted into place in the printed pockets using a soldering iron which I’ve set to 200 degrees – which is about the same temperature as the PLA filament is printed at.

Melting Brass Inserts Into Place

I’ll use a range of small screws to hold the boards in place, mostly M2.5 x 6mm screws, with the wiring running below the boards as far as possible. Make sure that you plug your connectors onto the correct pins and that they’re the right way around or your might damage your boards when you supply power to them.

Installing Components Into The Case

With that all done, we can now close up the case using four M3x8mm button head screws and move on to programing our Firebeetle board.

Programming The Firebeetle ESP32-E Board

I’ve written up an Arduino sketch that takes readings from each of the sensors every minute and then updates the display and uploads the data to Prometheus.

Indoor Air Quality Monitor Arduino Sketch

You can download the code from my Indoor Air Quality Monitor Github repository.

The posting to Prometheus part of the code is largely based on the example provided on the Grafana Cloud information page, which is linked to a GitHub repository called IoT with Arduino and Grafana.

There is a bit of setup involved in the code as you’ll need to set up your WiFi details as well as your Prometheus configuration information. The IoT with Arduino and Grafana repository explains this all in detail with screenshots, so head over to their repository if you need some additional help. Essentially, you need to update the config.h file to include your WiFi network name and password as well as your Grafana Cloud Remote Write Endpoint address, your Username and your API Key.

Once that is all done, you can upload the sketch and you should then start seeing some information being displayed on the OLED display and on your serial monitor.

Using The Indoor Air Quality Monitor

The CO2 sensor needs around 3-5 minutes to pre-heat, during which time it’ll give a reading of about 0.2V and it’ll then start producing a voltage between 0.4V and 2.0V, which corresponds to a CO2 concentration of 0-5000ppm.

Air Quality Monitor

I’ve set up the code to recognize these voltages and to indicate that the CO2 sensor is preheating before a reading is displayed.

CO2 Sensor Preheating

While preheating, we can still see that we’ve got readings from our BME280 sensor for the environment temperature, pressure and humidity.

After about 3 minutes, the CO2 concentration has now shown up on the display.

Indoor Air Quality Monitor Running

I’ve created a Grafana dashboard with an instantaneous gauge for each of the four metrics along the top and then a time-based trend below them.

Grafana Dashboard For Indoor Air Quality Monitor

The CO2 sensor hasn’t really picked up many spikes in CO2 concentration but it is currently being used in a fairly large living space and we tend to keep some windows or doors open during the day for fresh air.

You can read up a bit more on creating dashboards and visualisations in Grafana from my full Grafana tutorial.

So we’ve now got a portable indoor air quality monitor that we can leave in any room to monitor the air quality and we can access remote logs and trends of the data through any internet-connected browser.

Indoor Air Quality Monitor Using DF Robot CO2 Sensor

Let me know what you think of my Air Quality Monitor in the comments section and let me know if there is anything you’d add to it or change.

The post All-In-One Indoor Air Quality Monitor With CO2 Sensor appeared first on The DIY Life.

All-In-One Indoor Air Quality Monitor With CO2 Sensor

---------- 6 ----------

DIY 4G Air Quality and Environment Monitor – Record Data Anywhere

Title: DIY 4G Air Quality and Environment Monitor – Record Data Anywhere

Date: Tue, 14 Dec 2021 12:20:22 +0000


In this project, we’re going to use the Maduino Zero 4G by Makerfabs to make an air quality and environment monitor that transmits the recorded data wirelessly over a 4G mobile network to a Thingspeak dashboard. Watch my video of the build or read on for the step by step instructions: The Makerfabs Maduino Zero […]

The post DIY 4G Air Quality and Environment Monitor – Record Data Anywhere appeared first on The DIY Life.

Category: 3D Printing

Source: Michael Klements

In this project, we’re going to use the Maduino Zero 4G by Makerfabs to make an air quality and environment monitor that transmits the recorded data wirelessly over a 4G mobile network to a Thingspeak dashboard.

Watch my video of the build or read on for the step by step instructions:

The Makerfabs Maduino Zero 4G LTE

A couple of weeks ago, Makerfabs sent me their Open Wind Station to try out. It’s a compact Arduino compatible device that records temperature, humidity, pressure, wind speed and air quality information and uses a mobile network to transmit the data to a remote database or cloud service.

Makerfabs Open Wind Station

Unfortunately the built in A9G chip only works on a 2G mobile network, all of which have been decommissioned in Australia for a few years now.

Inside the Open Wind Station

But fortunately, they have been working on an alternative – the Maduino Zero 4G LTE. This new board uses a more modern SIM7600 chip which operates on a 4G network. They say can reach upload speeds of up to 50Mbps and download speeds of 150Mbps.

Maduino Zero 4G SIM7600E

The best part about this board is that it is also a fully programmable Arduino compatible microcontroller with 12 digital IO pins, 6 analogue pins and an I2C interface. So it’s perfect for projects that require data to be sent to or from a remote location. You can set this up anywhere that you have 4G coverage and have full control over it from any internet connected device.

Back of Maduino Zero 4G

Some of the Maduino’s features include:

  • LTE Cat-4, with upload speed of up to 50 Mbps and download speed of up to 150 Mbps
  • GNSS positioning
  • Arduino IDE compatible
  • Dual USB type-C ports, one for MCU programming/UART, the 2nd for SIM7600 USB connection
  • Audio Driver – NAU8810
  • Dial-up supports, phone, SMS, TCP, UDP, DTMF, HTTP, FTP
  • Dual SD card slots
  • USB supply voltage: 4.8-5.5V, 5.0V typically
  • Battery supply voltage: 3.4-4.2V, 3.7V typically
  • Onboard charger, up to 1A charge current
  • Overcharge protection(OCP), 4.3V
  • Over-discharge protection(ODP), 2.5V

What You Need For This Project

Equipment Used:

Some of the above parts are affiliate links. By purchasing products through the above links, you’ll be supporting this blog, with no additional cost to you.

Testing The Maduino Zero 4G And Sensors

Now that we’ve taken a look at the Maduino Zero 4G, we’re going to use it to make an air quality and environment monitor. I thought it would be good to take the wind and air quality sensors from the Open Wind Station and integrate these with the new Maduino Zero 4G board.

Sensors To Be Used For Air Quality Station

I’m also going to add some additional grove DHT11 and BMP280 sensors to create a truly wireless air quality and environment monitor. These two sensors are just taken from the Grove Beginner Kit and already have the supporting electronics built into them so they just have a three or four wire interface to the Arduino.

We also need to add some pin headers to the Maduino board so that we can plug our sensors into them. The board comes with male pins but I’d prefer to use female pins so that there are fewer exposed pins within the case when it is complete.

Female Pin Headers For Maduino Zero 4G

I just cut these from some lengths of female header strips and soldered them into place on the top side of the board.

Soldering Pins To Maduino Zero 4G

I’m going to do a trial assembly of the components on a breadboard to start with because the original sensors operate on 5V while the Maduino Zero 4G operates on 3.3V, so there is a chance that they won’t even work with it.

I’ve connected the sensors to the same pins that they were connected to on the Open Wind Station so that the original code doesn’t need to be completely re-written for the new system.

Sensor Connections

The sensor connections are:


  • 5V – 3V3
  • GND – GND
  • Data – A0


  • VCC – 3V3
  • GND – GND
  • Data – D13


  • GND – GND
  • VCC – 3V3
  • SCL – SCL
  • SDA – SDA


  • Sens VCC – 3V3
  • Sens GND – GND
  • Sens Data – A1
  • LED VCC – 3V3
  • LED On/Off – D10

Now we just need to add the sim card to the tray at the back and plug the three antennas into the connectors on the front.

Plug In Sim Card

We’ve got it all assembled, now we just need to program it. 

Programming The Maduino Zero 4G

I’ve created a sketch using two examples sets of code, one being the 4G example code that Makerfabs have put together for the Maduino Zero 4G and the other being the original code for the Open Wind Station.

Here is the code if you’d like to try it on your Maduino:

The original code has the calculations and settings for the sensors, although I suspect that I might need to re-calibrate these at some stage as my change in cycle time will change the wind speed calculation and the lower voltage probably affects the brightness of the air quality sensor’s LED and its analogue output.

In any case, running the sketch on the breadboard setup seems to work correctly and I’m able to see some values from the sensors, so that looks promising.

Arduino IDE Sensor Values

I have created a new Thingspeak channel with it’s own write API key which will need to be copied into the sketch. This key allows the Arduino to write the data to the Thingspeak channel and it can then be accessed through any internet connected browser.

I added a gauge and chart widget for each of the fields/sensors and scaled them according to the expected values.

Thingspeak Dashboard Empty

If you’d like a more detailed look into how to publish data to Thingspeak, have a look at my 3D Printed Weather Station project. The sketch in this project uses a more user-friendly Thingspeak library.

3D Printing A Case To Hold The Components

Now that we’ve got the electronics working, we need something to mount it in. So, I’m going to use Tinkercad to design a case to hold the board and sensors in such a way that it can be mounted onto a 25mm pole.

Tinkercad Making Model

The case consists of 3 parts, the main body, a cover plate and a bracket. I’ve also made up a bracket to mount the anemometer onto the end of the pole. The components were all printed in PLA on my Ender 3 V2.

Case For Air Quality Monitor

Assembling The Air Quality & Environment Monitor

Let’s start by installing the bracket onto the back of the case. The bracket is held using two M4x8mm screws and nuts. The nuts fit snugly into the cavities in the bracket. A small M3x12mm screw is then used to lock the bracket into place on the pole by pressing against an M3 nut in the cavity on the inside of the bracket.

Adding Bracket To Back

The board is then held in place with some M2 screws and the sensors and components then fit in around it.

Installing Maduino Zero 4G Into Case

I was initially going to add the original battery from the Open Winder Station, but it’s only 1,000mAh, and I suspect this 4G board is going to draw a lot more power than the original one, so this probably won’t provide much benefit. I’ll instead use a USB cable to power it from a 30,000mAh power bank.

All Components Installed

I’m going to be using this in a partially covered area, so it doesn’t need to be rain proof, but I designed a couple of vent covers just in case it does get a bit wet if there is a lot of wind. I just stuck these on with some epoxy adhesive.

Vent Covers Installed

The anemometer is mounted onto the end of the pole using the 3D printed bracket, which is also held in place with an M3x12mm screw and nut.

Adding The Anemometer To Top Of Pole

We can then slide the main control board onto the pole underneath it and tighten the M3 screw to lock it in position.

Installing Case Onto Pole

The anemometer is then plugged in using the 4 pin connector.

Plugging Anemometer Into Controller

Testing The Maduino Zero 4G Air Quality & Environment Monitor

I decided to first test the power consumption to see how long it would last on my power bank. My USB power meter showed that it used around half an amp fairly consistently.

USB Power Meter

So my 30,000mAh power bank should power it for about 40 hours. If you’re going to be using it for longer periods of time then you’ll probably need to use a mains adaptor or solar power to keep it running.

Now let’s get it mounted outside and start recording some data.

DIY 4G Air Quality and Environment Monitor - Record Data Anywhere

After a few hours it looks like we’re consistently getting data from all of the sensors.

PM2.5 Readings and Wind Speed

The air quality reading definitely looks to be a bit higher than what I was expecting, so I’ll need to work on calibrating that. 

The wind speeds looks about right when I compared it to my other anemometer after a couple of days of use.

Anemometer Turning

Let me know what you think of the Maduino Zero 4G in the comments section below. Do you have any project ideas for a 4G Arduino?

Speaking of other ideas, you can actually also use this device to provide a 4G internet connection to your computer or Raspberry Pi and you can use it as a fully functional mobile phone to make calls. So there are a lot of options for it.

Makerfabs Maduino Zero 4G

The post DIY 4G Air Quality and Environment Monitor – Record Data Anywhere appeared first on The DIY Life.

DIY 4G Air Quality and Environment Monitor – Record Data Anywhere

---------- 7 ----------

3D Printed IoT Weather Station Dashboard

Title: 3D Printed IoT Weather Station Dashboard

Date: Wed, 27 Oct 2021 10:52:48 +0000


This is my dashboard for my 3D Printed IoT Weather Station project, you can build your own by following my build guide. You can also view the data on my public Thingspeak Channel. Temperature Humidity Barometric Pressure Wind Speed Light Level

The post 3D Printed IoT Weather Station Dashboard appeared first on The DIY Life.

Category: 3D Printing

Source: Michael Klements

This is my dashboard for my 3D Printed IoT Weather Station project, you can build your own by following my build guide.

You can also view the data on my public Thingspeak Channel.



Barometric Pressure

Wind Speed

Light Level

The post 3D Printed IoT Weather Station Dashboard appeared first on The DIY Life.

3D Printed IoT Weather Station Dashboard

---------- 8 ----------

I Upgraded My 3D Printed Weather Station Using Your Suggestions

Title: I Upgraded My 3D Printed Weather Station Using Your Suggestions

Date: Wed, 27 Oct 2021 10:52:33 +0000


Today we’re going to be making some upgrades to my previously built IoT weather station using suggestions that you guys made in the comments section. We’ll see how well the weather station performs after the upgrades and I’ve included a link to the public Thingspeak channel, so you can have a look at the most […]

The post I Upgraded My 3D Printed Weather Station Using Your Suggestions appeared first on The DIY Life.

Category: Arduino Projects

Source: Michael Klements

Today we’re going to be making some upgrades to my previously built IoT weather station using suggestions that you guys made in the comments section. We’ll see how well the weather station performs after the upgrades and I’ve included a link to the public Thingspeak channel, so you can have a look at the most recently recorded data.

Here’s my video of the upgrades I’ve made, read on for the written guide:

Upgrade Components Needed

In addition to the components that we’re going to re-use from the last project, you’ll need the following:

I also use the following tools and equipment in this build:

What Hardware Are We Going To Be Replacing?

Let’s start off by taking a look at what hardware we’re going to be replacing within the original weather station.

3D Printed Weather Station Internals

The original build used a DHT11 temperature and humidity sensor. Quite a few people mentioned that this sensor isn’t particularly accurate and is quite slow.

DHT11 Temperature and Humidity Sensor

Most suggested replacing it with a BME280 sensor, so that’s what we’re going to do. This sensor measures temperature, humidity and pressure, so I can also remove the separate pressure sensor from my original build. I’ll leave the light sensor at the top in place.

BME280 Temperature, Pressure and Humidity Sensor

The next change that was suggested was again made by a number of people, and that was to replace the reed switch on the anemometer, or wind speed sensor, with a Hall Effect sensor. The reed switch, being a mechanical device, has a limited number of operating cycles before it wears out. Given that it could be switching up to 150,000 times a day, it probably won’t take too long to wear out either.

Anemometer Reed Switch

I haven’t used a Hall Effect sensor on a project before, and there are quite a few different options available, so the one I choose was an Allegro A3213. This sensor is polarity independent and has a latched digital output, so it’s quite a good fit as a replacement for a reed switch.

Allegro A3213 Hall Effect Sensor

The final hardware change that I’m going to make is to replace the original 1850 lithium-ion cell with a higher capacity 3000mAh lithium polymer cell. This cell will give the station about 30-50% more energy storage capacity, so it’ll be able to run longer between charges. It also has built-in overcharge and over-discharge protection.

Replace 18650 Cell With 3000mAh Lipo

While we’re on the topic of powering the weather station, I’m going to be adding a solar panel and solar power management board nearby to re-charge the battery. This isn’t a modification to the actual weather station as such but is another useful addition.

5V Solar Panel To Charge Station

Replacing The Weather Station’s Sensors & Battery

I’m going to install the BME280 module with the sensor facing towards the stand. This allows me to re-use the original sensor’s mounting holes and I won’t have to modify the sensor pints. This also shields it from any direct sunlight that manages to get into the housing and gives it a bit more protection from moisture. The sensor is still spaced slightly away from the stand, so there aren’t any pockets of air trapped around it.

Mounting BME280 Sensor

Replacing the reed switch with the Hall Effect sensor is a bit more involved. I have to first remove the reed switch, which I moulded in place with resin because I didn’t intend to ever remove it. I also didn’t want to have to print a whole new housing just for the new sensor.

After a couple of failed attempts, a drill eventually worked to crack the switch’s glass tube and I could then pull out all of the pieces. I also cracked the top of the housing in the process, but fortunately, resin prints repair quite well with additional resin, so that’ll be an easy fix.

Removing The Reed Switch

I soldered some wiring to the sensor before installing it in the housing so that I can again pour some resin around it to hold it in place and seal off the top of the sensor housing. It’s important to make a note of the wire colours connected to each leg of the sensor as you’ll need this when connecting them to your Firebeetle board.

Soldering Wiring To The Hall Effect Sensor

I bent the legs of the Hall Effect sensor at 90 degrees about 3mm from the sensor so that they could be directed through the hole in the housing and the face of the sensor would then be facing towards the bottom of the anemometer.

I shouldn’t need to do anything with the magnets in the anemometer, if they worked for the reed switch then they should easily work with the Hall Effect sensor as well, as they’re typically a bit more sensitive.

Hall Effect Sensor In Place

I then filled the void and area around the sensor with some resin to hold it in place. I then left this outside in the sun for a few hours to cure before lighting sanding it with my Dremel for an even finish.

Hall Effect Sensor Moulded Into Place

Now that the sensors are in place, we can make up a new wiring harness to connect them to the Firebeetle board. I also made some changes to the wiring to power the sensors. Rather than connect them directly to power and have the sensors stay on the whole time, a suggestion was made to turn the sensors on and off using the IO pins, as they don’t draw much current.

So I’ve got the BME280 sensor’s power pin (VIN) connected to digital pin 16 and the light and Hall Effect sensor’s power pins connected to digital pin 17. This means I can now turn the sensors on only when measurements are taken, so this should further extend the battery life.

The other connections remain as per the original design. The BME280 sensor is connected to the I2C pins, the light sensor to pin 36 and the Hall Effect sensor to pin 0 on the Firebeetle board.

New Wiring Harness For Firebeetle Board

Improvements Made To The Code

Now that we’ve got the sensors connected up to the board, we obviously need to make some changes to the code so that they can be used.

Here is my revised version of the code:

The first and probably most significant is a look-up table for the wind speed. Ian Finnimore had a number of ideas to improve this part of the code, pointing out that the relationship between the wind speed and the rotation time is not linear. He also included a formula to use as a starting point. I used this along with some measured data to eventually calibrate the sensor, and the code now uses this lookup table to find the actual wind speed based on the rotation time. This also allows calibration adjustments to be made to select individual speeds or the complete range.

Wind Speed Calibration Map

I also reduced the cycle time to about 8 seconds, as this is all that is needed by the wind speed sensors. Even at the lowest measurable wind speed, the anemometer would rotate at least three times during this period, which is enough for the calculation.

Next I made the changes to the digital pins to turn the sensor on and off as they’re needed, rather than staying on all of the time. This just involved setting each sensor’s digital pin high a little before taking the reading from them and then turning them off again.

Lastly, I moved the WiFi connection right to the end of the cycle so that the WiFi connection isn’t active for the full cycle time, which saves power. I also added a timeout to the WiFi connection attempt routine. In my previous code, the board would stay on and keep attempting to connect to the WiFi network even if it was temporarily unavailable or there was an error. Getting stuck in this loop obviously dramatically drained the battery and resulted in the station dying in a day or two if it occurred. It’ll now try for only 10 seconds and if there is no connection available it’ll timeout and go to sleep anyway.

Testing The Weather Station’s New Power Consumption

We’ve made a few improvements to the hardware and software, which should result in lower power consumption, especially during the sleep period, so let’s test it.

I connected my multimeter to the supply and turned the board on.

The current draw spikes to a little over 100mA when starting up and then quickly settles around 45-55mA while it is taking readings, which is for the majority of the “on” period.

Current Draw When Running

The most significant improvement was during the sleep period. It now goes down to just 0.01mA or 11µA, which is a large improvement over the last version. This is using almost 100 times less power during sleep mode than the previous version.

Note that the multimeter below is now in µA rather than mA shown above. So this is 11.3 thousandths of a mA.

Current Draw During Sleep Mode

So if we calculate the expected battery life using a 10 minutes cycle time, with 10 seconds of “on” time and 590 seconds of “sleep” time in each cycle, and an average draw of 60mA while on, with the new battery we should get a little under 3000 hours or 124 days of run time. So that’s around four months off a single charge, which is also a great improvement.

Run Time Calculation

Mounting And Adding Solar Power

I previously mounted the weather station directly onto a flat surface using the three feet on the base. This time, I want to rather mount it onto a pole so that there are no flat surfaces around it to affect the wind speed and I want to add a solar panel mount onto the same pole.

So I designed and 3D printed a bracket to mount the weather station onto a 25mm pole, which is easy to then mount onto a railing or fence post.

Now I know that improving the battery life means that it hardly ever needs to be charged, but to make it a truly plug-in and forget weather station, I wanted to add a solar panel so that the battery is kept charged without me having to remember to charge it.

I’m using this 5V panel which I have from a previous project. It claims to be a 1A panel, but that seems a bit optimistic for its size. In any case, it’s way more than what we need to replace the 25 or so milliamp hours used each day. It’ll work well to provide some additional capacity for longer periods of overcast days and allow for a drop in efficiency over time.

5V Solar Panel To Charge Station

I’m going to use a DF Robot solar power management board to control the charging of the battery. This board basically takes the power provided by the solar panel and uses it to charge the battery and provide a regulated supply to the Firebeetle board.

DF Robot Solar Charge Controller

I’ve also made a 3D printed bracket and housing to hold the panel and the solar power management board and these will be installed on the same pole underneath the weather station.

The bracket for the solar panel and the holder for the solar power management board are glued onto the solar panel using some epoxy. I used four nylon standoffs to hold the board in place and provide supports for the cover.

Glued Into Place On Holder

The cover can then be held in place using four screws that came with the solar power management board.

Solar Power Management Cover

I drilled an 8mm hole in the bottom of the weather station base to run the wiring to the battery and to the Firebeetle board. Be careful drilling through resin prints as they’re quite brittle. It doesn’t take much force to crack them entirely (like I did with the sensor housing).

Drill Hole In Bottom Of Weather Station Housing

The solar panel bracket is then mounted onto the pole and the weather station is mounted onto the 3D printed bracket on the end of the pole. An M3 screw and nut are used to hold each in place, the nut sits on the inside of each bracket and helps press the screw against the pole to secure them. The wiring is fed through the base and then plugged into the battery and the Firebeetle board.

Assembled Components On Pole

Using The Modified Weather Station

I mounted the weather station’s pole outside and it has been running for about three weeks at the time of writing this post.

This is a sample of the temperature graph, you can view my full weather station dashboard here, or visit my public Thingspeak channel.

Since the weather station’s power consumption has gone down quite substantially, I’ve been thinking of trying to power it using some sort of supercapacitor arrangement rather than a battery.

Let me know if you’ve done this or if you’ve got any suggestions for this in the comments section.

The post I Upgraded My 3D Printed Weather Station Using Your Suggestions appeared first on The DIY Life.

I Upgraded My 3D Printed Weather Station Using Your Suggestions

---------- 9 ----------

Make An Arduino Tic Tac Toe Game With An AI Opponent

Title: Make An Arduino Tic Tac Toe Game With An AI Opponent

Date: Mon, 21 Jun 2021 12:06:25 +0000


Today we’re going to be building a Tic Tac Toe or Noughts and Crosses shield for an Arduino. The game board is made up of a 3×3 grid of RGB LEDs that light up green or blue to indicate the naughts or crosses. A keypad at the bottom of the shield, that corresponds to the […]

The post Make An Arduino Tic Tac Toe Game With An AI Opponent appeared first on The DIY Life.

Category: Arduino Projects

Source: Michael Klements

Today we’re going to be building a Tic Tac Toe or Noughts and Crosses shield for an Arduino. The game board is made up of a 3×3 grid of RGB LEDs that light up green or blue to indicate the naughts or crosses. A keypad at the bottom of the shield, that corresponds to the game board positions allows you to input each move. A status LED underneath the gameboard shows you which player’s turn it is and allows you to select one of the three game modes using the start button alongside it.

Tic Tac Toe Arduino Mega Shield

The game has 3 selectable game modes, the first is a turn-by-turn two-player mode that allows you to play against another person, the second is an easy level AI opponent and the third is an expert level AI opponent that is impossible to beat.

LED Gameboard on Tic Tac Toe Shield

You can watch my video of the build below, or read on for the full instructions to make your own Tic Tac Toe game shield.

How The AI Algorithm Works

The AI works on a minimax algorithm, which is a recursive algorithm aimed at minimising the possible loss for a worst-case scenario. The algorithm calculates the value of each state of the game by looking at all of the possible outcomes following each move.

For example, the top game board below represents the current state of the game, with the green player to play next. The second line indicates the three possible moves that the green player can make. Two of these states result in the green player winning, these are awarded a score of 10. The third state allows the game to continue, with blue taking their turn. There are two possible spots for blue to play, the first does nothing (nothing in this move, although we can see that in the next move green would win) and then second results in blue winning. So, a score of -10 is given as this is against the green player who is currently playing. A state which results in an eventual draw is given 0. The algorithm would therefore favour one of the first two game moves, and work against playing the third move which allowed the opportunity for the blue player to win.

Minimax Algorithm To Play Tic Tac Toe

This is an old algorithm which was been around since the early 1900s and can be applied to many two-player, turn-based games. It’s commonly used in computer-based chess games to this day.

AI Winning Game

With the AI running the minimax algorithm on the Arduino, it’ll always play the best possible move, so regardless of who starts, you won’t be able to beat it.

To make the game a bit more fun, as it’s not much fun losing or drawing games all the time, I’ve added a second mode that plays random moves for the first two plays before allowing the AI algorithm to finish off the game. This drastically reduces the AI’s ability to win and you’re left with the possibility of winning most games that you start and a fair number of games that the AI starts.

What You Need To Make Your Own Tic Tac Toe Shield

Amazon Affiliate Links

Banggood Affiliate Links

Making The Tic Tac Toe Shield

There are ways to use addressable LEDs to condense the IO to fit onto an Arduino Uno, but I already had a bunch of these RGB LEDs and an Arduino Mega lying around, so that’s what I used for this project. The shield makes use of 21 digital outputs for the LEDs and 10 digital inputs for the pushbuttons.

Arduino Mega

It is important that you get common cathode RGB LEDs as the PCB design incorporates a common GND and the IO switches high to turn them on. You can use common anode LEDs if you’ve got them already but you’ll need to modify the PCB to suit.

Designing The PCB

I sketched the circuit in Easy EDA and then designed a PCB as a shield that clips onto an Arduino Mega.

Schematic For Tic Tac Toe Shield

Each pushbutton has a corresponding 10-20K resistor and each LED has a 220-500 ohm resistor in series with it. I usually use slightly higher value resistors for the green legs of the LEDs as I find these are usually brighter than the blue and red legs. I didn’t connect the red legs of the LEDs on the gameboard as you only need to indicate two on states for each position.

Designing The PCB in EasyEDA

You can download my PCB gerber files to have your own PCBs made up:

I got the PCBs made up by PCB Way. They have a really easy-to-use instant quote and ordering system and you can get simple PCBs under 100mmx100mm made up from just $5 for 5 pieces.

The Finished PCBs from PCB Way

Soldering The Components Onto The PCB

Once the PCBs arrived, I got to assembling them.

LEDs, Pushbuttons and Resistors

I used 15K resistors for the switches, 390-ohm resistors for the blue and red LEDs, and 470-ohm resistors for the green LEDs.

I soldered all of the resistors in place first and then trimmed the legs off the back of the PCB.

Soldering Resistors
Cutting Off Resistor Legs

I then soldered the RGB LEDs into place. Make sure that the cathode (long leg) on the LEDs is placed into the hole with the small arrow underneath it.

Tic Tac Toe Shield PCB

Check all of the solder joints on the LEDs afterwards to make sure that there are no bridges across the pads or legs, they are really close together.

Soldering RGB LEDs Into Place

I also added some header strips to plug into all of the pins on the Arduino so that the shield is held in place firmly.

Arduino Mega Shield
Tactile Pushbuttons Soldered Into Place

Lastly, you need to solder the tactile pushbuttons into place. Make sure that you’ve got the orientation correct before you solder them.

Programming The Arduino

With the PCB done, we can get started with the programming.

I started out by getting a game board set up in a 3×3 array and adding some logic to get the two player mode working. This allowed alternating green and blue inputs until the board was full or one player had won across the rows, columns or two diagonals.

I used the number 0 to indicate a blank space, 1 to indicate player 1’s moves and 2 to indicate player 2’s moves. I set up the board to be displayed in the serial monitor for debugging.

Manual Game Mode Working In Arduino IDE

Once this was working I got started on the AI’s minimax algorithm. If you’ve ever used this algorithm before then you’ll probably know that it’s not that easy to debug. It took me a couple of hours to get it working, and it finally started producing meaningful results.

I had to add some simple logic to the first AI move in order to reduce the first move’s processing time. The Arduino, being a relatively slow computer, was taking a significant amount of time to work through all 255,168 possible game outcomes if it was to play the first move and also took a consiberable amout of time if it was playing the second move.

Minimax Algorithm Playing Tic Tac Toe On Arduino Mega

With my modification, the AI essentially now plays a corner as its first move unless it goes second and the human player has already played a corner, in which case it plays the center position. This logic reduces the number of possible game plays to a couple of thousand, which the Arduino has no problem calculating in a few milliseconds. You’ll notice in my video of the gameplay that the Arduino takes a bit longer to play its second move than it does to play subsequent moves. This is the Arduino “thinking” through all possible moves.

Once the AI player was working, I added the final game mode that just chooses random board positions for its first two moves and then allows the AI to take over. This results in a game in which you can quite easily win if you play first and still allows the AI to occasionally win if it goes first or you make a silly mistake. You could add a fourth mode that only randomly places the first AI move. This would increase the difficulty quite a lot but still allow you some chance of winning if the AI got unlucky with the placement of this move.

I then added a start animation and code to highlight or flash the winning lines and the programming was then complete.

You can download the final version of the code here:

Playing Tic Tac Toe On The Shield

You can now select a game mode when the Arduino is powered up by using the center top and bottom buttons on the gamepad to scroll up and down through the three modes and pressing the start game button to confirm the mode. The current mode is indicated by the RGB status LED:

  • Easy AI Mode – Green
  • Expert AI Mode – Red
  • Two Player Mode – Blue

Once in a game mode, the Arduino stays in the mode and just keeps refreshing the game board after each play. You can then keep playing in this mode until you reset it again.

Status LED and Game Mode Selection

Once a game mode is selected, the RGB status LED indicates which player’s turn it is. This is randomly generated for each game so that you don’t always have one player starting.

Playing Against The AI Opponent

You can then play out your game and the Arduino will highlight a winning line once it is reached or flash the whole game board if it is a draw.

AI Opponent Draw

Let me know what you think of the game and what you would do differently in the comments section below. Enjoy making your own one!

The post Make An Arduino Tic Tac Toe Game With An AI Opponent appeared first on The DIY Life.

Make An Arduino Tic Tac Toe Game With An AI Opponent

---------- 10 ----------

Making An Ultra Low Power Arduino Pro

Title: Making An Ultra Low Power Arduino Pro

Date: Mon, 08 Mar 2021 10:38:36 +0000


This 3.3V Arduino Pro Mini uses over 600 times less power than a traditional Pro Mini, using a couple of simple, low power, changes that cost around $2 to make. If you’ve followed some of my previous projects, then you may have seen that I have tried something similar before. Last year, we stripped down […]

The post Making An Ultra Low Power Arduino Pro appeared first on The DIY Life.

Category: Arduino Tutorials

Source: Michael Klements

This 3.3V Arduino Pro Mini uses over 600 times less power than a traditional Pro Mini, using a couple of simple, low power, changes that cost around $2 to make.

Making An Ultra Low Power Arduino

If you’ve followed some of my previous projects, then you may have seen that I have tried something similar before. Last year, we stripped down an Arduino Pro Mini by removing the power LED and the onboard voltage regulator until we were able to achieve a standby current draw of just 5 microamps at 3.7V.

Original Arduino Power Test

This method would work well for a range of applications, but not having a voltage regulator onboard has complications for voltage-sensitive devices and circuits, so we’re going to look at replacing it with a regulator which has a much better quiescent current.

Arduino Pro Mini Regulator and LED

If you don’t know what this means, the quiescent current is basically the current than a device consumes with no load or in a non-switching condition. So for a regulator, this would be the current being drawn by the regulator with no load connected to it.

Here’s a video of the modification process and results, read on for the write up:

What You Need For This Modification

How To Modify Your 3.3V Arduino Pro Mini

The standard regulator on an Arduino Pro Mini is typically a Micrel MIC5205.

Micrel MIC5205

This regulator is reasonably efficient under load, but is quite poor at low load. Meaning that it waste’s quite a lot of energy when the Arduino isn’t drawing much current from it. This is usually fine for general battery powered projects which run for a few minutes or even an hour or two, but it becomes a problem if you’re trying to build ultra low power projects which need to last a few months on a single charge of a battery.

So lets start by having a look at where we got to previously.

Unmodified Arduino Pro Mini

We started off by testing a standard 3.3V Arduino Pro Mini with no modifications and found that it drew 4.5 milliamps, or 4470 microamps, from the 3.7V battery when running the pre-installed blink sketch.

Power Consumption Before Any Changes

This isn’t much, but it means that a 3.3V Arduino Pro Mini would run for just under a month on a single 3000mAh battery.

Using Low Power Mode

We then used a low-power script to put the Arduino to sleep between blinking. This script makes use of a low-power library to put the Arduino’s Atmega chip to sleep between operations, which uses significantly less power than when it is awake.

Arduino Low Power Mode Sketch

If you’re building ultra-low-power projects then a key part of getting longer battery life is to look at how often information is measured and updated and to make use of the time between these operations to put the Arduino into a low power state. I’m not suggesting that you only take measurements once a day or once an hour, but even waking up to take measurements or check conditions for 1 second in every 10 seconds will make your batteries last almost 10 times longer than without sleeping.

I used this low-power library in my soil moisture monitoring stick project.

Battery Operated Devices Required To Be Low Power

This low power mode modification reduced the current draw to just 1.5 milliamps, or 1500 microamps, so we’ve got around a 3 fold improvement without doing anything to the hardware. Our single 3000mAh battery would now power our Arduino for a little under 3 months on a single charge.

Looking At The Hardware Under A Microscope

Next, we’re going to look at some hardware modifications which we can make to further reduce the power consumption. We’re going to be looking at the small surface mount components on the Arduino PCB, so I’m going to be using this 7″ LCD Digital Microscope which Dcorn have sent me to give you a closer look.

DCorn Microscope

If you enjoy tinkering with electronics and small PCBs then a microscope like this is a great workshop tool. Some of the close-up images and video footage has been recorded using this microscope.

Removing The Onboard Power LED

The next modification was to remove the onboard power LED. This little LED is on whenever the Arduino is powered, which is great when it’s on your bench, but just wastes power in an enclosure.

Arduino Pro Mini Power LED

Last time, we removed this LED by just clipping it off with some wire cutters, this time I’ll do it with a pencil heat gun.

Removing The Power LED With Heat Gun

This had a massive impact on the current draw, reducing it to 0.05 milliamps or 54 microamps. Which is a great result for something we probably wouldn’t have used anyway.

Power Consumption With Power LED Removed

So this was 25 times less power than in low-power mode. This translates to an additional 2900 days of run time on a 3000mAh battery, just by removing an LED which would have likely been covered anyway.

Removing The Voltage Regulator

We then found that removing the voltage regulator resulted in another significant improvement,

Arduino Pro Mini Power LED Removed

I removed the voltage regulator using the pencil heat gun again, taking care not to damage any of the surrounding components.

Removing Regulator With Heat Gun

The board now consumes just 6 microamps.

Power Consumption Without Regulator

So we can tell from this test that our regulator was using around 50 microamps by itself. So now we’re going to have a look at whether we can change this regulator for a more efficient one.

The regulator I’m going to be using is a Microchip MCP1700, which is a 3.3V 250mA regulator which is designed to have a low quiescent current.

MCP1700 Data

One thing to note with this regulator is that it is only rated for an input voltage of up to 6V, so you won’t be able to use it up to 12V like a standard Pro Mini. There is an alternative, the MCP1702, which has a slightly higher quiescent current but allows an input voltage of up to 13.2V. So if you need a higher input voltage then have a look at this as an alternative.

An issue with the onboard regulator on the Pro Mini is that it’s a bit of an uncommon form factor, having 5 legs. Most voltage regulators you’ll see look more like the MCP1700, having 3 legs. So we can’t just directly replace the one on board with a better one.

MCP1700 with MIC5205 Form Factor

But fortunately, there is an easy workaround. We’re just going to use a through-hole version of the MCP1700. It is a bit larger but has exactly the same characteristics as the smaller package.

Surface Mount and Through Hole Regulator

We still need to remove the surface mount one, which you can do with a pencil heat gun or just use clippers as I did previously.

We’re then going to connect the legs of the regulator to the VCC, GND and RAW pins on the Arduino.

Adding MCP1700 To The Arduino Pro Mini

Doing this takes the voltage supply being applied to RAW and GND and supplies the regulated 3.3V to the Arduino’s VCC circuit.

Now that we’ve done this, let’s have a look at whether our Arduino still works and how much power it now uses.

MCP1700 Installed On Arduino Pro Mini

So the blink sketch is still running and we’re now only using 7 microamps, which is substantially better than the 54 being used by the old regulator.

Power Consumption With MCP1700

So we’ve now got an Arduino that still has a regulated supply which is using 640 times less power than an original Arduino Pro Mini. This means that this Arduino would run for almost two years on a battery that would only power an original Pro Mini for a day, and it would run for almost 50 years on a single 3000mAh battery (if the battery would last this long)

Arduino Pro Mini Still Flashing

So you’ve now got more battery capacity available to power your other IO devices. You can also use batteries with a long shelf life, like non-rechargeable lithium batteries, to power your Arduino for 5-10 years without ever touching it.

Let me know in the comments section what you’d use one of these modified Arduinos to power.

The post Making An Ultra Low Power Arduino Pro appeared first on The DIY Life.

Making An Ultra Low Power Arduino Pro



Back to Top BACK TO TOP