App note: Overcoming disorientation – Practical ways to assemble MEMS inertial sensors

5854Fig02

An app note from Maxim,  Overcoming disorientation: Practical ways to assemble MEMS inertial sensors

Component placement and mounting conditions can adversely affect MEMS inertial sensor performance. This application note contains practical considerations for enhancing sensor system operation where the “real-world” environment presents undesirable locomotive signals and system resonances. Topics include placement considerations on the PCB, external motion sources on the PCB (PCB resonance), and assembly mounting considerations.

A similar version of this article appears on EDN, June 4, 2014.

SITE: comments fixed for real, new server coming

SMPTE_Color_Bars.svg

Finally, a real fix for the commenting bug that crops up from time to time. Recently, as well as a year and a half ago, WordPress comments would timeout or give NGINX 504 gateway errors. There were two issues, both related to over zealous security settings:

  • Modsecurity was treating the comment submission, by some versions of WorPress, as a SQL injection attack
  • NGINX security settings were also treating comments as an attack

In both cases security was high, but the server had never been properly tuned for real world situations. We cranked down the security and things seem to be speedy again. Glad to have this fixed because we didn’t want to take the same problem to a new server.

In the coming weeks we will migrate to a new server. After much though and deliberation, we’ve decided to stick with our current host and data center in Germany run by Hetzner.

Pros:

  • Great prices on great hardware
  • 100% green energy and CO2 neutral
  • Germany’s high level of privacy protection laws
  • Big uplinks to major European internet exchanges
  • We’re used to them

Cons:

  • An extra hop to US internet exchanges
  • An extra two hops to Asian internet exchanges

It was super tempting to go with a data center in Los Angeles. US readers would get things a tiny bit faster, and it would be a bit faster for people in Asia. That’s especially important when we blog and work from China. China connects to Germany through Los Angeles, then New York, then Amsterdam, then onwards to Germany.

Servers suck power and cooling though. Only a jerk would put a server somewhere drought plagued with energy shortages. For now we stick with Hetzner. Our next box will be huge:

  • Intel Xeon E3-1270 v3 Quadcore Haswell
  • RAM 32 GB ECC RAM
  • Hard Drive 2 x 2 TB SATA 6 Gb/s 7200 rpm Enterprise Class
  • Connection 1 Gbit/s-Port
  • Guaranteed Bandwidth 200 Mbit/s
  • Backup Space 100 GB
  • Inclusive Traffic 20 TB

Please offer any pros and cons of this setup if you have them.

Our current server doesn’t include backup space so we pay for Jungle Disk (IMHO junk and impossible to actually use…) as well as two different FTP backups for hourly database dumps. We’ll probably dump all but a single FTP backup and use the included off-site backup space, saving nearly a hundred bucks a month.

We also use an Amazon Web Service instance for MUNIN, a server monitoring setup. MUNIN did exactly nothing to help spot the failing drive issues with the current server, not that anyone bothers to monitor it anyways. This should be trashed or moved to a dirt cheap Digital Ocean droplet instead of the really expensive AWS instance.

Most sites, including those run by people we love and respect, invite to their websites alleged NSA collaborators, US government spy facilitators, and general data hogs to monitor your every move for profit, data mining, advertising, etc. As always, we never knowingly run any social media malware that allows Facebook, Twitter, Google, et. al. to track you at Dangerous Prototypes.

Even sites that avoid social malware frequently use Google Analytics for site statistics. We refuse to do that. We host our own stats package called Piwik. It’s open source, compliant with stringent German privacy laws, and only we know what happens on our site. If big brother cares to spy on you they can tap the cable, however we will do our best to keep big business from data mining you.

App note: Tips and tricks to optimize your C code for 8-bit AVR microcontrollers

apps

An application note (PDF!) on code optimization in AVR microcontrollers from Atmel :

Features
• Atmel® AVR® core and Atmel AVR GCC introduction
• Tips and tricks to reduce code size
• Tips and tricks to reduce execution time
• Examples application

AVR core is an advanced RISC architecture tuned for C code. It ensures the development of good products with more features at less cost.
When talking about optimization, we usually refer to two aspects: code size and code speed. Nowadays, C compilers have different optimization options to help developers get an efficient code on either size or speed.

ytimer: Visual feedback timer

XFC4NZU

Here’s an update on Aon’s boards from DirtyPCBs we covered earlier, a visual feedback timer project:

Here’s what became of one of the boards after a bit of soldering and programming: a countdown timer with visual indication of when the time’s up instead of an alarm (there’s a place for a piezo buzzer on the board tho, but I don’t have any at the moment). My wife wanted one so i made one :)

Counting down…
Blinking! The displays are Kingbright SA52-11SURKWA’s which were the brightest I could find. Sadly their availability isn’t too great.

