Amazon Web Service Beijing woefully inadequate for international use

aws-cn

Amazon Web Service (AWS) is a bunch of server, storage, and other internet resources. AWS datacenters are located around the world so companies can locate websites close to their customers and speed up page load times.

A couple years ago AWS started testing a center in Beijing, China. There’s all sorts of benchmarks on speed within and between AWS datacenters, but the Beijing location is restricted to registered Chinese companies so there’s very little public (English) info on it.

In March the internet in Shenzhen became nearly unusable. While access within China reaches 100Mbps, anything outside China experienced 50%+ packet drops and max speeds of 20-50Kbps. In a desperate ploy we tried to setup a VPN within China to a better exit point – maybe AWS has a better connection to the outside world than our local ISPs. Keep in mind that this a VPN inside China, the internet is still filtered but is hopefully more consistent and usable.

Signing up for the AWS beta was pretty easy. The account reps were super helpful and spoke perfect English. Everything went smoothly aside from the rep’s utter disbelief that, yes, we are a real Chinese company not a Hong Kong Company, and yes, we don’t want a free trial tier, and yes, we can pay in RMB from a Chinese company bank account. They must get a lot of people trying to sign up for free service without a company because they mentioned these things a dozen times.

We setup a “medium instance” with Ubuntu, AWS cult code for a small server without throttling. First things first – apt-get update && apt-get upgrade – to bring the server up to date. Apt pulled from AWS repositories within the same datacenter in China at a shocking 64Kbps! They didn’t even break 100Kbps within their own datacenter! Holy crap. For comparison, we regularly FTP between our servers in Hetzner’s German datacenter at 100Mbps+. Pathetic.

Ok, what about the connection to the outside world? The vast majority of our web traffic exits China from Beijing on one of two cables: San Jose, USA and Tokyo, Japan. Surely we could take advantage of our good speeds within China and then slingshot international traffic at higher speeds through the “superior” AWS infrastructure. Not exactly. A file download from DirtyPCBs.com, located in a super high speed San Jose datacenter, topped out at 16Kbps. Really Amazon?

We did similar experiments with Aliyun, the Chinese version of AWS made by the Alibaba/Aliexpress people. The results were slightly better but still absolutely unusable as a gateway to the internet outside of China.

The quest for an internet solution continues…

Developing smart sensor solutions

myo_3-600

Ken Boak has published a new build, the MSP430i2041 bluetooth smart sensor board:

One of our existing products at work, which I designed about 2 years ago, makes use of the STM32F373 microcontroller interfaced to an AD7767 24-bit sigma-delta ADC, to create a smart sensor.
Whilst at the time of development, (Feb 2014) – this seemed to be an economical solution, our requirements have changed a little, in that we wish to add Bluetooth Low Energy Connectivity, LiPo battery support and the means to drive an OLED display. These functions could be added in the form of an additional pcb (similar to the Arduino shield concept), and provision had been made to accommodate such a board with an expansion connector, but after reviewing all of the costs, it was decided that a new approach – and a new dedicated pcb design would be ultimately preferable.

Project info at Ken’s blog.

Project Hathor, a 2KV ring launcher

IMG_20160222_234853-600

Check out Krux’s 2kV ring launcher, Project Hathor.  He writes:

Have you ever wanted to shoot disks of aluminium forty five feet into the air at the press up a button? Do you like experimenting with high energy physics, and learn about things such as impulse generators, charge circuits, Lorentz force, electromagnetic induction, and how to build this all in a form which is safe, and looks sharp. Well if you are like me, the answer to all of these questions is yes. Which is why I set out to build a ring launcher demonstration project, which I have named Hathor, named after the Egyptian goddess of the sky.
Project Hathor is a 2kV ring launcher, built for SYN Shop. It’s designed to launch rings, i.e. aluminum hard drive platters, by generating a large magnetic pulse.

  • Microwave Oven Transformer (MOT) HV supply
  • 2000 volt 1560 uF main capacitor bank
  • Operation from a remote pendant
  • Case made from 1/2 clear acrylic

More details at Krux project page.  The design files are available on github.

Check out the video after the break. Continue reading “Project Hathor, a 2KV ring launcher”

#FreePCB via Twitter to 2 random RTs

BP-600x373

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.

MSP430 VFD clock – Manhattan style

img_20160122_231856742_hdr1

