Robotic Painting with Light

I got interested in trying to "paint" with light. That is, use long exposure photography with a moving light source to generate images. The concept is simple: if you put a camera on a tripod, turn off all the lights, open the camera shutter and keep it open, move a light source around in front of the camera, then close the shutter, you'll wind up with a single image of the light moving in one continuous stream.

If you carefully choreograph the color changes, motion, and turning on and off of lights via software you can generate some interesting "light paintings".

What started me on this idea was some work we do in my Robotics course in Taubman College at the University of Michigan. Here's a post on that: Robot Motion Analysis Using Light.

Hardware

My plan for this required a robot to move the lights around, and some hardware to control the light. I'm using an 8 x 8 array of lights: NeoPixels from Adafruit. This is a really nice unit and only requires 3 pins from the Arduino.

The lights are really bright (understatement) and the programming of them is very easy. The micro-controller hardware which controls the lights is an Arduino Mega (an Uno would be fine as well) with the WiFi Shield. The image below shows the beginning of the prototype. As you can see the wiring is very simple (one resistor, one capacitor and the light array):

The robot used is a Kuka Agilus KR-6. I used the back robot in this picture.

The design of the tool which mounts to the robot looks like this, in model form (pixels, prototyping board, and Arduinos from top to bottom):

The finished tool ready to mount: 

And mounted to the robot: 

Software

This works using Grasshopper and Kuka|prc to control the robot, sample the image, and send the code to the Arduino to drive the pixels.

My first idea was to take any image (photograph, picture of a painting, etc), sample it at points which exactly match the LED light panel pixel spacing, then use that sampled data to illuminate the light grid. Those lights form one small part of the overall image. The robot moves the light array and shows new colors each time.

Single LED light panel (yellow) with 6x6 grid of robot moves (blue):

Sampled points in the image (these are the lower left corner of the LED light panel).

Robot moves in a 6x6 grid with different colors each time:

All the coordination of motion and data is managed through Grasshopper. Here's the definition - as you can see it's pretty simple - not many components. The light blue is the robot control. The light cyan generates the Arduino code:

The Grasshopper definition lets you generate a preview of what the pixelated image will look like with baked Rhino geometry. Here are a few examples:

Van Gogh's Starry Night:

A Self-Portrait:

The robot sequence is this:
  1. Move to a new position. 
  2. Turn on the lights. 
  3. Pause for a bit to expose the image. 
  4. Turn off the lights. 
  5. Repeat until the entire image is covered. 
My first pass at this loaded all the color data, for every move, into the Arduino memory at the start. The very low memory capacity of an Arduino, even a Mega, made only 30 or so moves possible. I wanted more than that, so I changed to using a Arduino WiFi Shield and transmit the color data to the tool at each motion stop point. This places no memory limit on the size of the area that's covered.

Interfacing with the PLC

A robot has something called a Programmable Logic Controller (PLC). This is what allows the robot to interface to external inputs and outputs. Some example inputs are things like limit switches, and cameras. Outputs are things like servo motors and warning lights.

A program can also use the PLC to find out about the state of the robot - the current position and orientation of the tool, joint angles, etc.

For this project the PLC is used to track when the robot is moving. This is done by having the robot program set a bit of memory in the PLC to indicate the robot has arrived at a new position. Then it waits for a short amount of time (as the lights are turned on). Then that memory bit is turned off.

The Grasshopper definition monitors the PLC and informs the Arduino when to turn on and off. It also sends the new color data over WiFi.

First Test Images

The first attempts were interesting. It proves the concept works - which was very exciting to see for the first time. But they also clearly show there is room for improvement!

Here's the gradient example. I cropped this image wide so you can see the context - robot workcell, robot in the background, window behind, etc. The robot moved the light array 36 times to produce this image. So that's 36 moves times 64 pixels per move or 2304 pixels total. The tool was slightly rotated which results in the grid varying a bit. That's an easy fix - but it's interesting in the image below because it makes it very clear where each move was.

Here's a self portrait. You can see a variation in the color intensity between the moves of the robot. I realized this is because the robot is not staying in each location for the same time. That's because the robot checks if it should move every 200ms. And the exposure time is only 500ms. So when the robot is triggered to move early the exposure can be nearly 40% different. This is also an easy fix - I'll just sample every 10ms. The PLC also supports interrupt driven notifications - which would be even better.