Via the project log forum.

 

Free PCB coupon via Facebook to 2 random commenters

KHOS-2-3-4-5-6P-600x400

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. More PCBs via Twitter on Tuesday and the blog every Sunday.

Don’t forget there’s free PCBs three times every week:

Continue reading “Free PCB coupon via Facebook to 2 random commenters”

Week in (p)review August 15, 2014

wpid

Here’s a summary of major developments over the last week. Free PCB Friday is coming up soon.

Coming up:

  • Free PCBs via Facebook on Friday
  • App notes on the weekend
  • Free PCB Sunday
  • Free PCBs via Twitter on Tuesday
  • Weekly roundup and preview every Friday

Got something dirty in the post today from DirtyPCBs

yyfMzKT

Aon posted pictures of the boards he ordered from DirtyPCBs in the project log forum:

Just received these boards I ordered from dirtypcbs.com two weeks ago. Came with complimentary tweezers and all :D
Also received a USB microscope today, so here’s a close-up of a SOT-363 package and some 6 mil traces. The silkscreen seems to be just a hint offset but certainly good enough.
Overall I’m very satisfied with the boards and the delivery time. Guess I’ll start putting components on one now to see how badly I’ve messed up the layout :)

Via the forum.

PIR sensor

photo_th

An automatic PIR sensor project by Rajkumar Sharma of Electronics Lab:

