Categories

How servo motors work and how to control servos using Arduino

Posted on Tuesday, April 24th, 2018 in Arduino, tutorials by DP | 1 Comment

p-Arduino-and-PCA9685-PWM-Servo-Driver-600

Dejan Nedelkovski over at HowToMechatronics shared detailed tutorial on how servo motors work and how to control servos using Arduino and PCA9685 PWM driver:

There are many types of servo motors and their main feature is the ability to precisely control the position of their shaft. A servo motor is a closed-loop system that uses position feedback to control its motion and final position.
In industrial type servo motors the position feedback sensor is usually a high precision encoder, while in the smaller RC or hobby servos the position sensor is usually a simple potentiometer. The actual position captured by these devices is fed back to the error detector where it is compared to the target position. Then according to the error the controller corrects the actual position of the motor to match with the target position.
In this tutorial we will take a detailed look at the hobby servo motors. We will explain how these servos work and how to control them using Arduino.

More details at HowToMechatronics.

Check out the video after the break. (more…)

#FreePCB via Twitter to 2 random RTs

Posted on Tuesday, April 24th, 2018 in Free PCBs by DP | No Comments

IRToy-600x369

Every Tuesday we give away two coupons for the free PCB drawer via Twitter. This post was announced on Twitter, and in 24 hours we’ll send coupon codes to two random retweeters. Don’t forget there’s free PCBs three times a every week:

  • Hate Twitter and Facebook? Free PCB Sunday is the classic PCB giveaway. Catch it every Sunday, right here on the blog
  • Tweet-a-PCB Tuesday. Follow us and get boards in 144 characters or less
  • Facebook PCB Friday. Free PCBs will be your friend for the weekend

Some stuff:

  • Yes, we’ll mail it anywhere in the world!
  • Check out how we mail PCBs worldwide video.
  • We’ll contact you via Twitter with a coupon code for the PCB drawer.
  • Limit one PCB per address per month please.
  • Like everything else on this site, PCBs are offered without warranty.

We try to stagger free PCB posts so every time zone has a chance to participate, but the best way to see it first is to subscribe to the RSS feed, follow us on Twitter, or like us on Facebook.

Taobao breakout boards are a mess part 2

Posted on Tuesday, April 24th, 2018 in Shenzhen by Ian | 1 Comment

HMC5883L

Last week we struggled with mislabeled and faulty breakout boards from Taobao. Fortunately purchases from Shenzhen sellers usually arrive the next day, so we’ve already got a bunch of replacement boards to test.

HMC5883L/QMC5883 digital compass

Last week our HMC5883L breakout turned out to have a non-compatible QMC5883 chip. We need the genuine part to do a demo so we purchased four more from different suppliers. Each supplier confirmed that the breakout has an original HMC5883L, not the guochan (locally produced) QMC5883.

Of the four boards, only one has a genuine HMC5883L. The only seller with the original part actually offered the option of a guochan version for around 10RMB, or the original for around 40RMB. All the other breakouts came with a QMC5883 and cost around 10-15RMB. There are dozens of listings for this breakout on Taobao for around 10RMB, it’s safe to assume they’re all actually using a QMC5883.

circle

One of the sellers of the QMC5883 boards strenuously argued that the part was real and drew a helpful circle on our photo pointing out the model number. We countered with a photo of the chip markings compared to an original. At this point someone higher in the support chain, probably the boss, confirmed that “everyone” switched to the cheaper Chinese chip a year ago, and that buyers all know this. Now we know too.

SHT21 temperature and pressure sensor

SHT21

First, a correction from last week. We made a pretty basic mistake reading the SHT21 datasheet. The measurement resolution control of the configuration register is split into bits 7 and 0, not 7 and 6. After recognizing this the default value 0x3A is realistic.

Read correctly, bit 6 (0) correctly shows VDD > 2.25volts, the heater is disabled (bit 2=0), and OTP Reload is disabled (bit 1=1). Embarrassing, but an encouraging sign things are looking up.

SHT21

That leaves the issue of the impossibly high and definitely incorrect humidity measurement. We purchased a replacement SHT21 from Youxin, the original vendor, and samples from two other Taobao sellers.

All three breakouts work as expected, but on closer examination the board on the far right is actually an HTU21, not a Sensirion SHT21. HTU21 is a drop in replacement for the SHT21, but much cheaper. An Sensirion original is around 30RMB ($5), while the HTU21 is just 10RMB (~$1.50). The seller marked it as an SHT21 original and charged the market rate for an original (~35RMB). An extraordinarily low price consistently means non-original parts, but unfortunately a reasonable market price isn’t a reliable indicator of genuine parts.

