Monthly Archives: September 2019

App note: Paralleling eFuses

via Dangerous Prototypes

ON Semiconductors guide to cover much higher current capacity from eFuses. Link here (PDF)

The standard 12 V, 5 V and 3.3 V electronic fuses from ON Semiconductor provide overcurrent and overvoltage protection and come in different current limit configurations. As an example, the 5 V NIS5452 eFuse has a recommended operational 5 A current limit. Sometimes the operating current for the user system might be much higher than the maximum allowed current limit provided by the eFuse.

App note: How to prevent thermal issues with high output current DC to DC converters in portable applications

via Dangerous Prototypes

Tips and tricks from ON Semiconductors on how to optimize high output current switching regulators thermal dissipation. Link here (PDF)

As power demand in portable designs is more and more important, designers must optimize full system efficiency in order to save battery life and reduce power dissipation. Energy losses study allows knowing thermal stakes. Due to integration and miniaturization, junction temperature can increase significantly which could lead to bad application behaviors or in worst case to reduce components reliability.

Friday Product Post: Starting with Artemis is Always a Plus!

via SparkFun: Commerce Blog

Hello, everyone! This week we have two new Artemis boards available, one in our Feather-compatible Thing Plus footprint, and the other as our new Edge 2 iteration. In addition, we are also releasing a new Qwiic-enabled Motor Driver to make your next robotics project as easy to set up as possible! Rounding out the week we have a USB 2.0 microphone used in our TJBot Kit that we hope can get some good use outside of the kit, as well. Now, let's jump in and take a closer look at all of our new products for the week!

Never a fuss with Artemis Thing Plus!

SparkFun Thing Plus - Artemis

SparkFun Thing Plus - Artemis

WRL-15574
$20.95

If you are looking for a board that (almost) does it all, look no further! The SparkFun Artemis Thing Plus takes our popular Thing Plus footprint and adds in the powerful Artemis module for ultimate functionality. Fully compatible with SparkFun's Arduino core, the modern USB-C connector makes it easy to program under the Arduino IDE, but for more advanced users who prefer to use the power and speed of professional tools, we've also exposed the JTAG connector. To make the Thing Plus even easier to use, we've moved a few pins around to make the board Feather-compatible, and it utilizes our handy Qwiic Connect System, which means no soldering or shields are required to connect it to the rest of your system!


It's a 'cutting edge' FCC Certified board!

SparkFun Edge 2 Development Board - Artemis

SparkFun Edge 2 Development Board - Artemis

DEV-15420
$15.95

SparkFun's Edge 2 development board is based around the newest edge technology, and is perfect for getting your feet wet with voice and gesture recognition without relying on the distant services of other companies. The truly special feature is in the utilization of SparkFun's open source and FCC-certified Artemis module, whose ultra-efficient ARM Cortex-M4F 48MHz (with 96MHz burst mode) processor is spec’d to run TensorFlow Lite using only 6uA/MHz. The SparkFun Edge 2 board currently measures ~1.6mA@3V and 48MHz and can run solely on a CR2032 coin cell battery for up to 10 days. Artemis sports all the cutting edge features expected of modern microcontrollers, including six configurable I2C/SPI masters, two UARTs, one I2C/SPI slave, a 15-channel 14-bit ADC and a dedicated Bluetooth processor that supports BLE5. On top of all that, the Artemis has 1MB of flash and 384KB of SRAM memory - plenty for the vast majority of applications.


It's finally time you had a way to set up a motor driver as 'Qwiic" as possible!

SparkFun Qwiic Motor Driver

SparkFun Qwiic Motor Driver

ROB-15451
$14.95

The SparkFun Qwiic Motor Driver takes all the great features of the Serial Controlled Motor Driver (SCMD) and miniaturizes them, adding Qwiic ports for plug-and-play functionality. Boasting the same 4245 PSOC and 2-channel motor ports as the SCMD, the SparkFun Qwiic Motor Driver is designed to communicate over I2C to make setting up your next robotic project as fast and easy as possible! Utilizing our handy Qwiic system and screw terminals for motor and power hook-up, no soldering is required to connect it to the rest of your system.


Kinobo USB 2.0 Mini Microphone

Kinobo USB 2.0 Mini Microphone

COM-14125
$5.95

This is a tiny USB Microphone from Kinobo that plugs into your laptop, desktop, Raspberry Pi, Jetson Nano Dev kit or anything with a USB port you may be using as a computer. There is no need to install any extra software as your OS should detect the device and automatically install it. Simply launch a program that requires microphone input, and away we go!


That's it for this week! 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!

comments | comment feed

Create a Scramble-style scrolling landscape | Wireframe issue 22

via Raspberry Pi

Weave through a randomly generated landscape in Mark Vanstone’s homage to the classic arcade game Scramble.

Scramble was developed by Konami and released in arcades in 1981. Players avoid terrain and blast enemy craft.

Konami’s Scramble

In the early eighties, arcades and sports halls rang with the sound of a multitude of video games. Because home computers hadn’t yet made it into most households, the only option for the avid video gamer was to go down to their local entertainment establishment and feed the machines with ten pence pieces (which were bigger then). One of these pocket money–hungry machines was Konami’s Scramble — released in 1981, it was one of the earliest side-scrolling shooters with multiple levels.

The Scramble player’s jet aircraft flies across a randomly generated landscape (which sometimes narrows to a cave system), avoiding obstacles and enemy planes, bombing targets on the ground, and trying not to crash. As the game continues, the difficulty increases. The player aircraft can only fly forward, so once a target has been passed, there’s no turning back for a second go.

Code your own scrolling landscape

In this example code, I’ll show you a way to generate a Scramble-style scrolling landscape using Pygame Zero and a couple of additional Pygame functions. On early computers, moving a lot of data around the screen was very slow — until dedicated video hardware like the blitter chip arrived. Scrolling, however, could be achieved either by a quick shuffle of bytes to the left or right in the video memory, or in some cases, by changing the start address of the video memory, which was even quicker.

Avoid the roof and the floor with the arrow keys. Jet graphic courtesy of TheSource4Life at opengameart.org.

For our scrolling, we can use a Pygame surface the same size as the screen. To get the scrolling effect, we just call the scroll() function on the surface to shift everything left by one pixel and then draw a new pixel-wide slice of the terrain. The terrain could just be a single colour, but I’ve included a bit of maths-based RGB tinkering to make it more colourful. We can draw our terrain surface over a background image, as the SRCALPHA flag is set when we create the surface. This is also useful for detecting if the jet has hit the terrain. We can test the pixel from the surface in front of the jet: if it’s not transparent, kaboom!

The jet itself is a Pygame Zero Actor and can be moved up and down with the arrow keys. The left and right arrows increase and decrease the speed. We generate the landscape in the updateLand() and drawLand() functions, where updateLand() first decides whether the landscape is inclining or declining (and the same with the roof), making sure that the roof and floor don’t get too close, and then it scrolls everything left.

Each scroll action moves everything on the terrain surface to the left by one pixel.

The drawLand() function then draws pixels at the right-hand edge of the surface from y coordinates 0 to 600, drawing a thin sliver of roof, open space, and floor. The speed of the jet determines how many times the landscape is updated in each draw cycle, so at faster speeds, many lines of pixels are added to the right-hand side before the display updates.

The use of randint() can be changed to create a more or less jagged landscape, and the gap between roof and floor could also be adjusted for more difficulty. The original game also had enemy aircraft, which you could make with Actors, and fuel tanks on the ground, which could be created on the right-hand side as the terrain comes into view and then moved as the surface scrolls. Scramble sparked a wave of horizontal shooters, from both Konami and rival companies; this short piece of code could give you the basis for making a decent Scramble clone of your own:

Here’s Mark’s code, which gets a Scramble-style scrolling landscape running in Python. To get it working on your system, you’ll first need to install Pygame Zero. And to download the full code, go here.

Get your copy of Wireframe issue 22