Here's a portion of Vermeer's Girl with a Pearl Earring. This image again shows the variation in intensity. It also shows where colors get very dark the variation in RGB intensity of the pixels can become an issue. Amusingly she has red-eye! Obviously in all the images more pixels are needed to make them look good. That's accomplished with more robot moves but also with moving between the pixels. It's possible to quadruple the resolution of each of these images by simply moving into the space between the pixels and update the color values.

Van Gogh's Starry Night. With many more pixels this could be a nice image. It would also be interesting to experiment with moving the robot back a foot or so, reducing the intensity, and sweeping the robot with the lights on but the colors changing. So you'd have an overlay of the two. You could get a layered look, and a depth, and a sense of motion.


Next Steps

I'll be doing more with this in the future. One goal is to see if I can make Chuck Close style images. Here's an example of one of his self portraits:

His work is much, much more interesting (more examples are available here). Each cell in the image is multi-colored. Also the rectangular array of cells is rotated 45 degrees rather than vertical and horizontal. His cells are also not all circular - but elliptical and triangular. My plan is to put the correct color in the center of each cell. Then generate a new color and move that in a circle around the center point. His cells have 3 or 4 colors each, and also cross the cell boundaries as he sees fit. That I cannot do. But it'll be interesting to see how far I can get.

It's also possible to leave the LEDs on and move the robot. Or move the robot through space as to generate 2D images of painting in 3D. I'll be experimenting with many techniques (software changes) and I'll have another updated post in the future.

Other Methods

See this post for some other experiments I've done: Robotic Painting with a Line of Lights.

CNC CODE

5 axis cnc mill,5 axis cnc router,cad cnc,cc machine,cnc cutter machine,cnc cutting system,cnc definition,cnc equipment manufacturers,cnc fabrication,cnc lathe retrofit,cnc machine accessories,cnc machine automation,cnc machine business,cnc machine companies,cnc machine description,cnc machine maker,cnc machine news,cnc machine repair,cnc machine services,cnc machine shop,cnc machiner,cnc maching,cnc machining companies,cnc machining equipment,cnc machining parts

Labels

