Quantcast
Channel: DesignSpark - Home - DesignSpark
Viewing all 280 articles
Browse latest View live

Why every Engineer's Tool Box should include a Bare Conductive pen!

$
0
0

title

Like a Chef, any respectable Design Engineer should have a basic set of essential ingredients in their tool box to help tackle problems or add a little zest to the recipe. Say hello to Bare Conductive's electronic paint.

titleWhat started out as a University Project idea by Matt Johnson and Co to print electronic circuits onto human skin, quickly evolved into an awesome tool that every Maker, Hacker and Design Engineer should have in their tool box.

The applications for Bare Conductive’s waterbased nontoxic electrically conductive paint are endless. It can be used to learn the basics of Electronics by using it to paint circuits, or at the other end of the scale, drawing in a missing or broken tracks on a PCB.

Here are some great examples of where it has been used.

Drawing and Printing Circuits

title

Electric paint can be used to draw or screen print low voltage circuits.  When drawing circuits, it’s a bit like painting a wire.  When it’s dry, it becomes conductive.  Screen printing also means that it’s great for creating applications like wearable tech.  Electric paint can be used on all kinds of surfaces and substrates including walls, glass, textiles, plastics and wood.

Cold Solder Components

title

There is not always a soldering iron to hand to make a quick repair of your broken tech, or add or repair a component on a prototype that you have created.  Some applications may also be sensitive to heat.  Electric paint is an effective conductive adhesive and is applied straight from a handy pen or tub, and is ideal for securing things like through hole components.

Repair a Circuit

When prototyping or making quick repairs, Electric Paint can be a great hack for connecting up a broken track or break in a circuit on a PCB or a piece strip-board.  Its adhesive properties also mean that it will make a lasting repair.

Capacitive Sensor and Potentiometer 

titleBare Conductives electric paint has another great trick up its sleeve!  It makes a great capacitive sensor on almost any surface. 

Touch and proximity sensing can be achieved at a range of scales, it even works through some solid surfaces.

Touch Board

titleThe Touch Board is a fantastic companion of electric paint.  Its Arduino compatible and turns almost any material or surface into a sensor.  It’s great for creating interactive applications including sound via its onboard MP3 player. 

The Technical stuff

Processing Graph & Equation

Typical 55 Ω/Sq @ 50 microns or 32 Ω/Sq surface resistivity when using a brush/manual screen printing. The below graph illustrates how resistance changes with line shape and a simple equation can be applied to roughly predict surface resistance:  Resistance = 19.77(length/width) + 12

title

titleWhether you are looking to create fun projects, make repairs or lash together prototypes, Bare Conductive's electric paint is a handy addition to anyone’s draw or toolbox.

More about Bare Conductive

BUY NOW

title


The Wearable Technology Show is coming to London 10-11 March 2015

$
0
0

title

The Wearable Technology Show  takes place on 10-11 March 2015 at ExCeL in London and is the biggest event for wearables, augmented reality & IOT in the world and will include more than 100 technology innovators and 200 speakers.

title
Image credit Wearable Technology Show

If you're a design engineer researching Wearble Tech and The Internet of Things, this is a great place to hang out, learn and get ideas. The conference programme has a variety different tracks, offering delegates a unique opportunity to hear from some of the leading experts in wearable technology, view the latest product demonstrations from around the world and network with the industry. Microsoft, Amazon, Samsung, Martian and Mclaren will present keynote addresses.


Performance Sports track:
 

  • Michael Platt, Director Strategic Products Group, Microsoft
  • Duncan Bradley, Head of High Performance Design, Mclaren Applied Technologies
  • Kip Fyfe, CEO, 4iiii

Connected Living track: 

  • Stan Kinsey, President, Martian Watches
  • Ashutosh Tomar, Principal Engineer, Jaguar Landrover Research 

Innovation & IoT track:

  • Jorgen Nordin, Head of International Partner & Product Development, Jawbone
  • Anastasia Emmanuel, Director, UK Technology and Design, Indiegogo
  • Marco Della Torre, Co-Founder, VP (Product Science), Basis VP/Intel
  • Steve Wainwright, Vice President Sales and Marketing, Freescale
  • Justin Jungsup Lee, Wearable & Smartwatch Lead, LG Electronics
  • Philip Oldham, Head of Marketing, Samsung

Augmented Reality track: 

Product, Payments & Retail track: 

  • Jamie Heywood, Director, Amazon 

Smart Textiles & Fashion track:

  • Dominique Vicard, Primo1D
  • Francesca Rosella & Ryan Genz, Cute Circuit 

Medical track: 

  • Ariel Garten, Co-Founder and CEO, Muse/Interaxon
  • Ian Olsen, Executive Director, Maxim Integrated Products