Daniel has a nice write-up about building his Manhattan style VFD Clock based on the MSP430G2553 microcontroller and the MAX6921:

I know that and IV-18 based clock isn’t anything original. In fact, Adafruit used to sell a kit for this exact purpose. I don’t really care that it’s not original, because all vacuum tubes are cool, and doing all of the work yourself is really much cooler than using a kit. Also, I wanted to try my hand at Manhattan style construction. Manhattan style circuits are built on a copper ground plane, with little islands for every node of the circuit. Because of the ground plane, and because it has fewer parasitics than strip board or perfboard, Manhattan style construction is often used for radio frequency projects. My project isn’t a radio project, and the circuit probably would have worked just fine on a strip board, but Manhattan style construction gives a circuit a crude/retro look, which pairs nicely with a Russian vacuum tube.

Project info at Daniel’s Electronics blog.

Check out the video after the break. Continue reading “MSP430 VFD clock – Manhattan style”

Bus Pirate v3.8 free PCB build

BPbuild-600

Orbitroniks  built a free Bus Pirate v3.8 PCB.  The Bus Pirate is an open source hacker multi-tool that talks to electronic stuff.

Via the forum.

If you build a free PCB we’ll send you another one! Blog about it, post a picture on Flicker, whatever – we’ll send you a coupon code for the free PCB drawer.

Get your own handy Bus Pirate for $30, including world-wide shipping. Also available from our friendly distributors.

HOW-TO: Shipping stuff from China cheap?

shippers

Tyler writes:

What method do you use to ship from China? I am trying to ship 8kg of PLA from a manufacturer in China. I want to figure out how much sea shipping (the cheapest method) would be, but no one is really able to give me a legit answer besides someone like UPS (Yeah $200 is so not happening). I just want to try to get a cheap product from China without blowing the whole cost savings on shipping.

Between DirtyPCBs and Hacker Camp Shenzhen, we’ve helped a ton of people ship bulky items all over the world. The good news is that it doesn’t have to cost $200, the bad news is it will never be that cheap for small shipments. Here’s a basic rundown of the shipping options we’ve seen in Huaqiangbei.

Shipments under 20 kilos are considered very small shipments and there aren’t really any great options. If you’re visiting China the cheapest method is to lug it back in your suitcase.

shipping

The shipping calculator on our DEV site gives these prices for 8KG by DHL to the USA. These are roughly the prices you would get through any logistics company in Shenzhen. Ignore airmail, they won’t accept packages over 2KG. DHL China through a logistics agency is the best bet at $67, around $8.35 per kilo.

susi

At 10KG and 20KG there’s a price break for air freight through DHL/FedEx/UPS. Air freight takes a few days longer, and it has to be dropped off at the logistics agent. We’ve sent 6 hacker camps and hundreds of visitors to Susie Shipper in Huaqiangbei (pictured above) because they generally have someone who speaks English. There are dozens of similar air freight agencies in the market – just look for a garage full of boxes covered in packing tape.

For 20KG+ DHL air freight we’ve seen rates from $4.50/KG to Netherlands, and $5.50/KG to UK and USA through Susie Shipper.  At 100KG UPS air freight drops to $4/KG. Air freight is highly dependent on time of year. Around the October rush prices can be 10x higher, or the service may simply not be available at all.

Sea freight is a totally different beast and 8KG isn’t nearly enough. In our limited experience, Sea freight generally starts at $1000USD in fees alone. The actual cost of a 20 foot shipping container isn’t necessarily the greatest expense depending on destination. Sea freight has a cornucopia of associated charges that stack up fast. Bill of leading, document fees, dock fees, inspection, customs, loading, unloading, warehousing, pickup, delivery, plastic pallets, etc. There are some consolidators out there, but they generally want to ship a stuff that’s on a pallet too. 8KG doesn’t seem feasible to ship by sea.

Another thing to keep in mind is that bulky items are charged by dimension, not weight.

( Length * Width * Height ) / 5000 = dimensional weight

If the dimensional weight is greater than the measured weight, then the dimensional weight it used to calculate the shipping fees. It is frighteningly easy to run up against the dimensional weight.

This is the general frustration of China for foreign hobbyists. There are unimaginable, unbelievably cheap materials here, but unless you deal in giant volumes it is exceedingly hard to take advantage of those prices. Not only does shipping add up fast, but most suppliers have no ability to accept payments in foreign currency and exchange it into Chinese RMB.

