App note: HT45F3630 power tool speed control switch application example

via Dangerous Prototypes


All in one motor control MCU HT45F3630 from Holtek. Link here (PDF)

Aimed at the motor speed control product application area, HOLTEK has developed the HT45F3630, which is commonly used in electric drills, electric screwdrivers, lawn mowers and other similar product applications. This MCU provides a group of PWM high voltage and large current output pins which can directly drive Power MOS transistors to reduce their switching losses. Additionally, the device includes integrated over current protection and detection functions and an amplifier which allows the input signal to be amplified by 51 times, requiring a lower value current sense resistance value which will increase the overall efficiency and extend the operating time. When an over current event occurs, the PWM switching will be shut off by hardware to achieve immediate protection.

Dirty Now Does Cables

via hardware – Hackaday

PCB makers Dirty made a name for themselves in the prototype PCB biz, with a convenient web form and numerous options for PCB color, thickness, layers, silk screening, and so on. Now they’ve branched out into custom cabling with Dirty Cables.

You can design it yourself by dragging wires and connectors out of a sidebar and arranging them on a workspace, deciding which wire goes to what pin of the connector. Your choices for wires include various gauges and ribbon configurations. You choose a color (they have eleven) select connectors and drag those out too–choose from 17 cable-to-cable and cable-to-board connector families. We made a quick cable with four 32ga wires and two 16ga wires, with two different connectors on each side, with pricing updated realtime. If you want a sample pack of connectors, Dirty sells them for $10.

The downside to the service: there’s a minimum order of 100, though paying Shenzhen prices might make it worth your while. Just imagining crimping all of those connectors makes Hackaday’s hands hurt.

To get a sense of the diversity of connectors out there, read Elliot’s piece on the connector zoo that we published last year.

[thanks, Akiba]

Filed under: hardware

Free PCB coupon via Facebook to 2 random commenters

via Dangerous Prototypes


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:

Some stuff:

  • Yes, we’ll mail it anywhere in the world!
  • We’ll contact you via Facebook 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.

Friday Product Post: On Your Mark, Get Set, GO!

via SparkFun Electronics Blog Posts

Hello, everyone, and welcome to another Friday Product Post! This week we are celebrating products that provide you with a great place to get started in the world of electronics, including the vastly requested micro:bit Go Bundle as well as three beginner electronics kits. We might even have a few other products hidden in the post if you look close enough!

micro:bits for everyone!

micro:bit Go Bundle


The micro:bit Go Bundle provides you with everything you need to get hooked up and powered. This kit includes the micro:bit, a short USB cable, a AAA battery holder and AAA batteries. Also inside the Go Bundle you will find a Quick Start Guide with four unique ideas to get you started with micro:bit! The Go Bundle is a quick and economical way to get started with the micro:bit.

We are also building a full ecosystem around the micro:bit that is now available for preorder. Individual boards and kits are all available! We expect to begin shipping everything out in early July.

Fun for all ages!

130-in-1 Electronic Playground


This is the classic electronics kit! The 130-in-1 Electronic Playground provides a great starting point into the world of electronics. Bending springs and inserting a jumper wire between the coils is key to creating simple circuits for 130 different experiments in this fun kit! With this kit you will be able to build an AM broadcast station, an electronic organ, strobe lights, logic circuits and much more! The 130-in-1 Electronic Playground is recommended for anyone 12 years of age or older.

Snap Circuits Jr. - 100 Experiments


Need something for a younger crowd? The Snap Circuits Jr. kit makes learning electronics easy and fun! With this Snap Circuits kit you will be able to build 101 different experiments with 32 individual parts to teach the budding engineer the basics of electronics. Simply follow the in-depth user manual included in the kit to be able to build exciting projects such as a flying saucer, alarms, doorbells and much more!

Snap Circuits - 300 Experiments


Whether you need to take the next Snap Circuits step or want to buy the whole kit and caboodle, the full Snap Circuits kit is for you! With 305 different experiments and 61 individual parts, you will be able to build projects that go beyond this kit’s younger sibling.