You can read more features like this one in Wireframe issue 22, available now at Tesco, WHSmith, and all good independent UK newsagents, and the Raspberry Pi Store, Cambridge.

Or you can buy Wireframe directly from Raspberry Pi Press — delivery is available worldwide. And if you’d like a handy digital version of the magazine, you can also download issue 22 for free in PDF format.

Make sure to follow Wireframe on Twitter and Facebook for updates and exclusive offers and giveaways. Subscribe on the Wireframe website to save up to 49% compared to newsstand pricing!

The post Create a Scramble-style scrolling landscape | Wireframe issue 22 appeared first on Raspberry Pi.

To Infinity and Beyond…the SIK programmed with Arduino

via SparkFun: Commerce Blog

The SparkFun Inventor's Kit v4.1 opens a world of possibilities with five different projects in the guide. Are you hungry for more? Have no fear - there are tons of sensors and shields you can hook up with your SparkFun RedBoard programmed with Arduino that will help take your projects to the next level. For more inspiration and ideas, check out these tutorials.

SIK Keyboard Instrument

We can use the parts and concepts in the SparkFun Invetor's Kit to make a primitive keyboard instrument.

Sensor Kit Resource Hub

An overview of each component in the SparkFun Sensor Kit, plus links to tutorials and other resources you'll need to hook them up.

Measuring Internal Resistance of Batteries

Classroom STEM activity that has students build a battery from a lemon, measure the open and closed circuit voltages, and determine the battery's internal resistance.

Light-Seeking Robot

We use parts from the SparkFun Inventor's Kit v4.0 to create a light-seeking robot that mimics the behavior of single-celled organisms.

Clap On Lamp

Modify a simple desk lamp to respond to a double clap (or other sharp noise) using parts from the SparkFun Inventor's Kit v4.0.

Endless Runner Game

We make a simple side-scrolling endless runner game using parts from the SparkFun Inventor's Kit v4.0.

Or check out these blog posts for ideas.

comments | comment feed

Using data to help a school garden

via Raspberry Pi

Chris Aviles, aka the teacher we all wish we’d had when we were at school, discusses how his school is in New Jersey is directly linking data with life itself…

Over to you, Chris.

Every year, our students take federal or state-mandated testing, but what significant changes have we made to their education with the results of these tests? We have never collected more data about our students and society in general. The problem is most people and institutions do a poor job interpreting data and using it to make meaningful change. This problem was something I wanted to tackle in FH Grows.

FH Grows is the name of my seventh-grade class, and is a student-run agriculture business at Knollwood Middle School in Fair Haven, New Jersey. In FH Grows, we sell our produce both online and through our student-run farmers markets. Any produce we don’t sell is donated to our local soup kitchen. To get the most out of our school gardens, students have built sensors and monitors using Raspberry Pis. These sensors collect data which then allows me to help students learn to better interpret data themselves and turn it into action.

Turning data into action

In the greenhouse, our gardens, and alternative growing stations (hydroponics, aquaponics, aeroponics) we have sensors that log the temperature, humidity, and other important data points that we want to know about our garden. This data is then streamed in real time, online at FHGrows.com. When students come into the classroom, one of the first things we look at is the current, live data on the site and find out what is going on in our gardens. Over the course of the semester, students are taught about the ideal growing conditions of our garden. When looking at the data, if we see that the conditions in our gardens aren’t ideal, we get to work.

If we see that the greenhouse is too hot, over 85 degrees, students will go and open the greenhouse door. We check the temperature a little bit later, and if it’s still too hot, students will go turn on the fan. But how many fans do you turn on? After experimenting, we know that each fan lowers the greenhouse temperature between 7-10 degrees Fahrenheit. Opening the door and turning on both fans can bring a greenhouse than can push close to 100 degrees in late May or early June down to a manageable 80 degrees.

Turning data into action can allow for some creativity as well. Over-watering plants can be a real problem. We found that our plants were turning yellow because we were watering them every day when we didn’t need to. How could we solve this problem and become more efficient at watering? Students built a Raspberry Pi that used a moisture sensor to find out when a plant needed to be watered. We used a plant with the moisture sensor in the soil as our control plant. We figured that if we watered the control plant at the same time we watered all our other plants, when the control plant was dry (gave a negative moisture signal) the rest of the plants in the greenhouse would need to be watered as well.