Enterprise & M2m track:

  • Hakim Jaafar, Marketing Manager , STMicroelectronics
  • David Smith, Product Marketing Engineer, Texas Instruments

The event will also hold a Wearable Technology Start-Up Competition, a dedicated Hackfest and The Wearables 2015, sponsored by IBM; the winners of which will be announced at the after show networking party on 10 March at the Fox Pub next to ExCeL. Last year Wearables winners included Reebok, Fleksy and Virgin Atlantic.

Registration for the Wearable Technology Show is open now at http://www.wearabletechnologyshow.net/register.  

Follow on Twitter @wearabletecshow #WTS15 

title
Image credit Wearable Technology Show

マイクロチップ

Microchip Touch and Input Sensing Solutions

$
0
0

title

Microchip Technology Inc. is an American manufacturer of microcontroller, memory and analog semiconductors. Its products include microcontrollers (PICmicro, dsPIC/PIC24, PIC32), Serial SRAM devices, radio frequency devices, thermal, power and battery management analog devices, as well as linear, interface and mixed signal devices. Headquarters in Chandler, Arizona. It provides low-risk product development, low total system cost. In this article, we will focus on its touch and input sensing solutions and related products.

title

 Microchip's award winning technology covers a broad range of implementations for touch and other input sensing applications. With the help of its techniques, engineers can have the freedom to innovate with an industry leading, robust, touch implementation on Microchip’s vast range of PIC microcontrollers. It can be divided into four aspects: proximity, keys and Sliders; touch screen and touch pad controllers; 3D tracking and gesturing; haptics.

Proximity, Keys and Sliders

Firstly, let’s look at the Proximity, keys, Sliders and their related products. Microchip offers both turnkey products for a no code development plug-and-play solution, as well as a proven robust firmware solution that leverage their PIC microcontroller portfolio.

1. Microchip mTouch® solution

title

Microchip’s mTouch sensing solutions enable designers to easily design and integrate touch technologies into their applications.

Learn More

2. Products

  • RightTouch Turnkey Solutions
  • mTouch Firmware Solutions
  • mTouch Proximity Solutions                                            

Product Details

Touch Screen and Touch Pad Controllers

Microchip’s offers a broad portfolio of touch solutions for resistive and projected capacitive applications that make it easy for designers to integrate touch-sensing interfaces. The touch technology is high flexibility, sophisticated and easy integration

Learn more

1. Resisitive Touch Screen Controller

  • AR1011-I/SSsupports UART communication                                        Buy  Now
  • AR1011-I/SO10 bit 140sps UART 4, 5, 8-Wire, 20-Pin SOIC                 Buy  Now      

2. Projected Capacitive Touch Controller

  • MTCH6102-I/SS:Low-power projected capacitive touch controller Buy  Now
  • MTCH6102-I/MV: Projected Cap. Touch Controller UQFN28              Buy  Now

3D Tracking and Gusturing

Microchip’s E-field sensing technology detects the proximity of a human hand and gives accurate X-Y-Z coordinates and recognized 3D gesture. Microchip's MGC3130 is the world’s first electrical near field (E-field) 3D Gesture Controller. Based on Microchip’s patented GestIC® technology, it enables to detect gestures of the user and to track a movement. Interaction with a devices becomes as simple and intuitive as a wave of the hand. With the MGC3xxx controller family Microchip offers a true single chip solution for gesture recognition, removing the need of host processing completely. There are many application now,  for example, it been used for controling volume of audio, switching light and you also can see it in PC/PC Peripheral 3D TouchPad.

>>>>>READ MORE

Haptics Technology

As designers increasingly look to touch sensing as the primary user interface, haptics provide feedback that enhances the design and usabilit. To give users mechanical feedback, Microchip offer turnkey products incorporating Immersion’s Technology including their Haptic Effects Libraries. Microchip's Haptic technology, or haptics, provides tactile feedback to the user by applying forces or vibrations. It can not only restore the mechanical feel, improve user experience, but also provide more realistic experience, reduce distraction and increase safety. Therefore, it is widely used in many areas, including appliances, industrial, automotive and gaming.

>>>>>READ MORE

Microchip mTouch® solution —— Proximity, Keys and Sliders

$
0
0

title

Microchip’s mTouch sensing solutions can make designers to easily design and integrate touch technologies into their applications. The mTouch sensing solutions are proven and used in many applications worldwide due to its superior noise robustness, no additional external component requirements and ease of implementation.

In this article, we will introduce the relevant products. For example, about the RightTouch turnkey solutions, we list the CAP11XX and CAP12XX product family. What’s more, it has the Industry’s broadest portfolio, such as the 8-bit, 16-bit and 32-bit PIC® MCU products. Let’s have a look.

Product

1. Microchip MCUs with Capacitive Voltage Divider (CVD)          Learn more

 

2. mTouch Proximity Solutions

MTCH112-I/MF    Dual-Channel Proximity/Touch Controller         Buy Now

title

 

3. RightTouch® Turnkey Solutions

  • CAP11XX Family

title

CAP1128-1-BP-TR     Buy Now

  • CAP12XX Family

title  

Evaluation Board

  • Evaluation Board for RightTouch Turnkey Solution

title

CAP1298 Capacitive Touch Evaluation Board               Buy Now

CAP1188 Capacitive Touch Evaluation Board            Buy Now

  • Evaluation Board for mTouch Firmware Solution based on PIC MCUs

mTouch evaluation kit

title

The enhanced mTouch Capacitive Touch Evaluation Kit provides a simple platform for developing a variety of capacitive touch sense applications using PIC16F, PIC18F, PIC24F and PIC32 microcontrollers. The Diagnostic Tool provided allows the user to analyze application-critical information in real-time as it relates to touch sensor behaviour.

 

Buy Now

                         

Software

The mTouch Keys & Slider Software Package for PIC MCUs enables you to easily integrate a stylish touch interface such as keys, sliders and wheels into your embedded application. The Software Package contains a very detailed documentation to get you started.

   mTouch  SW package V1.43                          Download

   mTouch  SW package 1.43 Help                    Download

Version 1.43.00 Features:  

         • MPLAB X Support

         • Support for CVD-based Capacitive Touch using PIC12F and PIC16F MCU

         • Support for CTMU-based Capacitive Touch using PIC18F & PIC24F MCU

         • Support for CVD-based and CTMU-based Capacitive Touch using PIC32 MCU

         • Demos can be run directly on mTouch Capacitive Evaluation kit (DM183026-2)

Microchip MCUs with Capacitive Voltage Divider (CVD)

$
0
0

Capacitive sensors are PIC® MCU pins connected to an area of conductive material through an optional series resistor. As the environment changes around the sensor, the capacitance of the conductive material relative to ground will change. While there are many methods for measuring the capacitance of the pin, most require special hardware or an advanced digital filtering system to achieve a clean signal.

Microchip’s differential Capacitive Voltage Divider (CVD) acquisition technique has been developed to require only an Analog-to-Digital Converter (ADC) and a minimal amount of digital processing overhead. This allows CVD to be implemented on the widest range of devices.

Microchip's 8-bit PIC MCUs

titlePIC microcontrollers are finding their way into new applications like smart phones, audio accessories, video gaming peripherals and advanced medical devices. Microchip provides solutions for the entire performance range of 8-bit microcontrollers, with easy-to-use development tools, complete technical documentation and post design-in support through a global sales and distribution network. 

  •  Featurestitle
  • Purchase

PIC12LF1552       Buy Now

PIC16LF1512       Buy Now

PIC18F46J50        Buy Now

  

16-bit PIC24 MCUs 

         title   title

Microchip's 16-bit, PIC24 MCUs and dsPIC® Digital Signal Controllers provide designers with an easy upgrade path from 8-bit PIC® microcontrollers and a cost effective option to 32-bit MCUs. The broad product line includes everything from eXtreme Low Power microcontrollers to high performance digital signal controllers. With single cycle execution, deterministic interrupt response, zero overhead looping, and fast DMA, the dsPIC family also adds a single cycle 16x16 MAC and 40-bit accumulators, ideal for math intensive applications like motor control and digital power. 

  • Features

title

Buy Now    

title

Buy Now

Latest products

New EFM8 range


The catalog of “Design a simple three-axes CNC mill using DesignSpark Mechanical2.0”

New Parallella Linux Image and Epiphany BASIC

$
0
0

title

New Parallella Ubuntu release with numerous improvements and a BASIC interpreter that runs on Epiphany cores and has some parallelism support.

A new Parallella Ubuntu image release was made for headless systems at the end of January and this includes numerous significant improvements, including:

  • Thermal daemon which monitors the temperature and shuts down the Epiphany chip if it gets too high.

  • Lower idle power consumption.

  • Improved I/O bandwidth.

  • New Epiphany SDK with software cache.

  • FPGA bitstream generated using Vivado.

The new thermal daemon is great news and means that there is much less chance of damaging a board with higher loads and insufficient cooling. Lower idle power consumption is always a good thing and should also help with reducing the heat generated. The I/O speed improvements are presently modest, however, further performance improvements are also in the pipeline.

The software caching feature provides a way of allowing larger programs to run efficiently on the Epiphany co-processor. Previously, a linker script was used to control which parts of a program were to be located in Epiphany vs. slower external memory. Whereas now it's possible to have the cache manager dynamically pull functions from external to internal memory prior to execution. There is obviously a copy overhead the first time, but the next time around this won't need to happen. For further details and examples see the Epiphany SDK wiki entry.

