Monthly Archives: July 2018

Ramp up programmable LED troubleshooting with the BlinkBox

via Arduino Blog

Programmable LEDs are amazing pieces of hardware, allowing hackers to add a rainbow of colors to projects at reasonable prices. Troubleshooting these devices, however, can be a pain, so Devon Bray developed the “BlinkBox” to help with this task.

The resulting Arduino-based tester can work with multiple types of LEDs, and is able to cycle through each individual LED module in a string, and change the animation pattern as needed. He had previously done this kind of testing on a breadboard, but his new iteration is much more permanent and professional looking. 

You can find CAD and code for it on GitHub if you’d like to build your own!

Four Weeks of Free: Week Four

via SparkFun: Commerce Blog

The fourth and final week of the Four Weeks of Free promotion is here! This is another great opportunity to save some time with the Qwiic system, especially if you’re inclined to use Raspberry Pi to run your projects. You can get a special Raspberry Pi Qwiic Kit for free when you have $60 or more in your cart, add the Raspberry Pi Qwiic Kit, and use the promo code FREEW4 at checkout.

Check out the product below and go here for more details on the Four Weeks of Free promotion. Better hurry though – we’ve only got 250 kits to give away!

SparkFun Raspberry Pi Qwiic Kit

KIT-14821
$60.00

comments | comment feed

Happy 7th birthday, CoderDojo!

via Raspberry Pi

What is CoderDojo?

CoderDojo is a global network of free informal clubs for young people aged 7-17 to learn how to code and create with technology. There are more than 1400 active Dojos in 75 countries, regularly attended by 40000 young people.

Happy birthday, CoderDojo 🎂

Seven years ago today, on 23 July, James Whelton and Bill Liao held the first-ever CoderDojo session in Cork, Ireland. When that first group of volunteers and young people (Ninjas) came together to learn how to make a website, design a game, or write their first program, they never imagined how far the CoderDojo movement would go. But the message of CoderDojo and its values of openness, inclusivity, creativity, and community have resonated with many thousands of people and continue to encourage them to get involved to learn and to volunteer.

CoderDojo birthday Raspberry Pi

Founders of CoderDojo James Whelton and Bill Liao

Going global in 95 countries

Since that first Dojo session, the movement has become truly global: there are now more than 1900 Dojos in 95 countries around the world. And not only CoderDojo clubs have developed, but also a fantastic, welcoming, worldwide community of volunteers, and a foundation that provides it with support and resources and is part of the Raspberry Pi family.
CoderDojo birthday Raspberry Pi

Sharing the community spirit

As if running and growing the network of Dojos wasn’t enough, our community also runs wonderful events: CoderDojo volunteers started the Coolest Projects showcase in 2012 as a way for Ninjas to come together and share the projects they have created.

Celebrating Coolest Projects International 2018

Coolest Projects is a world-leading showcase that empowers and inspires the next generation of digital creators, innovators, changemakers, and entrepreneurs from across the globe.

This year, more than 1000 young coders showcased what they have built at the international Coolest Projects event in Dublin, with regional events taking place in Belgium, Bulgaria, Italy, the UK and, in two months’ time, in North America.

Coolest Projects UK 2018 Raspberry Pi Foundation CoderDojo Coolest Projects UK 2018 Raspberry Pi Foundation CoderDojo Coolest Projects UK 2018 Raspberry Pi Foundation CoderDojo Coolest Projects UK 2018 Raspberry Pi Foundation CoderDojo

Passionate CoderDojo community members also saw the importance of meeting each other and sharing experiences of running their Dojos, so they decided to create an event to bring community members together: DojoCon gives volunteers from around the world the opportunity to gather in person, make friends, and learn from each other to better run and develop their Dojos. Regional DojoCons have been held in Toscana (Italy), Perth (Australia), and Osaka (Japan), along with numerous smaller mentor meetups that offer more localised support and friendships.