Chris Aviles Innovation Lab Raspberry Pi Certified Educator

This method of determining when to water our plants worked well. We rarely ever saw our plants turn yellow from overwatering. Here is where the creativity came in. Since we received a signal from the Raspberry Pi when the soil was not wet enough, we played around with what we could do with that signal. We displayed it on the dashboard along with our other data, but we also decided to make the signal send as an email from the plant. When I showed students how this worked, they decided to write the message from the plant in the first person. Every week or so, we received an email from Carl the Control Plant asking us to come out and water him!

 

If students don’t honour Carl’s request for water, use data to know when to cool our greenhouse, or had not done the fan experiments to see how much cooler they make the greenhouse, all our plants, like the basil we sell to the pizza places in town, would die. This is the beauty of combining data literacy with a school garden: failure to interpret data then act based on their interpretation has real consequences: our produce could die. When it takes 60-120 days to grow the average vegetable, the loss of plants is a significant event. We lose all the time and energy that went into growing those plants as well as lose all the revenue they would have brought in for us. Further, I love the urgency that combining data and the school garden creates because many students have learned the valuable life lesson that not making a decision is making a decision. If students freeze or do nothing when confronted with the data about the garden, that too has consequences.

Using data to spot trends and make predictions

The other major way we use data in FH Grows is to spot trends and make predictions. Different to using data to create the ideal growing conditions in our garden every day, the sensors that we use also provide a way for us to use information about the past to predict the future. FH Grows has about two years’ worth of weather data from our Raspberry Pi weather station (there are guides online if you wish to build a weather station of your own). Using weather data year over year, we can start to determine important events like when it is best to plant our veggies in our garden.

For example, one of the most useful data points on the Raspberry Pi weather station is the ground temperature sensor. Last semester, we wanted to squeeze in a cool weather grow in our garden. This post-winter grow can be done between March and June if you time it right. Getting an extra growing cycle from our garden is incredibly valuable, not only to FH Grows as business (since we would be growing more produce to turn around and sell) but as a way to get an additional learning cycle out of the garden.

So, using two seasons’ worth of ground temperature data, we set out to predict when the ground in our garden would be cool enough to do this cool veggie grow. Students looked at the data we had from our weather station and compared it to different websites that predicted the last frost of the season in our area. We found that the ground right outside our door warmed up two weeks earlier than the more general prediction given by websites. With this information we were able to get a full cool crop grow at a time where our garden used to lay dormant.

We also used our Raspberry Pi to help us predict whether or not it was going to rain over the weekend. Using a Raspberry Pi connected to Weather Underground and previous years’ data, if we believed it would not rain over the weekend we would water our gardens on Friday. If it looked like rain over the weekend, we let Mother Nature water our garden for us. Our prediction using the Pi and previous data was more accurate for our immediate area than compared to the more general weather reports you would get on the radio or an app, since those considered a much larger area when making their prediction.

It seems like we are going to be collecting even more data in the future, not less. It is important that we get our students comfortable working with data. The school garden supported by Raspberry Pi’s amazing ability to collect data is a boon for any teacher who wants to help students learn how to interpret data and turn it into action.
 

Hello World issue 10

Issue 10 of Hello World magazine is out today, and it’s free. 100% free.

Click here to download the PDF right now. Right this second. If you want to be a love, click here to subscribe, again for free. Subscribers will receive an email when the latest issue is out, and we won’t use your details for anything nasty.

If you’re an educator in the UK, click here and you’ll receive the printed version of Hello World direct to your door. And, guess what? Yup, that’s free too!

What I’m trying to say here is that there is a group of hard-working, passionate educators who take the time to write incredible content for Hello World, for free, and you would be doing them (and us, and your students, kids and/or friends) a solid by reading it :)

The post Using data to help a school garden appeared first on Raspberry Pi.