The final improvement noted above will be welcome news to many with projects that call for custom FPGA designs, as the Vivado Design Suite is slowly replacing ISE as the toolchain for Xilinx devices. The move to using Vivado has been on the cards for some time, however, it's not a simple move to make with a device as complex as the Zynq and a platform such as Parallella.

Loading the image and logging in

title

The process used to create an SD card has also been improved and after downloading an image this is now simply a two step procedure: uncompress and write! No more having to manually populate the BOOT partition with the appropriate kernel and FPGA bitstream. Which was simple enough, but had caught some people out in the past. Although note that it's still important to ensure that the correct Zynq version is selected — either 7010 or 7020 — and HDMI or headless.

Once you've booted the new image it's now possible to SSH in using the hostname “parallella.local” or “parallella.” — depending on which O/S you are running — thanks to the wonder of multicast DNS (a.k.a. Zeroconf/Bonjour/Avahi). Although obviously if you have more than one board you will need to update the hostname(s) in order to take advantage of this feature.

Epiphany BASIC

Last Friday community member, polas (Nick), shared details of a new BASIC dialect and interpreter developed for the Epiphany chip. Dubbed Epiphany BASIC, the aim of the project is to enable novices to get Epiphany code up and running and results within a very short time frame, thereby lowering the barrier to entry and providing reward much sooner.

Installing Epiphany BASIC is as simple as cloning the GitHub repository, and then running make followed by sudo make install. After that you can use your text editor of choice to create a file containing a BASIC program, before then executing it with the ebasic command.

title

BASIC is perhaps not the first language that springs to mind when thinking of parallel programming. However, this will present a much more gentle on-ramp for complete novices who are eager to make use of the Epiphany accelerator, and in doing so will hopefully inspire more to invest the additional time required to learn more advanced programming languages and concepts.

Andrew Back

More about Parallella in the DesignSpark Parallella Design Centre

DSMを使いこなそう!シリーズ まとめ

$
0
0

10 Things you can do with Electric Paint

$
0
0

title

Electric Paint, is a non-toxic electrically conductive material, which is as simple to use as poster paint, and dries in under 15 minutes to become conductive. It contains no metals, solvents or irritants, and can be screen printed, sprayed or brushed.

Electric Paint is suitable for application on a wide range of materials from fabric, to wood, to paper. Whether in a 50ml jar, or our handy 10ml tube format, Electric Paint is an excellent tool for novices and professionals to prototype and experiment with electronics.

titleUse an Electric Paint pen to create circuitry on almost any surface. Squeeze the pen gently to dispense a thin bead of material. Leave for 15 minutes to dry and start testing. Remember that what you create doesn’t need to look like a circuit diagram. Electric Paint is great for creating graphical circuits that can tell both an electrical and visual story.


title

Electric Paint is perfect for making solder joints or repairs in a variety of unique scenarios. Whether you’re attaching a through hole component to a PCB, replacing soldering irons in the classroom or attaching components to a heat-sensitive substrate, Electric Paint works as an effective conductive adhesive.

title

E-textiles presents some great applications for Electric Paint. Use the pen to terminate conductive thread and connect it to a microcontroller. Use the Electric Paint Jar to screen print a pattern onto fabric. Electric Paint works well on most fabrics, natural and synthetic, but remember, it’s not washable.



title

titleWhat’s the best thing about Electric Paint? It works almost anywhere. Because Electric Paint is truly a paint it’s appropriate for use on a range of substrates including paper, cardboard, wood, fibreglass, most plastics, and textiles. Apply it with a brush, stencils or even spray it onto a surface to put your project wherever you want.

titleWant to create something precise and repeatable? Try screen printing. Electric Paint is easy to screen print through textile type meshes resulting in predictable, reliable and consistent performance. The variety of substrates available to screen printing means your designs can live almost anywhere, whether its a postcard or a t-shirt.

title

titleElectric Paint is perfect for repairing small breaks in circuits on window defoggers, membrane switches and PCBs. The viscous nature of the material makes it easy to apply and manipulate. It’s adhesive properties means that it will stick to the surface and provide a lasting repair. Make sure to isolate any repair from excess moisture and your device will be back up and running.

title

titleWant to experiment with creating a potentiometer or tune the resistance of a circuit? The resistance of the circuit is directly controlled by the application of the paint, making manipulation and experimentation easy. Take a look at the Electric Paint Application notes for more.

titleTurn a pad of Electric Paint into a capacitive sensor on almost any surface. Experiment with touch and proximity sensing at a range of scales. Use the Touch Board, an Arduino or another suitable microcontroller to discover the magic of applying interaction to almost any object.

title