"7-Axis Robot" "Digital Fabrication" "Planar Polygons" "Rhino" "Rhinoscript" 2007. 2013 2014 2016 2d printing 2d to 3d 3-axis CNC 3-axis CNC Kit 30c3 3d capture 3d carving 3d cnc router 3d company 3d copy 3d display 3d drawing pen 3d model 3d piracy 3d print farms 3d print platform 3d print quality 3d printed 3d printed airoplane 3d printed airplane 3d printed buildings 3d printed car dashboard 3d printed car part 3d printed car parts 3d printed clothing 3d printed cyborg 3D Printed Figure Sculpture 3d printed food 3D Printed for in Ceramic 3d printed gun 3d printed machines 3d printed music instrument 3d printed music record 3d printed organs 3d printed parts 3D printed relief 3d printed rifle 3d printed robot 3d printed sensors 3d printed skateboard 3d printed toys 3d printed uav 3d printed vehicles 3d printed weapons 3d printer 3d printer accessory 3d printer crime 3d printer desk 3d printer eclosure 3d printer review 3d printer stand 3d printer table 3d printers comparison 3D printing 3d printing filament 3d printing in cement 3d printing materials 3d printing myths 3d printing on battery power 3d printing photographs 3D printing piracy 3D printing portraits 3d printing primer 3d printing systems 3d printing with carbon fiber 3d printing wood 3D printing ZBrush sculpts 3d printshow 3d puzzle 3d scanner 3d sensors 3d shaping cnc router 3d startup 3d systems 3d ui 3dea 3dMonstr 3doodler 3dPrinting 3dprintmi 3dprn 3dr 3dsimo 3ntr 4 Jaw Chuck 4-axis 4-axis CNC 4-axis cnc woodworking 4d printing 4th dimension 5 axis 5 axis cnc router china 5-axis 5-axis CNC 5-Axis CNC woodworking 5-axis router operating procedure 5d print d8 6 axis 7-axis robot 7512 abs abs juice acetal acetone acp cnc router acrylic acrylic board cut machine acrylic cut acrylic cutting activism adafruit Adafruit NeoPixel Strip adapto adobe advanced afinia africa Agilus Workcell Agilus Workcell Tutorial aio robotics air airbus aircraft airwolf3d alabaster aleph objects all-in-one aluhotendv4 aluminatus aluminum Amazon ampersand sign cutting AMRI amsterdam android animal antenna ao-101 app apple appropedia arburg archery Architectural Robotic Fabrication architecture architecutre hollow out. arduino Arduino Micro LED Arduino NeoPixels argentina armour arrow art artec artificial stone arxterra asia asiga astronomy atm australia austria Autodesk automation automotive b3 innovations baboi bacteria baddevices badprinter bag balance baluster process batteries beaglebone beams bebopr bed leveling bee Beer Caddies belgium Belle Kogan ben heck bendable bending bicycle big objects big printers bike biohacking bioprinter bitcoin blacksmith blade blade 1 blender blimp blind blizzident Block Delete blog blokify bluetooth board cut boeing bomb bone book Books boot Boring Cycle bottle bow bowden box bracets braille Bre Pettis bridging bronze brook drumm buccaneer build bukibot bukito bukobot burning man business busybotz buy china cnc router buy cnc router buy cnc router from china buy laser machine buy modillion carving machine buy router cnc bycicle parts cad calibration camera canada Canned Cycle canon car carbomorph carbon carbon fiber cardboard carmine cartesio cartouches carved architecture carving carving machine carving with gouges and rasps case cashier board cut casting Cathy Lewis cb printer ccc cell cellphone cellstruder central overhead elements. centrifuge cerajet ceramic ceramic tiles engraving cerberus CES ces 2012 CES 2013 ces 2014 ces 2015 cff chain maille chair chamber chart chefjet chemistry children china china cnc router china laser machine chipfuzer chocolate choose cnc router chopmeister chopper chris anderson Cincinnati circular platform clay clear figure sculpture clone closed loop cloud cnc CNC 4th axis CNC 5 Axis CNC Box CNC Coordintes CNC Corner Fix CNC cut acrylic figure sculpture CNC Cut Guitars cnc engraving machine. CNC Joints cnc mill CNC Rotary Axis cnc router cnc router aluminium cnc router art work cnc router copper cnc router cut acrylic cnc router factory cnc router foam cnc router importer CNC Router Kit cnc router manufacturer cnc router mdf cnc router modeling and prototyping cnc router mold cnc router packing CNC Router Parts Build CNC Router Parts Rotary Axis cnc router problem cnc router review cnc router type3 cnc router video cnc router work CNC routing file preparation CNC routing ZBrush CNC Tool Holders CNC Tools CNC walnut CNC Wood Joinery cnc wood router CNC Woodworking CNC Woodworking 5-axis Digital Fabrication Taubman College CNC Woodworking Sleigh Bed Digital Fabrication Tabuman College CNC-Woodworking co cody wilson coffee color changing filament colorfabb comic community company tour complex 3d print composite Composite Filament Fabrication concept concrete conductive ink consultancy Consumer Electronics Show contour crafting contouring Control control unit controller cool things to 3d print cooling copyright Corner Fix cosplay cost reduction cottle boards creaform creative commons Credit card fraud crime criminals croatia crowdfunding CT cube cubejet cubesat cubex cubify cubify invent cubify.com cups cura curaengine customized cut cut acrylic cutting cyberpunk Cycloidal Gyro Czech Republic d3d da vinci daily use dart gun data data matching tutorial data tree tutorial. dc motor decimation master deezmaker dell delta delta 3d printer delta forge deltaprintr demonstration denmark dental 3d printing desert design desktop 3d printing desktop cnc router desktop printer desktop production Developable Surfaces dglass 3d Digital Design digital fabrication Digital fabrication of figure sculpture Digital Fabrication Slip Casting digital figure sculpture Digital Portrait Sculpture Digital Sculpting Digital Sculpting Renders Digital Sculpting with Two Models Digital Woodworking dilbert disabled disney Display Conduit diy diy 3d metal printer diy 3d printing diy 3d printing companies diy science dlp dmls documentary double decker 3d printer Doubly Curved Surfaces dremel drill Drilling Cycle drivers DRM drone dual extruder dual extrusion duct tape duo e3d ecology economy edc education eff Egypt ejection electron beam electronics elon musk enclosure encryption energy generation engine Engraved Signs engraver engraving enrico dini environment envisiontec EOS epoxy EPS Foam EPS shaping ESA etching etsy euromold 2011 Euromold 2012 euromold 2013 euromold 2014 europe event eventorbot events evo exoskeleton experiment experimental 3d printing extended platform extruder eye glasses eyewear fabbot fablab fablab berlin fabtotum Face Grooving Cycle Facing Cycle fail fan fantasy figure Fanuc farm fashion Fasteners fdm Feed Rate felix festival fff fiberglass figulo. video Figure Sculpting in ZBrush figure sculpture in acrylic. filabot filaflex filament filament extruder filament winder filawinder Finishing Cycle finland fire firmware flexible flexible pla Flip cut flomio flower foam foam dart focus foldable food food safe foodini ford form 1 form 2 formlabs Formula foundry FRAC exhibition fractal frame framework France freed friction welding Front Drilling Cycle fuel3d fumes fun fundable furniture Furniture Design Future G Codes g-code G00 G01 G02 G02.1 G03.1 G07.1 G32 G33 G40 G41 G42 G70 G72 G73 G74 G75 G76 G77 G78 G79 G80 G83 G84 G85 G87 G88 G89 G90 G92 G94 gallium game gamechanger gaming Garage shop garage tool layout garden gartner ge gears geeks gemma geodesic geomagic germany gigabot github glass glass engraving cnc router glazing techniques glue gmax golemD google google glass gopro gpl granite Grasshopper Grasshopper attractor point Grasshopper data matching Grasshopper data trees Grasshopper Graph Mapper Grasshopper grids Grasshopper Image Sampler Grasshopper Light Painting Grasshopper Physics Simulation grasshopper planes tutorial Grasshopper tabs Grasshopper unroll tabs green guardian guerrilla gardening GUI guide Guitar Stand guitar stands gun magazines h-bot h480 Haas Vertical Mill hack hacking Hand carved rocking horse hand carving handheld handrail process haptic harvard Hass hbot hdpa health heat chamber heat gun heated 3d printing chamber heated build platform Helical Interpolation hexapod high strength HIPS history hollow out holograph Home Home CNC machine home manufacturing Home Shop CNC hot end hot glue Hot News hot to Hot-wire cutting hotend house household items how is china laser machine how is chinese cnc router how to HP humor huxley hybrid hype hyrel i2 i3 ice 3d printing idea lab ikea implant improv india indiegogo industrial industrial 3d printer infill infographic infrastructs injection molding ink inkjet 3d printer insects instructables instruction intel Intel Galileo intellectual property interior decoration interior decoration ceramic tiles interior design Interlocking Joint internet interview introduction to 3d printing Inventables ios ip ip rights ipad IR bed leveling irapid iron man Israel italy japan jet engine jewelry jinan laser jinan laser machine job jrx k8200 kai parthy kamermaker Kangaroo 2 Kangaroo 2 Catenary Kangaroo 2 Circle Pack Kangaroo 2 Planarize Kangaroo for Grasshopper Kangaroo Physics Kangaroo Tensile Forces kevlar key keyboard kickstarter kikai kinect kinetic sculpture kitchen cabinet process knife Korea kossel kossel air kraken Kuka PRC Kuka prc programming Kuka Robots KUKA|prc Kuka|prc sample l5 lamp large models large printer laser laser cut leather laser cutter laser cutting laser cutting foam laser cutting machine laser engraving machine laser machine laser machine sign laser machine video laser sintering lasercusing lasercut lasersaur latex lathe law lcd leap leapofrog leather led LED lights on figure sculpture leg lego lens lenticular printing letter cut letter cutting letter sign leveling leweb lewis LG liability library light bulb Light Painting Light Painting Stick limestone linear actuator Linear Bearings Linear Rails Linear Rails Upgrade link linux liquid Liquid Metal Jet Printing lisa lisa harouni lix lmd load bearing lock logo LOHAN london Longitudinal roughing cycle lost foam lost foam making lost foam mold making lost pla casting low cost low cost. LP lulzbot lumia lumifold lunavast lunchbox lyman lywood M Codes mach3 machine Machine Zero machinekit Machining machining wax madrid magazine magma magnetic filament magnets Mail (armour) maintenance make make magazine maker faire 2013 makeraser makerbot MakerBot Industries makerbotPLA MakerCon makerfaire makerfarm prusa makerslide makerware makible makibox making money with 3d printing maksim3d Malaysia mandel Manhattan manufacturer manufacturer video manufacturing map marble Mark Meier mark one mark34 market Marlin material materialise math plug-in mathematical object mathematics matsuura matterform Mazak mcor MDF Mebotics media medical applications of 3d printing medicine melamine mendel mendel90 mendelmax mendelmax 2 mesh related grasshopper plug-ins mesh related rhino plug-ins mesh repair for 3D printing meshes meshes in grasshopper meshes in rhino MeshUp metal 3d printing metal casting metal clay metal extruder metal filament metal hot end micro Microfactory microrax microscope microsoft MIG milestone military milkrap mill Milling mind interface mini cnc router miniFactory Mirror Image On / Off MIT mix MkMrA2 MkMrA2 shop mobile mobile 3d print control mobile factory moddler studios model quality modeling carving modification modillion carve modillion cnc router modillion engrave modillion engraving modillion machine modular mojo 3d printer mold molds molecule moon morgan mori motion motor motorola MRI mrrf MTU mug muli color multi color multi jet fusion multi materials multimod multiple guitar stands MULTIPLE REPETITIVE CYCLE Multiple Thread Cutting Cycle multitool museum music n nano nanobots nanoparticles NASA natural machines nature nerf gun nesting Netherlands new diy 3d printer new valence robotics new york newel post produce news newzealand cnc router nfc ninjaflex noisebridge nokia non cartesian Norway nozzle number cutting NV nyc nylon object Objet Objet Connex 500 octo extruder off topic office sign Offset Okuma Onsrud 5-axis router open sls open source open source 3d printer open source hardware openRail OpenSCAD optics optomec ordsolutions organic organic printing organovo orion ornament ornithopter os OS X otherfab othermachine othermill outdoor outdoor advertising p2p pandabot Panel Keys paper paper cut parametric parametric object by function parc Part Program partitioning partners past paste patent pbs pc pcb pcb milling Peck Drilling Cycle PEEK pellet pen people personal pet pet+ pets phantom desktop philips phoenix phone photo Photoformance photography photoshop pick and place pico piracy piratebay pirx PLA pla/pha plane components in grasshopper plant plasma cutter plastic mold plastic welding plasticine Plastics Plastics Overview play-doh plexy plotter plywood pocket poland polar polishing polyamide polycarbonate polyjet polypropylene polystyrene shaping polyurethane pongsat pop culture popfab porcelain poro-lay portabee portable 3d printer portable device portrait portrait sculpt portugal powder 3d printing power power supply precission cutter presentation preview price princeton print bed printhead Printrbot printrbot jr printxel problem problemsolving process products Profile turning Programmed Data Setting G10 project biped projet promotion prosthetic prosumer protoforge prototype prusa prusa i4 Publishing and Printing pump purse puzzle pva pvc pipes pwdr pypy python qr qu-bd quad extruder quadcopter quantum ord bot r360 Ra Ra radiant radio rail RAMBo RAMBo 1.2 ramps rapide raspberry pi re3d Recap recording Recreus recycling reddit relief sculpture repair repetier replacement part replacement parts replicator replicator2 reprap reprap wally reprappro repstrap resin retraction retro review RFID Rhino rhino math Rhino math plug-in Rhino meshes Rhino Nesting Grasshopper Sectioning Layout Rhino Python Rhino Python Scripting Rhino Python User Interface Rhino UI Rhino Unroll Rhino UnrollSrf Rhinoscript Rhombic Triacontahedron Fabrication; CNC Woodworking; 5-axis CNC richrap rings risk robo 3d robohand robot Robot Motion Study Robot Programming setup Robotic Digital Fabrication Robotic Light Paint Robotic Light Painting Robotic Motion Analysis robotic painting with light robots robox rocket rocking horse carved by hand ROFI rolls royce rostock rostock max rotary Rotating Model Stand Rotite rotomaak router rubber rubber band ruled surfaces russia safety sailplane Sainsmart sale samsung sand sand casting sander Sandvik Sanjay Mortimer satellite SAV scam scara school sciaky science screw sculpteo Sculpture Pedestals sea sectioning security sedgwick seed seemecnc selective laser sintering self assembly. sense sensor sensprout service servo setup KUKA|prc tutorial seuffer sf shandong laser Shapeoko shapeshop shapeways shapeways 3d printing sharing ship shoes shop Shop Built Side Table sieg siemens sign sign cut sign laser machine signage signature signing silicon silicone silk silver simpson Singapore single arm 3d printer singularity sintering Six-N-Sticks Skanect skimmer skull skylar tibbids sla slashdot slate slic3r slicer slip casting Slip Casting 3D Printed Objects slotted Slovenia sls smartphone smartrap Smoothieboard smoothing sneakey snowflake soapstone software soild concepts solar solder solid concepts solidator solidoodle solidoodle 2 solidoodle 4 solidus labs solution sony sound south africa space spaceX Spain spark speakers Spectrometer speed spider spin casting Spindle spoolhead sport spray 3d printing square carved rosettes Stack Lamination stair machine stair parts stair parts equipment stair parts processing stairparts machine Stamps School of Art & Design stanford star trek startups steampunk steel stepper stereolithography steve purdham stone stone carving store stratasys strength strong stuck students styrofoam block shaping styrofoam shaping subdivision mesh SubProgram success story sugar sugru suitcase sun Super Matter Tools support material surface surgery suspended deposition sweden swisspen Switzerland syringe table numbers cutting tablet tabletop tactile taiwan talk tangibot tantillus Tapping Cycle tattoo Taubman Colledge Taubman College Taubman college Agilus Workcell Taubman College FabLab taz 2 taz 3 taz 4 TED ted talks telescope temperature temperature measurement test testing textile the pirate bay theta thingiverse Thread threeform tiertime TIG tiger maple Tips Tips and Techniques titanium tool tool chain Tool Data Tool Nose Radius Compensation tools torrent Torus Knot Torus Knot Table touch touch x toy toyota TPE Transverse Cut-Off Cycle G75 trident trinitylabs trinityone trinket tu wien Turning turpentine tutorial tv Twist Table two color 3d printing type a machines Types of Plastic uav uformia UK ultem 2300 UltiController ultimaker ultimaker 2 ultimaker 3 ultrasonic unboxing university university of sauthampton unrolling up mini up plus 2 upgrade urethane USA usb user interface using a router to produce a ZBrush model using china cnc router uv 3d printing v-slot vader vapor velleman veterinary video vietnam viki lcd virtual reality virus visualization volumental voronator voronoi meshes voxeljet VR Vulture 2 vw Wallace Detroit Guitars wally Walnut Table wanhao warping wasp wasp 3d printer waste watch water water cooling wax way finding sign WCC CNC WCC NCT weapon wearable weaverbird web web app web interface wedding sign cutting wedding sign decoration cutting weistek Welding West Huron Sculptors what cnc router can do whiteant wideboy wifi wikiwep wind generator windows windows 8.1 Windows Keyboard Shortcuts windows mobile phone wire wire bender wired wireless 3d printing wobbleworks wood wood carving wood engraving wood frame 3d printer Wood Information Wood Joint Fabrication wood portrait Wood Species woodworking workflow working with planes in kuka|prc workspace x winder xeed xmass xt xyzprinting yale yeggi youth z axis zach hoeken ZBrush Basics ZBrush Decimation Master ZBrush Figure Sculpture ZBrush for Rhino users ZBrush Import and Export to and from Rhino ZBrush Portrait Sculpting ZBrush sculpting tutorial ZBrush Shaders Test ZBrush ZRemesher zeus zmorph zortrax китайский фрезерный станок с чпу фрезерный станок с чпу