There’s a much more fun option, one that’s only slightly more expensive than your initial shipping quote. Recently people have been finding flights from the US West Coast to China for around $400 round trip. Why not pop over, explore the markets, pack your suitcase with 23KG of goodies, and “pay” for the trip with the savings on shipping.

NMEA Bridge for OpenCPN

Figure 6. Rev 3 installed and running

Larry Littlefield, KB7KMO, writes:

I want to be able to run openCPN on both a laptop and a tablet at the same time. I would like the laptop down below deck, safe from the rain and salt water spray. I would like to have a mostly waterproof tablet in the cockpit to monitor progress. And I would like to be able to quickly check the ship’s status from the captain’s berth when off watch, maybe on a smart phone.

The plan is to implement a device to read the serial data from all the boat instruments and send that data to openCPN over a WiFI link so there are no physical wires attached. It will broadcast the data with UDP so that multiple devices can read the data at the same time.
The ESP8266 ESP-01 was chosen because it was on hand and it has adequate I/O for this project.

More details at Larry’s blog.

Site reorganization complete

Danger-sign

Sorry for the occasional outages over the past week. Most were during Chinese work hours, so hopefully not really noticed if you’re in the US or EU.

The whole site has been moved into GIT repositories and redeployed as virtual directories as outlined on the blog last week. It is much cleaner, better organized, and more resilient against bugs and hacks.

Today the blog moved to /blog/ to make way for the DEV site to be integrated here. All old posts, pages, and images have 301 Permanent Redirects to avoid breaking links at other sites and to preserve rank with search engines. DEV will probably be moved tomorrow if all goes well. All current DEV site orders will be processed without interruption or delay, even while the site is offline.

If you’re planning to get in any super cheap PCB or SLA 3D prints be sure to do it today. When we move the store to the main site prices will increase to match DirtyPCBs.com. Once the new store is running smoothly prices at DirtyPCBs will increase to encourage people to move to the new system. The DirtyPCBs scripts weren’t designed to handle the 10s of thousands of orders you’ve put through them and they’re starting to come apart at the seams.

The new forum theme is complete. phpBB will get a big update later this week. A new MediaWiki theme and upgrade are scheduled for next week.

If you notice any problems on the blog, forum, and wiki please report it through the contact form or here in the comments.

Phishing attempt in the forum and how to clean it up

Phishing_chart_Oct_2004_to_June_2005.svg

The forum, which runs on the popular phpBB3 software, was hit by a phishing attempt in the last few hours. Around 2000 private messages were sent by hundreds of newly registered users. It’s not clear how this automated attack got past our own spam hammer protection that bars new users from sending private messages. Apologies for the annoying messages and thanks to everyone for the reports.

Here is the SQL we used to clear out the scammers and their messages in case this post turns up search results.

SELECT *  FROM `phpbb_privmsgs` 
left join phpbb_users on author_id=user_id
WHERE `message_subject` LIKE '%We are deleting inactive accounts! Confirm your ac%'

First, backup your database!

Second, run this query to review what will get deleted. Replace “We are deleting inactive accounts! Confirm your ac” with the subject the phishers used. Could also be a line in the post or a URL.

DELETE `phpbb_users`, `phpbb_privmsgs`
FROM phpbb_privmsgs
left join phpbb_users on author_id=user_id
WHERE `message_subject` LIKE '%We are deleting inactive accounts! Confirm your ac%'
AND user_id NOT IN (x,x,x,x)

If users responded to the phisher (ours had some choice words…) they will also get deleted because of the reply subject. Replace x in the NOT IN () clause with the user_id of any legit users that should not be deleted (or omit it if there are none).

Run the query to delete the messages and the users. There is no going back (you did a backup right?).

Image of global phishing incident reports by Offnfopt.

App note: HVArc Guard® surface-mount capacitors for low-power voltage multiplier applications

an_vishay_hvarc

Application note on Vishay’s arc resistant SMD capacitors, Link here (PDF)

Voltage multipliers can generate very high voltages due to an inverter circuit that feeds a step-up transformer, which is connected to the multiplier circuit. An example of a typical voltage multiplier, which is simply a circuit comprised of capacitors and diodes that charge and discharge in alternating half cycles of the applied AC voltage. Applications for voltage multipliers include flyback converters, where a high voltage is produced from a low battery or supply voltage in medical X-ray systems, air ionizers, and oscilloscopes, and instrumentation requiring a high-voltage power supply.