And MegaDojos have enabled groups of hundreds of young people to meet up for a day and code together, also providing the chance for newcomers to get involved and try a variety of technologies.

Forming regional bodies

In regions where the concentration of Dojos and the drive to create more clubs are high, CoderDojo community members have formed regional bodies to provide focused support for growth.

“We are located in a city in Italy hit by the earthquake in 2016. We do not have a lot of places to meet. But every month, with a lot of work, we organize a CoderDojo, and the happiness in the children’s eyes is all we need!” – Dojo champion, Macerata, Italy

This highlights the grass-roots nature of the movement, and the passion that people involved have to achieve our goal of every child worldwide having the opportunity to learn to code and to be creative with technology in a safe and social environment.

Publications and initiatives

Since 2011, community members have created and shared learning resources, and translated content at home and in organised hackathon events to help more young people learn to program. Following on from these resources developed in Dojos, two CoderDojo books have been released and translated into ten languages to help even young people in areas where Dojos haven’t cropped up develop the skills to be tech creators.

CoderDojo birthday Raspberry Pi

The CoderDojo Foundation is implementing initiatives to encourage diversity in all Dojos, such as the CoderDojo Girls Initiative, which was inspired by and shares the outstanding work that Dojo volunteers around the world already do to encourage more girls to become Ninjas and learn to code.

Award winners

Since CoderDojo began, we’ve had eight girls attending Dojos be named European Digital Girl of the Year. Ninjas have been nominated for the BAFTA Young Game Designers award and won regional robotics challenges. They’ve travelled to the European Parliament to show MEPs a thing or two about coding. Ninjas have coded in libraries, tech-hubs, nursing homes, hotels, community centres, children’s hospitals, under trees, and on buses!

Answering the call

CoderDojo has encouraged cross-collaboration and intercultural learning. For example, Ninjas in Japan made 1000 origami shuriken to share with Ninjas attending this year’s Coolest Projects International in Dublin, and young people and volunteers in Dojos in Argentina and Belgium worked together to enter the European Astro Pi Challenge. And on community calls, volunteers from different continents, who would never have the opportunity to talk to each other otherwise, ask each other questions and offer each other advice.

“CoderDojo provides Ninjas with a positive, safe space for them to exercise their brain and to work on various projects. The sense of recognition and achievement among the young people is amazing. [Where our Dojo is located] is considered a disadvantaged area with a high level of poverty, substance misuse issues, and unemployment. Having such a positive space like CoderDojo for the young people of this community is acting as a prevention factor to the issues. Our young people are continuously learning, exploring, building relationships, and increasing their chances at a better quality of life.” – Dojo mentor, North Dublin, Ireland

Over the past seven years, thousands of amazing volunteers and supporters around the world have enabled 200000 young people to be technology creators. In 2017 alone, volunteers gave an incredible 290000 hours to support Ninjas to gain the confidence and skills to create with code!

☯CoderDojo☯ on Twitter

It was amazing celebrating our 7th birthday today. Well done in particular to all the young people who attended, those who shared what they were working on with the Duke & Duchess of Sussex, to their parents/guardians, & all the volunteers for their support thoughout the day!♥

But it’s not just time they give, volunteers have contributed their enthusiasm, creativity, and love to create a generous and fun community! We would not have reached this seventh birthday without all the champions, mentors, and other volunteers who are the backbone of the CoderDojo movement, so thank you! We hope, with all your help, to continue to inspire young coders around the world.

Join the CoderDojo movement

“As the champion, the Dojo is the thing in my life I am most proud of, and that I look forward to each week. It is the most meaningful thing that I do, and seeing all the kids having a great time with their friends each week, and enjoying the learning experience, is truly fulfilling. It makes me wish I was young again to have such an opportunity to learn and be cool with all the great kids involved. It re-ignites my own passion for technology, which sometimes is easy to forget!” – Dojo champion, Kildare, Ireland

If you would like to start a fun, inclusive coding club for 7- to 17-year-olds in your local area, then find out more about setting up a Dojo here.