Alright, folks, that’s it for this week. As always, we can’t wait to see what you make with these parts! Shoot us a tweet @sparkfun, or let us know on Instagram or Facebook. We’d love to see what projects you’ve made!

Make sure to check back with us next week for a product post FULL of new parts! See you then.

comments | comment feed

A Raspbian desktop update with some new programming tools

via Raspberry Pi

Today we’ve released another update to the Raspbian desktop. In addition to the usual small tweaks and bug fixes, the big new changes are the inclusion of an offline version of Scratch 2.0, and of Thonny (a user-friendly IDE for Python which is excellent for beginners). We’ll look at all the changes in this post, but let’s start with the biggest…

Scratch 2.0 for Raspbian

Scratch is one of the most popular pieces of software on Raspberry Pi. This is largely due to the way it makes programming accessible – while it is simple to learn, it covers many of the concepts that are used in more advanced languages. Scratch really does provide a great introduction to programming for all ages.

Raspbian ships with the original version of Scratch, which is now at version 1.4. A few years ago, though, the Scratch team at the MIT Media Lab introduced the new and improved Scratch version 2.0, and ever since we’ve had numerous requests to offer it on the Pi.

There was, however, a problem with this. The original version of Scratch was written in a language called Squeak, which could run on the Pi in a Squeak interpreter. Scratch 2.0, however, was written in Flash, and was designed to run from a remote site in a web browser. While this made Scratch 2.0 a cross-platform application, which you could run without installing any Scratch software, it also meant that you had to be able to run Flash on your computer, and that you needed to be connected to the internet to program in Scratch.

We worked with Adobe to include the Pepper Flash plugin in Raspbian, which enables Flash sites to run in the Chromium browser. This addressed the first of these problems, so the Scratch 2.0 website has been available on Pi for a while. However, it still needed an internet connection to run, which wasn’t ideal in many circumstances. We’ve been working with the Scratch team to get an offline version of Scratch 2.0 running on Pi.

Screenshot of Scratch on Raspbian

The Scratch team had created a website to enable developers to create hardware and software extensions for Scratch 2.0; this provided a version of the Flash code for the Scratch editor which could be modified to run locally rather than over the internet. We combined this with a program called Electron, which effectively wraps up a local web page into a standalone application. We ended up with the Scratch 2.0 application that you can find in the Programming section of the main menu.

Physical computing with Scratch 2.0

We didn’t stop there though. We know that people want to use Scratch for physical computing, and it has always been a bit awkward to access GPIO pins from Scratch. In our Scratch 2.0 application, therefore, there is a custom extension which allows the user to control the Pi’s GPIO pins without difficulty. Simply click on ‘More Blocks’, choose ‘Add an Extension’, and select ‘Pi GPIO’. This loads two new blocks, one to read and one to write the state of a GPIO pin.

Screenshot of new Raspbian iteration of Scratch 2, featuring GPIO pin control blocks.

The Scratch team kindly allowed us to include all the sprites, backdrops, and sounds from the online version of Scratch 2.0. You can also use the Raspberry Pi Camera Module to create new sprites and backgrounds.

This first release works well, although it can be slow for some operations; this is largely unavoidable for Flash code running under Electron. Bear in mind that you will need to have the Pepper Flash plugin installed (which it is by default on standard Raspbian images). As Pepper Flash is only compatible with the processor in the Pi 2.0 and Pi 3, it is unfortunately not possible to run Scratch 2.0 on the Pi Zero or the original models of the Pi.

We hope that this makes Scratch 2.0 a more practical proposition for many users than it has been to date. Do let us know if you hit any problems, though!

Thonny: a more user-friendly IDE for Python

One of the paths from Scratch to ‘real’ programming is through Python. We know that the transition can be awkward, and this isn’t helped by the tools available for learning Python. It’s fair to say that IDLE, the Python IDE, isn’t the most popular piece of software ever written…

Earlier this year, we reviewed every Python IDE that we could find that would run on a Raspberry Pi, in an attempt to see if there was something better out there than IDLE. We wanted to find something that was easier for beginners to use but still useful for experienced Python programmers. We found one program, Thonny, which stood head and shoulders above all the rest. It’s a really user-friendly IDE, which still offers useful professional features like single-stepping of code and inspection of variables.