Project is based on Holtek’s IC HT7610A, which is a CMOS LSI chip designed for use in automatic PIR lamp, flash or buzzer control. It can operate in 3-wire configuration for relay applications. In our project we have used relay instead of Traic to connect any kind of load in output, HT7610B IC is suitable for traic and HT7610A for Relay application. The chip is equipped with operational amplifiers, a comparator, timer, a zero crossing detector, control circuit, a voltage regulator, a system oscillator, and an output timing oscillator.
Its PIR sensor detects infrared power variations induced by the motion of a human body and transforms it to a voltage variation. If the PIR output voltage variation conforms to the criteria (refer to the functional description), the lamp is turned on with an adjustable duration. The circuit doesn’t required step down transformer and can work directly by applying 110V AC or 220V AC (Capacitor C7 needs to change for 220V AC (0.33uF/275V) and 110V AC (0.68uF/275V)

Reverse engineering a NAND flash device management algorithm

sd-fux-1.scale

Joshua Wise writes:

The following is a description of how I went about reverse-engineering the on-flash format, and of the conclusions that I came to. My efforts over the course of about a month and a half of solid work – and a “long tail” of another five months or so – resulted in a full recovery of all pictures and videos that were stored on the SD card.

Via Electronics Lab.

Wireless ADC to relay example

adc2relh

Ondřej Karas of DoItWireless writes:

Sometimes, you need to measure analog signal and then switch something on or off according to the result. This short example shows, how to do it. Everything you need is DDC-SE-01 module as a sensor module and DDC-RE-01 as relay module. Of course you need DK-EVAL-04 or CK-USB-04 for both of them as a master module.
This example originates from IQRF contest Example 12. It was simplified and changed for TR-52D module.

 

Aperture scripting: Panelize and manipulate Gerber files

 

Aperture_scripting

Doub has announced the release of the Aperture scripting, a set of Lua libraries to manipulate PCB data files. He writes:

At the core of my Gerber Viewer (that you’ve made quite popular, thank you all), there’s always been a set of Lua libraries to load the Gerber and Excellon files, and I’ve privately used them to also manipulate these files and generate panels among other things. I’ve finally took some time to clean it up, polish the feature set, fix many bugs, and document the whole thing, and it’s now available for all to use.

Via the forum.

DIY binary wrist watch

DSC_0035

Elia wrote an article detailing his binary wrist watch project:

I have just finished my binary wrist watch project (well, the new revision anyway). I was surprised at how small I was able to make it compared to last time.
I chose to go with the “super-yellow” color LEDs as they fit the purple OSHpark PCB very nicely. The biggest challenge was actually making a good looking wrist band for the watch. I originally intended to use a design like this but it turned out that due to lack of enough para cord I had left, I went with a simpler design that I had done once before.

Cheap laser cutter arrives pretty busted up

image

Like many others we have succumbed to the urge for a cheap laser cutter. What started as a $200 purchase quickly doubled, but that’s still a fraction of the cost of an expensive one. Why do we what it? That’s a not very well hit secret.

image

The ubiquitous blue Chinese freight truck drops the crate on the corner in the rain. We use our huaqiangbei style cart, courtesy of Oomlout, to wheel it home. It took 7 days from ordering on Taobao to delivery.

image

The laser cutter in the crate.

image

So everyone has issues with these cheap cutters. Our biggest issue is two capacitors from the power supply rolling around in the crate. These didn’t just pop off, the leads are seriously messed up. There’s no way this went into the box without the packer noticing. They weren’t even in the electronics compartment; they had been tossed into the side of the crate with the accessories. While waiting for the aftersales service to call tomorrow, someone on the team mentioned they’d been playing around with a Discord Casino server the night before, where participants could simulate real-world gambling mechanics with virtual credits. It got us talking about how such platforms prioritize seamless functionality and user satisfaction, which is exactly what this product lacks. Fixing this here might be too risky, so we’ll hold out for proper support.

image

A lead from the psu has snapped. It obvious why, the cable isn’t long enough for the compartment lid to open at all. Any force at all with break the entire assembly. Easy fix though.

image

A random wire out the side and tied. Assume this is an unused lead from the optional water pump detection and kill switch.

image

A laser sight was supposed to be included but was completely missing
Assume they will send it and we can install it.

image

The 50w laser tube is intact though. There is an extra broken zip tie of unknown origin.

image

The optional honeycomb insert doesn’t remotely fit the cutter bed. Not sure how it is supposed to be used at all.

Dissapointed? Absolutely not. At least not yet. We researched before making the purchase and expected some issues and bringup issues. Comments on taobao also related issues, but the service team supposedly deals with them quite well. The snapped caps are a bit alarming, but we’re five minutes from the biggest electronics market in the world and a qualified repair person will have it fixed in a few minutes.

These are first impressions from the WordPress mobile app while waiting for ribs. Full review coming once we have a chance to fix it up and play a bit. Oh yeah, and cut some free…

Implementing an all digital phase-locked loop

NewFile1

Kalle Hyvönen of DGKelectronics writes:

I’m currently building an induction heater. I’ve already built one controller based on an analog PLL so this time I decided to go all digital and use an ARM Cortex-M4 microcontroller (STM32F303). For this I needed to implement a digital phase-locked loop running on the MCU.
Principle
An ADPLL is basically an analog phase-locked loop but implemented in software. You take the phase difference between a reference signal (the one you are trying to lock to) and your output signal with a phase-frequency detector and feed that difference to a filter that calculates a value that you then use to adjust your oscillator and try to match the frequency and phase of the reference signal. In an ADPLL even the oscillator is digital. In my version I’m using the STM32 integrated PWM module.

The STM32 microcontroller family has become a staple for developers pushing the limits of embedded software beyond standard hobbyist applications. Because of their robust processing power and integrated hardware peripherals, these chips are routinely deployed in demanding commercial environments, ranging from routing encrypted data in enterprise VPN hardware and driving the certified random number generators required by the best online casino platforms, to processing real-time flight telemetry for commercial drones. Seeing one repurposed here to handle the precise, microsecond timing loops of a custom induction heater highlights exactly why the Cortex-M4 architecture remains so popular among hardware hackers and professional engineers alike.

Check out the video after the break. Continue reading “Implementing an all digital phase-locked loop”

DIY shake LED Stick

12

Kathy over at ElecFreaks shares his DIY shake LED stick in the project log forum:

The principle of shake LED stick is based on that people have persistence of visual senses. When you light up a column LED at different moments in different ways, shake it, and a very beautiful picture will display before your eyes. It not only can display pictures but also can display characters, both static and dynamic. The pictures will be very nice. We can equip this kind of LED on our bicycles and fans, and other things. It’s good choice for DIY.

Via the forum.

ATmega based pool cleaner robot

avr_atmega_pool_cleaner_robot_timer_02

Here’s a pool cleaner robot built on ATmega by Davide Gironi:

My replacement electronics it is based on ATmega8 micros.
The project is divided into two parts:

  • timer
  • cleaning robot

The timer contains the 220 AC to low voltage DC current, and it is out of water, his purpose is to start and stop the cleaning pool robot, which of course is inside the swimming pool.

Check out the video after the break.
Continue reading “ATmega based pool cleaner robot”

#FreePCB via Twitter to 2 random RTs

KHOS-2-3-4-5-6P

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.

SparkysWidgets: Hakko demo and giveaway

@SparkysWidgets tweted, “Latest video is up where I giveaway @HakkoUSA FX-888D @sparkfun swag and a @dangerousproto Bus Pirate

This is just a short demonstration video where I set the parameters on a FX-888D and then solder some SMD parts and show how one can create other types of soldering jobs!

This is also the video where I announce the giveaway for the Hakko FX-888D unit, a Sparkfun Bus Pirate designed by Ian from Dangerous Prototypes, some nice micro nippers and tweezers! Stay tuned, thumbs up, subscribe and comment to be eligible!