Electric Paint is non toxic and easy to use, making it perfect for the classroom. Teachers love demonstrating basic circuits and students love bringing their paint to life. Use Bare Conductive’s range of classroom-appropriate kits or invent your own lessons using Electric Paint tutorials as a guide.

titleElectric Paint is all about experimentation. Don’t want to draw a circuit, cold solder a component or repair your TV remote? Great! Why not try combining Electric Paint with other materials or processes. Making isn’t just about following instructions, it’s about inventing and finding your own way and discovering the incredible potential of this new material.

Buy Bare Conductive

Find Tutotial Content on Line

Bare Conductive's Make Page is full of examples to get you excited about making with Electric Paint.. There area a range of technical tutorials, as well as a lot of community projects submitted by makers and design engineers like you.

title

Related Content-
Why every Engineer's Tool Box should include a Bare Conductive pen! - Blog 

High temperature capacitors

大赛

Home automation with Raspberry Pi 2 and Node-RED

$
0
0

Node-RED is a visual tool for wiring the Internet of Things that can be run on a Raspberry Pi and allows for rapid prototyping of projects. In this tutorial we will first set up Node-RED on a Raspberry Pi 2, before creating a flow that will read a temperature sensor and control a LightwaveRF mains socket.

title

We will assume your Pi is already set up on the network and you can SSH into it.
Ensure your distribution is up to date:

$ sudo rpi-update

$ sudo reboot

Wait for the Pi to reboot, log back in and execute:

$ sudo apt-get update
$ sudo apt-get upgrade

Hardware

We will be using the following hardware:

Connect the hardware as shown in the diagram below:

title

Here we are connecting the temperature sensor and wireless transmitter to the Raspberry Pi. Ensure each has power, ground and data connections and that they are connected to the correct pins on the Pi's GPIO header. Also ensure the aerial wire is connected to the wireless module.

Setting up LightwaveRF control

In order to control wireless mains sockets we need to install wiringPi and lightwaverf-pi. First install wiringPi:

$ git clone git://git.drogon.net/wiringPi
$ cd wiringPi
$ ./build

Now test that wiringPi installed correctly:

$ gpio -v
$ gpio readall

title

Next install lightwaverf-pi:

$ git clone https://github.com/leachj/lightwaverf-pi.git$ cd lightwaverf-pi
$ make$ sudo make install

title

Execute the test send command:
$ sudo ./send 0
This should execute without errors. Next we will test wireless control by attempting to pair the Pi with the mains socket:
Plug the mains socket in and put it into pairing mode by holding down the button on the side until the indicator light starts flashing orange/blue. Next transmit an on signal:
$ sudo ./send 1

The socket should pair with the Pi. The status light will flash more quickly to show this has successfully completed. You should now be able to turn the socket on and off using the following commands:
$ sudo ./send 1
$ sudo ./send 0

Installing Node-RED

First we will install Node.js (note this process is different on the Pi 2 compared to earlier Pi boards):

$ curl -sL https://deb.nodesource.com/setup | sudo bash -
$ sudo apt-get install -y build-essential python-dev python-rpi.gpio nodejs

Next install Node-RED:
$ sudo npm install -g node-red

Start up Node-RED:

$ node-red-pi --max-old-space-size=128

This will start the Node-RED server on the Pi. Open a new web browser tab and navigate to your Pi's IP address, port 1880. You should see the Node-RED environment loaded and ready to use.

title

Now we will add a new node to make use of the DS18B20 temperature sensor from within Node-RED. There are two kernel modules needed for correct operation and we will load these first:

$ sudo modprobe w1-gpio
$ sudo modprobe w1-therm

Whilst it is fairly simple to load these modules manually we will configure them to automatically load at boot time. We can do this by editing the /etc/modules file:

$ sudo nano /etc/modules

add the names of the modules, each on their own line:

title

Now we will install a node to read data from the ds18b20 module:

$ cd /usr/lib/node_modules/node-red
$ sudo npm install node-red-contrib-ds18b20 --save

Next we need to add a line to the /boot/config.txt file:

$ sudo nano /boot/config.txt

At the end of the file add the following line:

dtoverlay=w1-gpio,gpiopin=4

Save and exit the file, then reboot and log back in to your Pi.
We will now test that the temperature sensor is properly connected to the Pi and data can be retrieved:

$ cd /sys/bus/w1/devices
$ ls

title

You should be able to see something like the above - the sensor here is shown as 28-000006439bd5. Change into the sensor directory:

$ cd <sensor_id>
e.g.
$ cd 28-000006439bd5

The sensor will write information to the w1_slave file, so we can look in there to see if there is any data:

$ cat w1_slave

This should show two lines. If so, the sensor is connected to the Pi and giving it data.

Building a Node-RED flow

Check that the sensor node has installed correctly so that we can get our temperature data into Node-RED:

$ node-red-pi

title

Open your web browser and go to your Pi's IP address, port 1880. You should see the new node 'ds18b20' towards the bottom of the left menu. Drag the node into the workspace. We need to configure the node and tell it which sensor ID to use, to do this double-click on the node to open the edit pane. You should be able to select the device ID from the first drop-down tab. Note that you can also change the interval time between temperature readings - default is 1 minute. You will have to wait until the interval time has passed until the first message hits the debug console, so you may wish to change the interval time to something like 0.1 during testing.

Drag in a debug node and connect the two nodes together. When you have multiple nodes connected in the Node-RED workspace it is referred to as a flow. Before the flow runs on the server it needs deploying. Click the Deploy button in the top right of the workspace to deploy the flow. If you make any changes you will need to re-deploy before they take effect to what is running on the server.

title

Now that we have a tested a basic flow using the sensor we can build a more complex flow that will:

  • Read temperature from sensor
  • Decide if it's cold enough to turn socket (heater) on
  • Decide if it's the right day to turn the socket on
  • Decide if it's the right time of day to turn the socket on
  • Change socket status to on of off

Node-RED comes bundled with many useful nodes, one of which is the debug node used above. We will also use the inject node to assist with testing. This allows the sending of message payloads by simply clicking a button on the node, meaning that you don't have to wait for time based data to test your code.

We will make use of a function node to implement our logic and decide when the socket should be turned on and off.

Finally, the exec node allows us to execute shell commands from within Node-RED. We will make use of this node to execute the send command we used earlier to control the wireless socket.

Drag an exec node into the workspace. double-click it to open the editor pane and add the following details into the 'Command' field:

sudo /<path-of-your-lightwaverf-pi-install>/send
e.g.
sudo /home/pi/SW/lightwaverf-pi/send

title

Add text into the 'Name' field - we used 'switchExec'. Naming your nodes helps for readability, especially with larger, more complex flows. This exec node will now try to execute the command given each time the node receives an input message. We can send the command additional arguments within the message payload. Notice how our command does not include a '0' or '1' argument that we used previously. This is because we will pass these arguments to the exec node in our flow.

We will get our function node to do this later, but for now we can use inject nodes to test that the exec node is functioning correctly. Drag in two inject nodes. Double click each one in turn and ensure that the 'Payload' type is 'string', and that each has either a 0 or 1 in the 'payload' field.

Connect the output of each inject node to the exec node, the top exec output to the debug node and deploy the flow. Now, when you click the button on either of the inject nodes you should see the exec node write 'sending command' to the debug console. You should also notice that your mains socket is being switched on and off according to your clicks. Note it is recommended that you do not switch your socket very quickly as it you may cause damage to it by doing this.

Now that we have the wireless control working we can build our flow and add our custom code to our function node. Drag in a function node and wire everything up as shown below.

Double click your function node and add the following code to it:

//Control mains socket based on day, hour and temperature

//create date object
var d = new Date();
var day = d.getDay();
var hour = d.getHours();
var DAY = day;
var HOUR = hour;

//line to accept numbers in for testing
//var day = parseInt(msg.payload);

// change var DAY to 0 or 1 depending on day - we want Monday-Friday
if (day >= 1 && day <= 5) {
  DAY = 1;
}
else{
DAY = 0;
}

// change var HOUR to 0 or 1 depending on hour - we want 0700-1800
if (hour >= 7 && hour <= 17) {
  HOUR = 1;
}
else{
HOUR = 0;
}

// Format payload out to 0 or 1 depending on HOUR, DAY and temp/msg.payload - we want day/time as above and temperature setting of 23 degrees C
if (HOUR == 1 && DAY == 1 && msg.payload <= 23) {
  msg.payload = 1;
}
else{
msg.payload = 0;
}

return msg;

title

Deploy the flow. You now have a mains socket that is being turned on and off according to the temperature being read by your Pi. One final thing we will do now is to configure Node-RED to run at startup. We will use PM2 - a process manager for Node.js:

$ sudo npm install -g pm2

Determine where node-red is installed on your Pi:

$ which node-red
$ pm2 start <path-to-your-node-red>/node-red --node-args="max-old-space-size=128" -- -v

This will start Node-RED in the background.

title

You can check up on the status of PM2 process in several ways:

$ pm2 status
$ pm2 info node-red
$ pm2 logs node-red

Now tell PM2 to start on boot:

$ pm2 startup

Reboot and check everything is working. Node-RED should start as configured and begin running the flow.

The function node can be altered as you see fit - try experimenting with different values or different conditions. There are also other output nodes that you could easily add, such as the Twitter node which could be used to notify you when a socket has been turned on or off.


Bourns smaller solutions

Intel「Edison」ボードの仕様と初期環境構築