The post Happy 7th birthday, CoderDojo! appeared first on Raspberry Pi.

New Product: Jrk G2 21v3 USB Motor Controller with Feedback

via Pololu Blog

Our Jrk G2 family is growing! Today we released the Jrk G2 21v3 USB Motor Controller with Feedback, which you can think of as the baby version of the new Jrk G2 motor controllers we released a few months ago or the updated version of our original Jrk 21v3. I already wrote about the history of the Jrk motor controllers in the blog post announcing the Jrk G2 motor controllers, so for today’s announcement I just want to quickly go over how small this motor controller is and how much we packed into it.

First off, this latest controller is small! Here it is next to the original Jrk 21v3:

Comparison of the newer Jrk G2 21v3 (black PCB) with the original Jrk 21v3 (green PCB).

We managed to reduce the size by more than a third, which is quite an achievement given that connectors and mounting holes already took up a pretty good portion of the board area, and we did not want to reduce those. If you looked closely at that picture above, you probably noticed that the motor driver and microcontroller are not visible on the G2, and that’s because they’re now on the back side. Here is that back side, with a quarter for scale:

Jrk G2 21v3 USB Motor Controller with Feedback, bottom view with dimensions.

Because the Jrk G2 21v3 is based on the same foundation as our bigger controllers, you get all the same convenient configurability over USB using our software utility that is available for Windows, macOS, and Linux (if you are interested, you can read more details in this post about the Jrk G2 software).

The graph window in the Jrk G2 Configuration Utility (version 1.2.0).

The main window and the variables window in the Jrk G2 Configuration Utility (version 1.2.0).

You also get all the great features and interfaces of the Jrk G2 family:

  • Easy open-loop or closed-loop control of one brushed DC motor
  • A variety of control interfaces:
    • USB for direct connection to a computer
    • TTL serial operating at 5 V for use with a microcontroller
    • I²C for use with a microcontroller
    • RC hobby servo pulses for use in an RC system
    • Analog voltage for use with a potentiometer or analog joystick
  • Feedback options:
    • Analog voltage (0 V to 5 V), for making a closed-loop servo system
    • Frequency, for closed-loop speed control using pulse counting (for higher-frequency feedback) or pulse timing (for lower-frequency feedback)
    • None, for open-loop speed control
    • Note: the Jrk does not support using quadrature encoders for position control
  • Ultrasonic 20 kHz PWM for quieter operation (can be configured to use 5 kHz instead)
  • Simple configuration and calibration over USB with free configuration software utility (for Windows, Linux, and macOS)
  • Configurable parameters include:
    • PID period and PID coefficients (feedback tuning parameters)
    • Maximum current
    • Maximum duty cycle
    • Maximum acceleration and deceleration
    • Error response
    • Input calibration (learning) for analog and RC control
  • Optional CRC error detection eliminates communication errors caused by noise or software faults
  • Reversed-power protection
  • Field-upgradeable firmware
  • Optional feedback potentiometer disconnect detection

Here is a quick comparison of the different Jrk versions, including the original ones that we do not recommend for new designs:


Jrk
21v3

Jrk
12v12

Jrk G2
21v3

Jrk G2
18v19

Jrk G2
24v13

Jrk G2
18v27

Jrk G2
24v21
Recommended max
operating voltage:
28 V(1) 16 V 28 V(1) 24 V(2) 34 V(3) 24 V(2) 34 V(3)
Max nominal
battery voltage:
24 V 12 V 24 V 18 V 28 V 18 V 28 V
Max continuous current
(no additional cooling):
2.5 A* 12 A 2.6 A 19 A 13 A 27 A 21 A
TTL serial, USB,
Analog, RC control:
Yes Yes Yes Yes Yes Yes Yes
I²C control: Yes Yes Yes Yes Yes
Hardware current limiting: Yes Yes Yes Yes
Dimensions: 1.35″ × 1.35″ 1.85″ × 1.35″ 1.0″ × 1.2″ 1.4″ × 1.2″ 1.7″ × 1.2″
Price: $49.95 $99.95 $49.95 $99.95 $99.95 $149.95 $149.95
1 Transient operation (< 500 ms) up to 40 V.
2 30 V absolute max.
3 40 V absolute max.
* Reduced from “3 A” based on newer, more stringent tests. The value now is directly comparable to the rating for the newer G2 21v3.