Screenshot of Thonny IDE in Raspbian

Thonny was created at the University of Tartu in Estonia; we’ve been working with Aivar Annamaa, the lead developer, on getting it into Raspbian. The original version of Thonny works well on the Pi, but because the GUI is written using Python’s default GUI toolkit, Tkinter, the appearance clashes with the rest of the Raspbian desktop, most of which is written using the GTK toolkit. We made some changes to bring things like fonts and graphics into line with the appearance of our other apps, and Aivar very kindly took that work and converted it into a theme package that could be applied to Thonny.

Due to the limitations of working within Tkinter, the result isn’t exactly like a native GTK application, but it’s pretty close. It’s probably good enough for anyone who isn’t a picky UI obsessive like me, anyway! Have a look at the Thonny webpage to see some more details of all the cool features it offers. We hope that having a more usable environment will help to ease the transition from graphical languages like Scratch into ‘proper’ languages like Python.

New icons

Other than these two new packages, this release is mostly bug fixes and small version bumps. One thing you might notice, though, is that we’ve made some tweaks to our custom icon set. We wondered if the icons might look better with slightly thinner outlines. We tried it, and they did: we hope you prefer them too.

Downloading the new image

You can either download a new image from the Downloads page, or you can use apt to update:

sudo apt-get update
sudo apt-get dist-upgrade

To install Scratch 2.0:

sudo apt-get install scratch2

To install Thonny:

sudo apt-get install python3-thonny

One more thing…

Before Christmas, we released an experimental version of the desktop running on Debian for x86-based computers. We were slightly taken aback by how popular it turned out to be! This made us realise that this was something we were going to need to support going forward. We’ve decided we’re going to try to make all new desktop releases for both Pi and x86 from now on.

The version of this we released last year was a live image that could run from a USB stick. Many people asked if we could make it permanently installable, so this version includes an installer. This uses the standard Debian install process, so it ought to work on most machines. I should stress, though, that we haven’t been able to test on every type of hardware, so there may be issues on some computers. Please be sure to back up your hard drive before installing it. Unlike the live image, this will erase and reformat your hard drive, and you will lose anything that is already on it!

You can still boot the image as a live image if you don’t want to install it, and it will create a persistence partition on the USB stick so you can save data. Just select ‘Run with persistence’ from the boot menu. To install, choose either ‘Install’ or ‘Graphical install’ from the same menu. The Debian installer will then walk you through the install process.

You can download the latest x86 image (which includes both Scratch 2.0 and Thonny) from here or here for a torrent file.

One final thing

This version of the desktop is based on Debian Jessie. Some of you will be aware that a new stable version of Debian (called Stretch) was released last week. Rest assured – we have been working on porting everything across to Stretch for some time now, and we will have a Stretch release ready some time over the summer.

The post A Raspbian desktop update with some new programming tools appeared first on Raspberry Pi.

Interfacing a Retro Controller using the USBASP

via hardware – Hackaday

An ISP dongle is a very common piece of equipment on a maker’s bench. However, its potential as a hackable device is generally overlooked. The USBASP has an ATmeg8L at its heart and [Robson] decided that this humble USB device could be used as an interface between his PC and a SNES Joypad.

A SNES controller required three pins to communicate with a host: clock, data and latch. In his hack, [Robson]  connects the controller to the ISP interface using a small DIY adaptor and programs the AVR using the V-USB library. V-USB is a software USB library for small microcontrollers and comes in pretty handy in this instance.

[Robson] does a pretty good job of documenting the entire process of creating the interface which includes the USB HID code as well as the SNES joypad serial protocol. His hack works on both Windows and Linux alike and the code is available on GitHub for download.

Simple implementation like this project are a great starting point for anyone looking to dip their toes in the DIY USB device pool. Veterans may find a complete DIY joystick more up their alley and will be inspired by some plastic techniques as well.

Filed under: Arduino Hacks, hardware