Gadget Renesas

Linking Ideas and Electronics

がじぇるね工房

Making of Sword-shaped POV – Persistent Of Vision using GR-KURUMI

GR-KURUMIを利用して剣(つるぎ)POVを作ろう!

####

Introduction (about adventure)

Making of sword-shaped full color POV (Persistent Of Vision) using GR-KURUMI. POV means to describe pictures and characters by residual images.Holding up and down a sword, you can see pictures and characters in the air.

Image01

Image02

This article is aiming at “making of GADGET” not only introduction.Using cardboards which is easy to manage for everyone for outer body.With dramatic presentations that use sounds etc…, make your original one.Going on your trip with your original sword.

Image03

####

Configuration (preparation before adventure)

◆Whole picture
Sword-shaped POV has 20pcs of full color tape LED, is lighting on surface, controlled by GR-KURUMI.Put two buttonas(A,B) on backside for handling LED lighting.Using small size li-ion polymer battery run.

Image04

◆BOM

Image05

BOM.xlsx [ダウンロード]

####

Main components (Major players)

◆GR-KURUMI

Image06

Using GR-KURUMI,GR-COTTON is also OK.Downloading binary data generated by web compiler to write programs through USB serial converter module such as FTDI.

◆TAPE LED

Image07

Using full color serial LED tape with LED part number WS2812B.
Narrow arrangement interval of LED brings out finer images.Cut tape and take 20pcs,however,it’s too many (a little expensive) to buy one reel,since it has 144pcs.Try to take 20pcs from the person who keep the rest. ※You may have some when you contact me.

◆Tact switch

Image08

Be ready for two. A button : for trigger for starting descriptions B button: for changing of described contents. It’d be easier to handle with bigger buttons, replacable with the ones if you have on hand.

◆Li-ion polymer battery & Charger

Image09

A 3.7V output rechargeable battery (charger is required separately), is useful to create mobile type of GADGET due to its small size. GR-KURUMI goes well with this type of battery since its available voltage range is wide, ready to use without stepping up or down supply voltage. A PH connecter is required.

Either three of alkaline batteries (4.5V) or three of other rechargeable batteries are replaceable for long time run though the body weight gains.

####

Schematic circuit diagram

Image10

If you modify and use the components with 3.3V run, please note the output voltage of polymer battery 3.7V. ※ LED operates within rating. Any ports are available since the programs consist of GPIO function only.
Schematic circuit diagram:schematic.pdf [download]

####

Making of hardware

◆Whole picture

Image11

Making a mother board from an universal board and attached it into sword-shaped body as well as tape LED.

◆Cutting tape LED

Image12

Cut off 140mm for 20pcs portion from a reel (144pcs/reel). Please don’t forget to leave some margin of LED pad for wiring, otherwise you have difficulty in soldering.

◆Wiring

Image13

Soldering three lines (GND, signal line, VCC) onto tape LED. Recommended preliminary soldering both pad on tape LED side and line materials.Please note the order of lines, direction since tape LED with WS2812B has several types.

When you wire onto mother board, fix it in the body first.

◆Making of mother board

Image14

With an universal board, make a mother board GR-KURUMI on board.Drawing the layout that all components except LED and power supply fits into the universal board.For fitting the buttons, rectangle is our recommendation (dimension: 25 x 72mm in this case). Satisfied circuit diagram, any kind of shape is fine.

◆Operation check
Let’s check with tester to see if power supply short out, the circuit between RAW and GND short out, and polarity of the power supply (battery) voltage is correct.Connected with the battery , check the polarity and the voltage of the circuit between RAW and GND without connected with GR-KURUMI. If you see 4.2V ~ 3.7V, that will be OK.

####

Making of body

◆Making of body

Here the sword pattern.

Sword body design:剣図案.pdf[download]

Use this sword pattern or draw your own design, the recommend length is longer than LED portion (=140mm).Recommended that several cardboards are sticked together for reinforcement of blade portion as children’s play considered.Feel free for your original design on cardboards.

In my case, took a color cardboard for \100, clip it out along pattern, strengthen with 4 piece of cardboard.

Image15

◆Fixing tape LED in the body
Fixed the tape LED with double sided tape, recommend 10mm-width one, available from stationery shop.

There are several methods to fasten the mother board, in my case、using plastic screws through the holes punched on board.After confirm the wiring position of LED, soldering it into mother board.

Image16

####

Software programming

◆Source code

Image17

kurumi_pov-2016.03.12.zip[download]

All source codes are available from download, feel free to use or modify. Files are divided into several ones for easy maintenance.

◆main loop

Processing key scan in 5ms period. With the detection of A or B button being pushed, processing accordingly.In the case of the detection of B button, starting to send image data to LED. In the case of the detection of B button, sending image data to LED.

Image19

◆Processing LED
Each LED has four terminals only (VCC/GND/IN/OUT).Input 24 bits RGB serial data into IN terminal to emit one LED.Input 48 bits RGB serial data to emit two.To emit 20pcs of LED in a line, you need to have 480bits (24bits x 20pcs) of RGB serial data output from MCU side.Since transmission time is 1.25us per bit, would designate the color and display figures in 600us (480bits x 1.25us) for a line besides processing time.Please see the datasheet and the chart for timing , sending the waveform (0/1) for 24bits serial data. +/- 0.15us will be assumed as acceptable error range.

Image20

Tape LED (WS2812) capable of controlling timing at an early timing.So generate the timing with NOP, send the data with the timing prescribed by datasheet.(https://www.adafruit.com/datasheets/WS2812B.pdf)In my case, adjusted the number of NOP while observing waveforms by oscilloscope.

Image21

Output the data for a line (480bits), move to the next after a certain time (1ms).
Prohibit from an interrupt until all data is output otherwise the residual image won’t be shown up clearly,release after all data completed.

ledctrl_set_rgb Call for the function, output the 24bits data.Defined TAPELED_NUM as 20 this time, output 480bits data with this loop.

◆Processing key_scan

Processing eight-time matching detection by software instead of one-time HI/LOW detection.It’s aimed to prevent the contact point of button from wrong judgement when it bounds.Seeing if all 8 bits data suit with ON(0x00)/OFF(0xff) by bit-shift for detection.since the program check the port in 5ms period, push the button for 35ms at least otherwise the noise is assumed.

Image24

####

Residual image characters

Put four kinds of residual image data as sample. The height is fixed at 20 dots in line with 20pcs of LED, defined the value of each RGB on image table as it is.If you interchange the image data, rewrite the value on this table.Here the program of windows application by C# which can calculate the value automatically.Can attach it into image table by reading an image data.Please refer to the program of windows application which can be downloaded below. afterimgCreater.zip[download]

Image25

As for a full color serial LED, when a white color is output, power consumption is high (50mA at max).1A could be consumed to have all 20pcs of LED lit white.This window application has a useful function which can modify the brightness of whole image data. Recommend that you adjust on the brightness by this to save power consumption,try it in various ways.

◆Writing programs
Writing binary data released in the public, please refer to the URL for procedure.

http://japan.renesasrulz.com/gr_user_forum_japanese/b/weblog2/archive/2015/06/10/kurumi.aspx

####

Operation check (leave for adventure)

Connect with the battery for power on.Push the A button, LED lights emit in a moment.Push the A button again, swing to the right.Push the A button again, and swing to the left, right, left, right, left …..Something show up?

Image26

Push the B button, move to next image.Make various image data to leave for the adventure!

####

Summary

Source code:kurumi_pov-2016.03.12.zip[download]
Schematic circuit diagram:schematic.pdf [download]
Residual image data:afterimgCreater.zip [download]
Sword body design:kenzuan.pdf[download]

MVP information

Kota Iijima

Active software engineer
Engaged in the development of medial system, embedded system for audio.
The hardware development, the industrial design drawing are one of my hobbies.Eager for contribution to the education field, such as submitting his writing for technical magazine.
Seeking for real ties,I also show up in the maker faire, starting up events etc…
Launched 「KIRAKI Light Core」 based on cloud funding. (https://www.facebook.com/kirakilight/)を製造中。
(as of Mar 2016)
https://www.facebook.com/iijima.kota
http://blogs.yahoo.co.jp/carcon999
https://twitter.com/carcon999

飯島 幸太 avatar

Follow him

share