No new product announcement this year would be complete without our introductory special: be among the first 100 customers to use coupon code JRKG2INTRO and get up to three Jrk G2 motor controllers for 40% off. This coupon is good for the whole family, so you can use it for the 21v3 version we released today or for the larger units released earlier this year.

Build an oscilloscope using Raspberry Pi and Arduino

via Raspberry Pi

In this tutorial from The MagPi issue 71Mike Cook takes us through the process of building an oscilloscope using a Raspberry Pi and an Arduino. Get your copy of The MagPi in stores now, or download it as a free PDF here.

The oscilloscope is on the wish list of anyone starting out with electronics. Your author used to tell his students that it was your eyes, making electricity visible. Unfortunately, they are quite expensive: from a few hundred pounds to up to £5000 and beyond. However, by using an Arduino and some software on the Raspberry Pi, you can make a passable beginner’s oscilloscope.

Raspberry Pi Arduino oscilloscope magPi 71

Last September, in The MagPi #61, there was an article outlining the way the Raspberry Pi and the Arduino could be used together. We at the Bakery have been doing this for some time: we first had a major project in the Raspberry Pi Projects books by Andrew Robinson and Mike Cook. The big advantage of the Arduino from a signal processing point of view is that there is minimal interruption from the operating system and you can gather data at a constant uninterrupted rate. This is just what we need for making an oscilloscope. The idea is that the Arduino gathers a whole heap of voltage samples as fast as it can and stores it in memory. It then transfers that memory to the Raspberry Pi, again as fast as possible. The Pi plots the data and displays it, then the software allows measurements to be made on the samples.

So you can measure the time and voltage difference, known as a delta, between any two points on the samples. You can even display the frequency that the ‘time delta’ corresponds to by taking its reciprocal. These are features found in expensive oscilloscopes. We have also built in a trigger function; this is to synchronise the onset of the rapid data gathering with the occurrence of a positive transition on the input signal through a specified voltage. The result is that regular waveforms can look stable on the display.

The hardware

The schematic of the Arduino data acquisition module is shown in Figure 1.

Raspberry Pi Arduino oscilloscope magPi 71

Figure 1: Schematic of the Arduino acquisition module

You will notice that it is quite simple. It consists of three potentiometers for the oscilloscope’s controls and an AC coupled biased voltage input.

The capacitor ensures that no DC components from the input get through and gives a modicum of protection against overvoltage. The reference voltage, or ground, is similarly biased as +2.5V above the Pi’s ground level.

The use of a BNC socket for the input ensures that you can use this with proper oscilloscope probe leads; these normally have an X10 switchable attenuator fitted, thus allowing voltages of +/- 25V to be measured. Full construction details can be found in the numbered steps.

Raspberry Pi Arduino oscilloscope magPi 71

The BNC socket has a flat on each side of the thread to prevent it rotating with the twisting force it will be subjected to upon connecting any probe. We did this by first drilling an 8mm hole for the flats and then enlarging the hole with a circular file on each side to allow it to fit. An 8×12mm hole was filed opposite the USB connecter to allow access.

Arduino software

The software, or sketch, you need to put into the Arduino is shown in the Gather_A0.ino listing, and is quite simple. Normally an Arduino of this type will take samples at a rate of 10 000 per second — or as we say, a 10k sample rate. This is not too good for an oscilloscope, but we can increase this sample rate by speeding up the A/D converter’s clock speed from the default rate. It does not appear to affect the reading accuracy too much. By making this change, we can speed up the sample rate to 58k. This is much better and allows useful measurements to be made in the audio range.