$
0
0

こちら(英文)のブログの翻訳記事になります

title

切手サイズのIoT向け開発プラットフォーム

Intel EdisonのプロトタイプがCES(米国のエレクトロニクス機器展示会「コンシューマー・エレクトロニクス・ショー」)で発表された時の衝撃は業界に大きな波紋を起こしました。Linuxが動くPentiumクラスのデュアルコアSoC、無線LAN、Bluetooth、をわずかSDカードサイズのボード上に搭載するというものだったからです。その後、実際に発売された製品では、SDカードサイズに収めることはかなわなかったものの、当初の宣言した以下のような機能を実現していました。。

  • デュアルコア Intel Atome 500MHz

  • Intel Quark マイクロコントローラー 100MHz(ViperOS RTOSを実行可能)

  • 1GB RAM

  • 4GB flash

  • WiFi & Bluetooth 4.0

  • 70ピンのコネクタ(ヒロセ電機の「DF40C(2.0)-70DS」)

この記事ではArduino互換機能が追加されたEdison Kit for Arduinoを用いて解説していきます。

title

Intelの提供するMakerポータルEdison Getting Started Guide for Linuxの内容に従って基本セッティングとテストを行いました。

ハードウェアのセットアップ

箱の中にはEdisonモジュールとArduinoベースボード、小さな袋が入っていました。このような開発ボードでは省略されがちな取り付け穴はベースボード上に設けられていました。

title

モジュールをベースボード上に固定した後、2本のUSBケーブルを用いてラップトップに接続しました。.

title

ボードを接続すると、「Edison」という名前のUSBストレージデバイスと新しいネットワークインターフェース「USB0」がラップトップ上で確認することが出来ます。

title

title

コンパイルとArudinoスケッチのダウンロード

EdisonとGalileoボードをサポートしている「Intel Edison of the Arduino IDE」をインストールして実行しましょう。これはAVRおよびARMベースのArduinoボードで使用されているオリジナルのArduino IDEと全く同じものです。

IDEをインストールし、サンプルをダウンロードしましょう。コンパイルして動作を確認する前に、正しいボードと正しいシリアルポート(Linuxを使用している場合は「ttyACM0」)を選択する必要がありました。

title

設定を完了すると、ボード上の2つ目のLEDが点灯し、On/Offを繰り返しました。

Linuxとネットワーク構成へのログイン

あなたは何故2本のUSB接続が必要なのか、何故OTG単独でマスストレージとネットワークインターフェースを同時に提供しないのかと疑問に思うかもしれません。それはUSB-UARTブリッジとコンソールを提供するために使用されるSoC上のUARTへと順番に接続されているからです。

Getting Started GuideのStep5は、Linuxユーティリティやスクリーン、UARTへの接続を使用するためにはWifiコンフィグを使用する必要があることを示しています。

title

バグがあるのか、cofigure_edisonコマンドは--setuo optionを実行できませんでした。しかし、-wifi optionが実行でき、オプションを指定せずにコマンドを実行することでセットアップを実行できました。

title

この時点でラップトップからEdisonにアクセスすることができますが、ガイドに記載されているWebページからのアクセスはできませんでした。Edison Yocto Linuxシステムはインストールされたソフトウェアを管理するためにOPKGと呼ばれるパッケージマネージャーを使用しています。故にインストールされているWebサーバーソフトウェアを特定することができればガイド通りに動作するかもしれない。

title

クイック検索を用いて探してみましたが、軽量なWebサーバーを作成するために使用されるlibwebsockets以外を見つけることができませんでした。しかし、ラップトップからエジソンにSSHで接続することができるので、必要に応じてWebサーバーをインストールするのは簡単なことでしょう。

title

もちろん、Edisonをネットワーク接続したい時に無線LAN環境がない、もしくは使いたくない場合、USBネットワークインターフェースもあることを忘れないでください。

(Re-)flashing

インストール済みのソフトウェアの新しいリリースがあった時、OPKGリポジトリ経由でアップグレードすることができます。しかし、デバイスを完全にリフラッシュすることでも可能です。方法は非常に簡単で、まず最新のYoctoシステムイメージをダウンロードし、EdisonでUSBストレージに抽出します。そしてコンソールから"reboot ota"を実行する。

title

正常に完了しない場合はハードウェア破損の恐れがあります。

title

LinuxカーネルとLinuxアプリケーションの構築

title

EdisonのLinuxシステムはYoctoシステムを利用して構築されています。モジュール形式でカスタムLinuxの作成やクロスコンパイルなどの便利な機能を利用することができます。カスタムカーネルとアプリケーションはこのシステムを利用して構築され、LinuxやWindows、Mac用のアプリケーションをEdison SDKを介して提供します

こちらのブログ(英文)にてオーディオ・ビデオキャプチャを可能にするための方法を紹介しています。

開発者向けオプション

Intelはより簡単にIoT向けアプリケーション作成が行えるように、様々なライブラリやプラグイン、サンプルを提供しています。それらは大まかに分けると3つのグループで構成されています。
・Arduino
・JavaScript
・C/C++
ライブラリとサンプルはArduino開発用のものが提供されています。
CチュートリアルにはIntel独自のIoTきっとと一緒に、人気のMQTTとZero MQメッセージングプラットフォームを使用するためのものが含まれています。サンプルはnode.js形式で提供されます。

まとめ

Edisonモジュールを実際に目にしたとき、想像以上の小ささに驚くことでしょう。小ささだけではなく、開発者が簡単に使用できるように構成やアップグレードなどのプロセスに細心の注意が払われています。
最初、YoctoとPokyよりもUbuntuやDebianなどのLinux環境の方が良かったのではないかと思う方もいると思います。しかし、Yocto環境によってオーダーメイドのシステム構築が可能であることを考えると、本当に理にかなった選択です。Linux財団の後援下にある開発作業グループや家電メーカーがYoctoを好むのはそういった理由があるからです。

Arduinoのようにキットはサイズも大きく、値段も高くなってしまいます。また、Arduino環境下でアプリケーションを作成すると最も効率的な埋め込みコードにならないこともあります。しかし非常に多くの人がArduinoプラットフォームに精通しています。それは初心者にとって非常に取っ付きやすいコンピューティングプラットフォームを持っているからです。
まずはArduinoシールドとブレッドボードを利用して、試作機を開発し、アプリケーションの検証を行うことをおすすめします。そしてその経験を生かしてマス市場向けの完全なカスタムAtomベースのボード作成へとステップアップしていきましょう。

Fast forward

NEW ML-XT™

WEBENCH® Power Designer and DesignSpark PCB

$
0
0

WEBENCH® from Texas Instruments is one of the best-known suites of completely free online tools available to design engineers today. The WEBENCH Design Environments use advanced software algorithms and visual interfaces to help engineers generate, optimise and simulate customised designs for power, lighting, filtering, clocking and sensing applications within minutes or even seconds on both a system and Bill-of-Materials (BOM) cost level before committing to a design. A key tool in the WEBENCH suite is WEBENCH Power Designer, which in conjunction with an advanced and unrestricted board layout tool such as DesignSpark PCB can now enable the creation of a complete power supply board layout in minutes.

 

Power Designer

The WEBENCH Power Designer environment provides end-to-end power-supply designs and prototyping tools, helping to save valuable time in the product development cycle. Rather than having to rely on application notes and the manual copying of reference layouts, the tool uses powerful design algorithms to quickly create a custom PCB board layout, and what is more engineers can avoid unwanted noise and thermal problems as it can take multiple design iterations to achieve optimal layout.

Included in the WEBENCH suite is a device selection tool that helps designers find the most suitable switching regulator or MOSFET controller for a power supply design, for example. Footprints for each component of the WEBENCH design are included and the power supply design can be simply created with the push of a button. In addition, the tool’s Optimizer Dial enables the differentiation and comparison of designs in terms of footprint, efficiency and system cost.

 title

 The WEBENCH Power Design default setting in this demonstration focuses on a low risk balanced design where efficiency, footprint, and BOM cost have equal weight in the selection of the regulator and supporting components. For devices with adjustable frequencies, the centre frequency is selected.

 

PCB Export

Once a power-supply PCB layout has been created and simulated, a new feature in WEBENCH Power Designer now allows engineers to export the complete design into DesignSpark PCB. Called WEBENCH PCB Export, this new option will take any WEBENCH power design that is enabled for export and convert it ‘on-the-fly’ to DesignSpark PCB, in addition to several other CAD platforms. WEBENCH PCB Export essentially allows engineers to open a design in DesignSpark PCB as if they had created the design within the layout software itself.

The new WEBENCH PCB Export feature also complements the recent introduction of WEBENCH Schematic Editor, which enables the customization of power management designs and the simulation of the circuit created within the WEBENCH environment. The combination of these tools allows designers to run electrical and thermal simulations to characterise a custom design, create it, and export board layouts or schematics immediately directly into their CAD software, thereby eliminating errors and saving design time.

 

Reduced Design Time

In summary, the combination of WEBENCH Power Designer, WEBENCH PCB Export and DesignSpark PCB allows the creation of customised and optimised power-supply board designs with reduced noise and thermal issues and the dramatic reduction of board design time from hours to minutes.

TI’s WEBENCH tools have simplified and accelerated the design process for more than 325,000 engineers worldwide since 1999.  Further information on the WEBENCH suite of design tools is available here.

Viewing all 280 articles
Browse latest View live