It’s probably not a scam

The confusion probably starts with first line support reps that don’t know what they’re selling. If it says HMC5883, it must be HMC5883, right? Another part is being an informed consumer. If the original goes for 40RMB, the 12RMB version is going to be a substitute. This is obvious now, but the sheer volume of mislabeled listings makes it really hard to get a handle on a reasonable market price.

Taobao offers a huge selection of inexpensive parts, and next day delivery is usually around $1. That’s really amazing! However, getting multiples of everything to ensure at least one is genuine probably costs more than buying from a western-facing supplier like Seeed Studio, SparkFun or Adafruit.

The K7TMG HF Morse code temperature beacon

Posted on Monday, April 23rd, 2018 in DIY by DP | No Comments

p-r0009297-600

AA7EE published a new build, a little temperature beacon:

This was a fun little project – and it gave me an idea for a future one. Sometimes, I find that the more complex undertakings, which require more planning, can get to the point that they “take me over” somewhat. At that point, for me, some of the fun starts getting squeezed out and that, of course, absolutely cannot be allowed to happen. This is the time when simple and fun projects save the day.

Check out the video after the break.

See the full post at Dave Richards AA7EE blog.

(more…)

NickelBot – Laser controller

Posted on Monday, April 23rd, 2018 in DIY by DP | No Comments

p-20180420_123011-600

bdring made this laser controller for his wooden nickel engraver project and wrote a post on his blog detailing its assembly:

Here are some details on the custom laser controller I made for the NickelBot, wooden nickel engraving machine.
I want to use Grbl to control the machine. Grbl has support for lasers that allows better power control during the engrave. It also has the Core XY support I need for the H-bot mechanism it uses. The only feature I needed that it did not have is a hobby servo output.

More details at Buildlog.Net blog.

Free PCB Sunday: Pick your PCB

Posted on Sunday, April 22nd, 2018 in Free PCBs by DP | 16 Comments

BP-600x373

We go through a lot of prototype PCBs, and end up with lots of extras that we’ll never use. Every Sunday we give away a few PCBs from one of our past or future projects, or a related prototype. Our PCBs are made through Seeed Studio’s Fusion board service. This week two random commenters will get a coupon code for the free PCB drawer tomorrow morning. Pick your own PCB. You get unlimited free PCBs now – finish one and we’ll send you another! Don’t forget there’s free PCBs three times every week:

(more…)

App note: Using 8-Bit MCUs in 5 volt systems

Posted on Sunday, April 22nd, 2018 in app notes by DP | No Comments

an_silabs_an111

Integrating a low voltage 3V MCU EFM8 from Silicon Labs to 5 volt sytem. Link here (PDF)

When using a 3 V device in a 5 V system, the user must consider:
• A 3 V power supply must be provided.
• A 5 V device driving a 3 V input.
• A 3 V device driving a 5 V input.

App note: High-speed lithium-ion battery charger

Posted on Sunday, April 22nd, 2018 in app notes by DP | No Comments

an_silabs_an146

C8051F300 implementation of Li-Ion battery charger from Silicon Labs. Link here (PDF)

Driven by the need for untethered mobility and ease of use, many systems rely on rechargeable batteries as their primary power source. The battery charger is typically implemented using a fixedfunction IC to control the charging current/voltage profile.

The C8051F300 family provides a flexible alternative to fixed-function linear battery chargers. This note discusses how to use the C8051F300 device in Li-Ion battery charger applications. The Li-Ion charging algorithms can be easily adapted to other battery chemistries.

Free PCB coupon via Facebook to 2 random commenters

Posted on Friday, April 20th, 2018 in Free PCBs by DP | 1 Comment

BP

Every Friday we give away some extra PCBs via Facebook. This post was announced on Facebook, and on Monday we’ll send coupon codes to two random commenters. The coupon code usually go to Facebook ‘Other’ Messages Folder . More PCBs via Twitter on Tuesday and the blog every Sunday. Don’t forget there’s free PCBs three times every week:

(more…)

A web configurable ThingSpeak logger, build on AVR ATmega328

Posted on Thursday, April 19th, 2018 in AVR, DIY by DP | No Comments