Raspberry Pi Arduino oscilloscope magPi 71

We used an Arduino Nano and soldered the header pins to it. Then we took a 14 hole by 19 strips piece of stripboard and drilled some holes to fix it to the base of the box. You might want to make this longer than 19 strips if you are not using surface-mount resistors on the underside. Fit header sockets to the stripboard and break the tracks on the underside between the two rows.

So, first, the trigger function is optionally called and then the samples are gathered in and sent to the Pi. The trigger function has a time-out that means it will trigger anyway after one second, whether it sees a transition on the input signal or not. Then the three pots are measured and also sent to the Pi. Note here that the samples are ten bits wide and so have to be sent as two bytes that get joined together again in the Pi’s software.

Also note the use of the double read for the pots, with a bit of code between each. This ensures a more stable reading, as the input capacitor of the Arduino’s sample and hold circuit needs time to charge up, and it has less time than normal to do this due to the speeding up of the D/A. It does not affect the waveform samples too much, as in most waveforms one sample voltage is close to the previous one.

Raspberry Pi Arduino oscilloscope magPi 71

We then drilled three holes for the pots, and added the small slots for the anti-rotation lugs. Then we fitted the pots and wired them up using the diagram above. This is the view from inside the lid of the box; if you’re worried about touching the side of the box with your soldering iron, consider soldering them before attaching them to the box.

At the end of the transfer, the Arduino sits in a loop waiting for an acknowledge byte from the Pi so it can start again. This acknowledge byte also carries the information as to whether or not to use a trigger on the next sample.

Raspberry Pi Arduino oscilloscope magPi 71

Add the resistors and capacitors to the stripboard and wire up the BNC socket. Solder this up before mounting, otherwise you will melt the plastic. Remember to thread the central wire through the ground washer, crinkle washer, and nut before soldering it. Add labels Trigger, Time, and Volts to the knobs.

Finally, before each buffer full of data is gathered, pin 13 on the board is lit, and turned off after. This is so that we could time the process on a commercial oscilloscope to find the sample rate — something you will not have to do if you use the recommended AVR-type Arduinos running at 16MHz.

Pi software

The software for the Raspberry Pi is written in Python 3 and used the Pygame framework. It proved to be a lot more tricky to write than we first imagined, and is shown in the Scope.py listing. Python 3 uses Unicode characters by default, and allowed us to display the delta (Δ) and mu (μ) Greek characters for the difference and the time. The code first sets up the non-display part of the window; this is only drawn once, and then parts of it are updated when necessary. Depending on what type of Arduino you have, it can show up as a different USB port; we found that ours showed up as one of two ports. Comment out which one is not applicable when defining the sampleInput variable at the start of the listing.

Finally, we cobbled together a 168×78 pixel logo for the top-left corner, using a piece of clip art and fashioning the word ‘Oscilloscope’ from an outlined version of the Cooper Black font. We called it PyLogo.png and placed it in an images folder next to the Python code.

Using the oscilloscope

The oscilloscope samples at 58 kHz, which in theory means you can measure waveforms at 29 kHz. But that only gives you two samples per cycle, and as the samples can be anywhere on the waveform, they do not look very good. As a rough guide, you need at least ten points on a waveform to make it look like a waveform, so that gives a top practical frequency of 5.8 kHz. However, by using the Time Magnify options along with the Freeze function, you can measure much higher frequencies. The time and voltage cursor lines let you find out the values on any point of the waveform, and by clicking the Save functions, the current cursor is replaced by a dotted line that is fixed, and measurements can be made relative to that. The oscilloscope in action can be seen in Figure 2.

Raspberry Pi Arduino oscilloscope magPi 71

Figure 2: Taking measurements on a swept signal

Note that pressing the S key on the keyboard produces a screen dump of the display.

Taking it further

