element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Sci Fi Your Pi
  • Challenges & Projects
  • Design Challenges
  • Sci Fi Your Pi
  • More
  • Cancel
Sci Fi Your Pi
Blog Sci Fi Your Pi: PiDesk - Guide: Magic Lamp with wireless charger, Adafruit Trinket & NeoPixels
  • Blog
  • Forum
  • Documents
  • Files
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: fvan
  • Date Created: 21 Jun 2015 5:36 PM Date Created
  • Views 2103 views
  • Likes 7 likes
  • Comments 17 comments
  • design_challenge
  • touch_motion_controls
  • touch_motion_control
  • sci_fi_your_pi
Related
Recommended

Sci Fi Your Pi: PiDesk - Guide: Magic Lamp with wireless charger, Adafruit Trinket & NeoPixels

fvan
fvan
21 Jun 2015

Concept

 

The idea for this little project is to have a lamp which can be turned on or off simply by moving it on a desk.

 

A wireless charging base is built into the desk's surface, and a circuit with microcontroller and LEDs gets powered wirelessly using the charging coil.

 

Components & Circuit


image

The electronic components used in this project are the following:

  • Adafruit Trinket 5V
  • Adafruit NeoPixel Ring with 12 LEDs
  • Qi Wireless Charger Base
  • Qi Wireless Charger Accept


The Qi Wireless Charger was bought on eBay for a couple of euros. According to the specs, it is capable of outputting 5V/1A, which should be more than sufficient for this simple circuit.Connecting everything together is simple:

  • the coil's positive terminal is connected to the Trinket & NeoPixel USB+/PWR pins
  • the coil's negative terminal is connected to the Trinket & NeoPixel GND pins
  • the Trinket's #0 pin is connected to the NeoPixel IN pin

 

Program & Testing


The Trinket is programmed using the Arduino IDE in order to animate the NeoPixel Ring. But before this can be done, the necessary libraries need to be installed.Adafruit already has excellent tutorials covering this on their learning system:

  • Adding support for Adafruit boards
  • Installing the NeoPixel library

 

Once the hardware is supported and the library installed, it is possible to program the Trinket. An example program is provided with the NeoPixel library, called "strandtest". This sketch cycles through different animations and colors and is perfect to understand how the NeoPixel Ring is being animated.

 

Below are some animated gifs (you may need to click to see the animation) showing a quick tests with the wireless charger first and then with the Trinket and NeoPixel Ring.

 

imageimage

 

Assembly & Demo

 

To hold the electronics, a simple housing is required. This can be done using a readily available container or can be custom created using cardboard, plastic, or even using 3D printing. I opted for the latter and created a simple hollow cylinder just big enough to hold all the parts. The wireless charger coil is at the bottom and the NeoPixel Ring at the top. I'm also using a crystal ball on top of the circuit to diffuse the light.

 

imageimage

 

I hid the wireless charger base in the desk's surface, under my cutting mat. When the circuit is placed above the charger, it lights up without requiring a wired power source. Magic.

 

imageimage

 

Because of the crystal ball sitting on top the NeoPixel Ring, some effects are also reflected on the ceiling, gradually changing color.

 

Video

 

The video below provides an overview from start to completion, to end with a demo of the magic lamp.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

 

 

  • Sign in to reply

Top Comments

  • sleuz
    sleuz over 10 years ago in reply to balearicdynamics +3
    Hi Enrico Thanks to Mark mcb1 making me aware of this interesting topic. I know that the WPC Consortium just released a higher specification for the qi-standard. You can now transmit/receive up to 15 Watt…
  • mcb1
    mcb1 over 10 years ago in reply to balearicdynamics +2
    Enrico I hadn't come across it until Simon Luez was nice enough to have a conversation about the Qi charger I then entered the Beyond The Phone ( http://www.element14.com/community/community/design-challenges…
  • fvan
    fvan over 10 years ago in reply to balearicdynamics +2
    Your wife is a toothbrush ?
  • mcb1
    mcb1 over 10 years ago in reply to fvan

    I presume you know which one it is ...

     

    For anyone else reading this....

    The ATTiny85 used in the Trinket and Digispark has 6 i/o pins.

    They use two and connect to the USB Tx/Rx and the bootloader waits when powered up to see if there is communication.

    Bluebie who helped Erik with the Digispark bootloader made another that removed the delay, and instead looked for one of the pins (D5) to be held low at powerup.

    This then jumped the code into bootloader mode and allowed new programs to be loaded.

    https://digistump.com/wiki/digispark/tricks

     

    It's also interesting that Trinket can run 16Mhz but only when powered by 5v.

    https://learn.adafruit.com/introducing-trinket/16mhz-vs-8mhz-clock

    Digispark doesn't worry about the voltage and actually runs at 16.5Mhz.

     

    Mark

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • fvan
    fvan over 10 years ago in reply to mcb1

    Excellent idea, I'll give it a try image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 10 years ago in reply to fvan

    The delay is due to the Trinket not starting the program the first 10 seconds, checking if it is being programmed instead

     

    Ahh the bootloader.

    If you reprogram it using the Digispark bootloader, you can remove that delay.

    You simply hold one pin down if you want it to run the programing wait....

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 10 years ago in reply to balearicdynamics

    spending very bad words on my toothbrush

    You should stop using your toothbrush at your computer and it will never know.....

     

    I was talking about the energy transfer not the user image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 10 years ago in reply to sleuz

    Tank you too Simon.


    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube