Wednesday, 5 October 2016

Light Up Ada Lovelace with Circuit Scribe and Circuit Playground


Ada Lovelace is the lastest historical figure to feature in our series of Circuit Scribe interactive pictures of tech influencers. Ada Lovelace was a collaborator of early computer inventor Charles Babbage and had amazing insight into what would come to be possible with computers.

Disclosure: Electroninks sent us a Circuit Scribe set for review. As always, our opinions are our own.


If you want to find out more about Ada Lovelace then check out:


This project uses Circuit Scribe electronic ink and magnetic components with an Adafruit Circuit Playground beginner Arduino project board.

For more information on the technologies used in this project you can read:


Circuit Scribe with Circuit Playground

One of the features of the Electroninks kit that we wanted to try out is its Arduino compatibility. Electroninks doesn't include an Arduino microprocessor but its modules can be used with one.

We thought it would be useful to use the Circuit Scribe potentiometer module to provide a variable input to a Circuit Playground board so that we could control the brightness of the LEDs. The Circuit Playground doesn't have a potentiometer built in so this is really useful.

Here's the Arduino code that we used. You might want to prototype the circuit first with crocodile (aligator) clips to make sure everything is working. We chose pad #12 which is analog input A11.


#include <SPI.h>
#include <wire.h>
#include <adafruit_circuitplayground.h>

void setup() {
  CircuitPlayground.begin();   // initialize the Circuit Playground library
  CircuitPlayground.setBrightness(1);
  colorFill(255, 0, 255); 
}
 
void loop() {
    uint16_t value = analogRead(A11); // #12
    
    int brightness = map(value, 0, 1023, 0, 100);

    CircuitPlayground.setBrightness(brightness);
    colorFill(255, 0, 255); 
    
    delay(100);
    
}

void colorFill(uint16_t r,uint16_t g,uint16_t b){
  for(uint16_t i=0; i<10; i++) {
    CircuitPlayground.setPixelColor(i, r, g, b);
  }
}

Ada Lovelace with an LED Fan

Ada Lovelace portrait
We found a picture of Ada Lovelace dressed up and holding a fan. She had lots of creative ideas for using technology so we're sure she would have approved of a light up fan!

We decided to place the Circuit Playground board over her fan and use the flower in her hair to control the brightness. 

Drawing the Circuit

Use a Circuit Playground stencil to draw three blobs in the correct locations for the potentiometer.

Use the Circuit Playground board itself as a stencil to mark where it needs to connect. You'll need blobs to connect to 3.3V, #12 and GND.

 Make sure you're blobs don't touch any other pads on the Circuit Playground. You can always use clear tape to fix any problems. Connect up the blobs as shown.

Attaching the Circuit Playground

The kit we have includes cables that can be used to connect from electronic ink (via magnetic connectors) to a breadboard. We didn't use those cables as the Circuit Playground has easy to connect pads.

Instead we used paper fasteners to both ensure a good connection and attach the Circuit Playground to the picture. You'll need paper fasteners in 3.3v, #12 and GND. Push each paper fastener through the Circuit Playground pad then the blob of conductive ink and fasten to make a good connection.

Add some sticky tape to back of the picture to keep the back of the paper fasteners in place and prevent them from touching each other or other conductive surfaces (especially if you plan to put the picture on a metal magnet board.) Add a battery pack, but don't turn it on yet.

Adding the Potentiometer

We printed out another copy of the flower in Lovelace's hair and stuck that on to the potentiometer so that we can use it to control the brightness.

Make sure you put the potentiometer on the correct way around. This will allow us to read a changing value via pin #12 on the Circuit Playground when the potentiometer is rotated.

Light it Up!

Turn on the battery pack for the Circuit Playground (you don't need the Circuit Scribe battery for this project.) Rotate the potentiometer and you should see the brightness change.

You could adapt the project so that the potentiometer changes the colour of the LEDs or even plays different sounds on the Circuit Playground mini speaker.

Light Up Ada Lovelace in Action




Read next:



More from Tech Age Kids:

Comments:

Post a Comment