When a high voltage potential is applied at > 1000 V, an arc-over between the terminals, or from terminal to case will occur. To eliminate any arc-over, an overcoating can be applied to the board, or additional board layout spacing can be added to isolate the high-voltage section from other sections of the board. Although coatings add cost to the process and the design, they are required in some applications to meet electrical safety standards.

Free PCB Sunday: Pick your PCB

IRToy

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:

Continue reading “Free PCB Sunday: Pick your PCB”

App note: AC film capacitors in connection with the mains

an_vishay_anaccaps

An application note from Vishay about choosing the right filter capacitors that are placed directly on mains. Link here (PDF)

To help reducing emission and increasing the immunity of radio interference, electromagnetic interference suppression film capacitors (EMI capacitors) are playing a major role in all kind of applications. These capacitors are put directly parallel over the mains at the input of the appliances.

Because of the high energy availability and the severe environment of surge voltages and pulses, applications of capacitors in connection with the mains must be chosen carefully. Two kinds of connections and thus two kinds of applications can be distinguished. One is where the capacitor is directly connected in parallel with the mains without any other impedance or circuit protection, and another where the capacitor is connected to the mains in series with another circuitry.

App note: Modern PRTD temperature sensors and high-resolution Delta-Sigma ADCs enable wide range high-accuracy temperature measurements

apps1

Modern PRTD temperature sensors and high-resolution Delta-Sigma ADCs enable wide range high-accuracy temperature measurements application note from Maxim:

Many modern industrial, medical, and commercial applications require temperature measurements in the extended temperature range with accuracies of ±0.3°C or better, performed with reasonable cost and often with low power consumption. This article explains how platinum resistance temperature detectors (PRTDs) can perform measurements over wide temperature ranges of -200°C to +850°C, with absolute accuracy and repeatability better than ±0.3°C, when used with modern processors capable of resolving nonlinear mathematical equation quickly and cost effectively. This article is the second installment of a series on PRTDs. For the first installment, please read application note 4875, “High-Accuracy Temperature Measurements Call for Platinum Resistance Temperature Detectors (PRTDs) and Precision Delta-Sigma ADCs.”

A similar version of this article appeared in the June 21, 2012 issue of EDN magazine.

App note: Simple wireless temperature monitor also has dataLogging capabilities

apps

Maxim’s application note (PDF!):  Simple wireless temperature monitor also has dataLogging capabilities:

This design idea shows how you can design a simple wireless temperature-monitoring system with data-logging capabilities by using a local temperature sensor and an ASK transmitter and receiver pair.

An Android TV-stick baseboard

IMG_2585-600

Necromant designed and built an Android TV stick baseboard:

The idea was dumb simple. I needed a USB hub, since TV sticks don’t have many USB ports included. I needed GPIOs, so I threw in an attiny2313 that occupied one of the HUB’s ports, I needed a few relays and I wanted to control the power of some of the ports. Since TV sticks have their power input and usb power connected you can just supply power for the stick via the USB host port.  Finally I wanted this whole thing to work from a 12-24V power supply, so an on-board 3A DC-DC was a must.

More details at Necromant’s project page.

T-baneklokke – coundown clock

IMG_6338-600

Joakim made a coundown clock for his wife and documented the whole process on his blog:

The clock is built using an Arduino, and has a battery powered real time clock to remember the time while powered off.
To make it truly stand alone I added the possibility to set the time and time-to-leave using buttons.
The clock was built into a custom made plexiglass box, and the outside covered with a design printed onto photo paper with a sticky back side. I used my wife’s Cameo vinyl cutter printer to cut the paper – I just love that machine!

Project info at A to Synth blog.

EMRFD Direct conversion 40m receiver in a tea caddy

DSC_5059

Flathagen has made a DIY EMRFD Direct conversion 40m receiver in a tea caddy:

I woke up one day eager to build something simple (at least I thought is was simple) and opened up the first chapter in EMRFD and decided to build the 40m direct conversion receiver. I already had most of the components in my junk box. By the way, Experimental Method in RF Design (EMRFD) is the best book about homebrewing amateur radio gear. You should get it if you don`t have it.

Project info at DIYcrap blog.

Check out the video after the break. Continue reading “EMRFD Direct conversion 40m receiver in a tea caddy”