There are lots of ways you can take this project further. A simple upgrade would involve you having a second data buffer to allow you to display a saved waveform to compare against the current live one. You could also add a lower-speed acquisition mode to see slower waveforms. You can go the other way and use a faster Arduino so you can see the higher frequencies. This oscilloscope is AC coupled; you could add a DC coupling option with a switch potential divider and amplifier to the front end to extend the range of voltages you can measure. All these improvements, however, will need changes to the software to allow the measuring to take place on these wider-range parameters.

Finish the project

For the complete project code, download the free PDF of The MagPi issue 71, available on The MagPi website.

The post Build an oscilloscope using Raspberry Pi and Arduino appeared first on Raspberry Pi.

Friday Product Post: How Qwiic-Witted of You!

via SparkFun: Commerce Blog

Welcome back to another exciting Friday Product Post! This week we have four new products; it all starts with the new NeuroSky MindWave Mobile 2 to help get your EEG projects going. After that we have two Qwiic-enabled boards, the SparkFun Qwiic Flex Glove Controller and the SparkFun Qwiic Mux Breakout. Rounding out the pack we have a new pair of flush cutters from Xcelite.

Just as a reminder: You have until the 22nd of July to get a free SparkFun Arduino Qwiic Kit if you already have $50 worth of product in your cart! After the 22nd, we will be moving onto the next free product, so make sure to get these deals while you can, because after that (or after the reserved units are gone) they will be gone! Find out how it works at our Four Weeks of Free page.

Now that that is all taken care of, let’s jump in and take a closer look at all the new products!

All together now: E-lec-tro-en-ceph-a-lo-graph-y!

NeuroSky MindWave Mobile 2

SEN-14758
$99.95

This is the MindWave Mobile 2 from NeuroSky, an EEG headset that safely measures and transfers power spectrum data (alpha waves, beta waves, etc.) via Bluetooth Low Energy (BLE) or Bluetooth Classic to wirelessly communicate with your computer, iOS or Android device. Simply slip this headset on to see your brainwaves change in real time! With the MindWave Mobile 2 you can monitor your levels of attention and relaxation — and even learn about how your brain responds to your favorite music. This headset is an excellent introduction to the world of brain-computer interface!


Make your own Power Glove!

SparkFun Qwiic Flex Glove Controller

SEN-14666
$39.95

Flex sensors are great for telling how bent something is in a project, but we’ve been running into issues with durability when using them in wearable applications like gloves. The SparkFun Qwiic Flex Glove Controller isolates the weak point on each flex sensor to allow for more permanent applications. Essentially, this board allows you to incorporate flex sensors into a glove to control lighting, sound and other effects, making it perfect for wearable and e-textile applications! To make it even easier to use this controller, all communication is enacted exclusively via I2C, utilizing our handy Qwiic system. However, we still have broken out 0.1"-spaced pins in case you prefer to use a breadboard.


Mux or Multiplexer, you decide!

SparkFun Qwiic Mux Breakout - 8 Channel (TCA9548A)

BOB-14685
$9.95

Have a bunch of sensors with the same I2C address? Put them on the SparkFun Qwiic Mux Breakout to get them all talking on the same bus! The Qwiic Mux Breakout enables communication with multiple I2C devices that have the same address, making it simple to interface with. The Qwiic Mux also has eight configurable addresses of its own, allowing for up to 64 I2C buses on a connection.


Flush Cutters - Xcelite

TOL-14782
$7.95

These are simple flush cutters from Excelite that give you a way to cut leads very cleanly and close to the solder joint. Diagonal cutters are good, but if you really need to get up close and personal, flush cutters are the way to go!


That’s it for this week, everyone! There are plenty of options available for you today to start a new project with. As always, we can’t wait to see what you make! Shoot us a tweet @sparkfun, or let us know on Instagram or Facebook. We’d love to see what projects you’ve made!

We’ll be back next week with even more fantastic new products!

comments | comment feed