p-avr_atmega_thingkspeak_logger-600

Davide Gironi posted an update on Xively logger project we covered previously:

This embedded platform is a modular and configurable ThingSpeak data logger, built on an ATmega328 micro, usefull to send datapoints to your ThingSpeak feed.
This project is an update to the Xively logger presented here

See the full post on his blog here.

AtPack: Atmel Pack parser, visualizer and fuse calculator

Posted on Tuesday, April 17th, 2018 in AVR, hacks by DP | No Comments

AtPack

 

AtPack – Atmel Pack parser, visualizer and fuse calculator from Vagrearg:

Looking for an up-to-date fuse-calculator for the Atmel(*) AVR chips has been something of a long search. There are several online versions, but they have not been updated to the new chips (like the ATmega328PB).
When you have got an itch, you simply scratch it… Don’t you?
Well, I did, and it resulted in an analysis of the Atmel Pack format, which can be freely downloaded under an Apache 2.0 license. The AtPacks contain a master XML file with device lists and links to each device’s XML file, which in turn describes the entire chip. The format is not that hard to understand and can be easily mangled into something useful. Then, some crude jQuery hacking and many hours later… you know how that works.

Code is at GitHub and there is an online version.

Via Vagrearg.

#FreePCB via Twitter to 2 random RTs

Posted on Tuesday, April 17th, 2018 in Free PCBs by DP | No Comments

IRToy-600x369

Every Tuesday we give away two coupons for the free PCB drawer via Twitter. This post was announced on Twitter, and in 24 hours we’ll send coupon codes to two random retweeters. Don’t forget there’s free PCBs three times a every week:

  • Hate Twitter and Facebook? Free PCB Sunday is the classic PCB giveaway. Catch it every Sunday, right here on the blog
  • Tweet-a-PCB Tuesday. Follow us and get boards in 144 characters or less
  • Facebook PCB Friday. Free PCBs will be your friend for the weekend

Some stuff:

  • Yes, we’ll mail it anywhere in the world!
  • Check out how we mail PCBs worldwide video.
  • We’ll contact you via Twitter with a coupon code for the PCB drawer.
  • Limit one PCB per address per month please.
  • Like everything else on this site, PCBs are offered without warranty.

We try to stagger free PCB posts so every time zone has a chance to participate, but the best way to see it first is to subscribe to the RSS feed, follow us on Twitter, or like us on Facebook.

Breakout boards from Taobao are a mess

Posted on Tuesday, April 17th, 2018 in Shenzhen by Ian | 3 Comments

cover

For the last few days I’ve been playing with breakout boards purchased from Taobao. So far it’s been a nightmare.

GY-271 is advertised as a Honeywell HMC5883L 3 axis digital compass. A Bus Pirate address search turned up 0x1A and 0x1B, instead of the HMC5883L’s 0x3C and 0x3D. The chip is actually a “Q”MC5883L, a Chinese-made digital compass with similar features that is not register compatible.

The datasheet for the QMC5883L shows the chip markings as “DA5833”. These markings are visible in nearly every Taobao listing claiming to be a HMC5883L breakout boards. Honeywell’s datasheet doesn’t include chip markings, shame on them.

GY-273 is another HMC5883L breakout board all over Taobao. About half of these are clearly the “Q” type chip. The other half show the Honeywell chip, at least in the photo. After talking with a quasi-trusted vendor I ordered what are supposed to be actual HMC5883L breakouts.

GY-213 is a breakout board sold with a variety of temperature and humidity sensors, including SI701, SHT21, etc. The same color/size/pinout/layout PCB is available from tons of Taobao shops. I ordered a SHT21 version from Youxin, a trusted supplier. The chip appears to be genuine, not the Chinese-made HTU21D, but it seems to be defective in at least two ways.

SHT21

Reading out the configuration register shows 0x3A=00111010, but the power up default should be 000xxx01. At power up the on-chip heater is enabled, which is used for testing and diagnosis. “OTP Reload” is enabled, which is specifically “not recommended for use” by the datasheet.

After setting the correct configuration it was time for further disappointment. Humidity measurement is always around 0xF66A. 114.3% humidity seems unrealistic, even for Shenzhen in the spring.

Lipo charge/boost/protect board in 18650 cell holder format

Posted on Monday, April 16th, 2018 in DIY by DP | No Comments

img_20180404_111351_hdr-02-600

Peter6960 published a new build:

So couple months ago, GreatScott made a video where he designed a circuit. Nothing too innovative, just the same TP4056 charger the MT3608 Boost combined on one PCB. He did add a Lipo protection circuit though, initially using the same DW01. But then, the Aha moment from this video, he found a footprint compatible IC the FS312F-G – which is set at 2.9v! Way healthier for your cell’s longevity!
First of all I had to redraw all his work in Eagle (As I wont be using a cloud based service like EasyEDA for obvious reasons) and then order the PCBs. I added two boost circuits since I had the board space, as I can imagine needing dual voltages at some point (for example if that reverse LCD needed 12v and the Pi needed 5v – i could run both off one board.

Project info at OpenHardware.co.za.

Free PCB Sunday: Pick your PCB

Posted on Sunday, April 15th, 2018 in Free PCBs by DP | 15 Comments

BP-600x373

We go through a lot of prototype PCBs, and end up with lots of extras that we’ll never use. Every Sunday we give away a few PCBs from one of our past or future projects, or a related prototype. Our PCBs are made through Seeed Studio’s Fusion board service. This week two random commenters will get a coupon code for the free PCB drawer tomorrow morning. Pick your own PCB. You get unlimited free PCBs now – finish one and we’ll send you another! Don’t forget there’s free PCBs three times every week:

(more…)

App note: Preventing LED failures caused by corrosive material

Posted on Sunday, April 15th, 2018 in app notes by DP | No Comments

an_osram_LED_chem_compatibility

Chemical compatibility of LEDs application note from OSRAM. Link here (PDF)

The performance and stability of light emitting diodes (LEDs) may be influenced by various chemical incompatibilities arising from chemicals and materials used, amongst other things, in luminaire construction, or by gases in the proximate environment of LEDs during field operation. Nevertheless, LEDs have to fulfill a wide range of customer needs and requirements in indoor and outdoor applications.

This application note provides information about the chemical compatibility of certain substances with LEDs, particularly with regard to some of their basic components. In this context, the main mechanisms of chemical incompatibility are illustrated using examples of blue and white LEDs.

App note: LEDs for wearable applications

Posted on Sunday, April 15th, 2018 in app notes by DP | No Comments

an_osram_AN088

Brief app note from OSRAM, LEDs for heart rate monitoring through skin reflection of emitted light. Link here (PDF)

This application note provides a short introduction into the general use of LEDs for wearable applications, with a focus on heart rate monitoring.

Free PCB coupon via Facebook to 2 random commenters

Posted on Friday, April 13th, 2018 in Free PCBs by DP | No Comments

BP

Every Friday we give away some extra PCBs via Facebook. This post was announced on Facebook, and on Monday we’ll send coupon codes to two random commenters. The coupon code usually go to Facebook ‘Other’ Messages Folder . More PCBs via Twitter on Tuesday and the blog every Sunday. Don’t forget there’s free PCBs three times every week:

(more…)

DIY Boostbox hand crank generator project

Posted on Thursday, April 12th, 2018 in DIY by DP | 1 Comment

DIYBoostBoxV2-600

A DIY hand crank Boostbox by lasersaber at LaserHacker:

This easy to make box uses no batteries but can still power a lot of stuff.  It really is a very versatile little BoostPack based device.  It would be the perfect thing to have on hand in times of emergency.

Project info at LaserHacker project page.

Check out the video after the break. (more…)

Building a giant USB three key mechanical keyboard

Posted on Thursday, April 12th, 2018 in PIC, USB by DP | 1 Comment

DSC00638-600

Glen Akins shares his latest build the giant three key USB keyboard:

After seeing this giant mechanical keyboard at Adafruit, I decided I had to build my own. Adafruit made theirs out of wood and used one of their Python-compatible microcontroller boards. I wanted a sloped top on my keyboard. I also wanted to check out what was new with Microchip’s USB device stack. I decided to build my keyboard out of aluminum and use a PIC18 microcontroller.

See the full post on his blog here, Photons, Electrons, and Dirt.

Next Page »

Recent Comments

  • Max: A thing I wish I knew getting into Arduino-controlled servos is that the typical "180 degrees" servos DO NOT move 180 degrees for the standard...
  • Max: I have certainly noticed certain suppliers (like Adafruit, Pololu) being... "western-facing" - which is another way to say their prices definitely aren't Eastern Europe compatible,...
  • Shawn: Hello
  • jmarc78: Hello
  • JB: Hey.