Digital clock with Arduino

Assignment 1:

Make the controls for a desk or bedside clock.  At minimum this should include controls to set the hour and minute. Automated time setting is not permitted for this assignment. Your controls should be clear enough that the user can figure out how to set the time without a manual. Here are a few methods for setting the time on a clock.

You should add at least one extra feature to your clock. Consider the following:

Whatever features your clock has, you should provide tangible controls to set and control those features.

Your clock’s display should be as simple as possible. The simplest version might be a serial output to a computer. You could also control a p5.js clock animation. You could also write to an LCD display or LED display. Since this is a one-week assignment, avoid mechanical clocks and focus on the input controls.

I decided to make a simple clock using an LCD display as I hadn’t used it before. The clock has a simple interface with just two buttons for changing the hours and minutes.

Testing the LCD contrast with a 10K POT
Power out
Front view

Since I only had two buttons as my interface, I chose to put the buttons on the back of the enclosure. Additionally I used big buttons for better ergonomics so that they are easy to locate in a dark room or without having to look. The enclosure is small enough to fit in the palm of your hand and the form factor feels more like a game controller when using the buttons. The position of the buttons corresponds to the clock display, i.e. with the display facing you, the button on the left sets the hours and the button on the right sets the minutes.

Back view
Internal wiring
Image result for lcd wiring arduino
I used this diagram for wiring the LCD screen.
I replaced the POT with a ~10K resistor to set the brightness of the LCD.

I used Tom’s push button time set code as my starting point. In Tom’s code the time was set each time one pressed the button. I modified that code to change time as the button was held pressed. This proved useful when cycling through the minutes instead of pressing the button 60 times to change through the minutes.

I added this simple condition to the button press event so that button needs to be pressed in order to set the time.


Advertisements

Next Nature

 

cover 2.jpg

I am interested in exploring BEAM robotics for my solar assignment for Energy class. BEAM, to me is fascinating in its biomimeticness and in its handicraft nature of free-form circuit sculpting. I am on a biomimetic / fake nature trip this entire semester. These themes are recurring in two other classes I am taking on soft robotics and micro biology exploration. I am eager to see how all of these could come together down the road.

So for this particular assignment I envisioned a BEAM based underwater robot. This is one category I found to be quite under explored in the BEAM circuit (:p). I looked through several BEAM maker forums but didn’t find any documentation. I decided to build my own based off a simple solar engine. The engine uses a capacitor to store charge from a PV panel and runs it through a voltage comparator and transistor to dump the charge into a single motor once the voltage from the PV rises to a particular potential.

IMG_20180318_060725580.jpg
Bread boarded solar engine

This is the engine that makes the robot work. It takes in power from the PV panel on one end and a motor is attached to where the alligator clips are. I thought, once I get the motor to move, I can use it to actuate any kind of mechanism I design beyond that point. I was envisioning something to the effect of a deep sea organism. Very delicateelegant and mystical!

festo - Imgur.gif
FESTO’s smart inversion drive

Pictured above is FESTO’s smart inversion drive system, where a geometric floating object (inspired by origami toy) is filled with Helium and propels itself by inversion.
This, combined with a jellyfish was kind of the mental mood-board I had created.

With these references in mind I set out to ideate on the robot’s form, structure and mechanics.

IMG_20180321_113748490_2

IMG_20180321_113823033_2

These are some of the early explorations. I eventually hit upon the idea of using a spring shaft as my main drive system. This is commonly found in the Dremel tool kit and as flexible extensions for power drills or screw drivers.

1
At the center of that DNA molecule like structure is the spring drive. On top is the motor which connects the drive.

Hardware and parts

  1.  15″ Spring shaft, hacked off a ‘flexible gripper’
  2. 6VDC gear motor
  3. 2mm metal shaft to extend the motor’s axle
  4. 4V circular solar panel

Everything else was found on the ITP junk shelf.

First thing I had to do was test the spring drive working principle. I cropped a segment of the spring off the gripper, taped it with a pin at the center and tried rotating it manually. It worked! and it was enough to create some conviction about the idea. I just had to figure out how to drive it with a motor.

ezgif.com-video-to-gif.gif

Next step was to extend the motor’s axle. I wanted a dual shaft so I could attach both ends of the spring drive to the same axle. In this case I had to reprint a spur gear from the motors gear box for it to hold the new extended axle.

img_20180315_172755021.jpg
The top most gear to the left was to be edited and re printed

I remodeled the gear in CAD and got it printed.

ezgif.com-video-to-gif (1).gif

ezgif.com-video-to-gif (3).gif
Testing the motor with the extended axle

Next, I glued the spring drive to both ends of the motor. Instead of rotating or inverting, the spring drive was spinning with the motor’s axle, making full circles around the motor. I realized I had to constrain it’s motion in vertical direction to keep it from revolving around the motor and instead make it rotate around itself.

ezgif.com-optimize.gif
It worked just as expected when I rested it against the table’s edge

ezgif.com-optimize (1).gif
I braced the middle of the spring with the motors body. This was just what I was looking for but of course had to compromise with the brace running along the middle!

Untitled-3.gif

I made the necessary modification to the CAD file (pictured above). I also designed a basic casing for the motor and the solar engine and put it for 3D printing. In the meantime I started working on making a jig to glue the linkages to the spring drive. The linkages were to be glued at 90 degree angles alternately.

ezgif.com-video-to-gif (2).gif
Laser cutting the linkages

IMG_20180316_221419131.jpg

img_20180318_004000425.jpg
Linkages arranged on the jig, ready for gluing.

Parallely, I started working on sculpting the solar engine. This is the best part of the process for me. Free form sculpting of electrical components is an art. You have to carefully plan out the entire architecture and carefully bend and route the wires for soldering. Doing all this with just two hands makes it more challenging.

DSC01895
Finally! after 4 failed attempts

ezgif.com-crop.gif
Engine test (with battery)  

It was time to put it all together. After 4 sticks of hot glue it finally came to life.

ezgif.com-gif-maker.gif

I could manage to record it just before the motor axle slipped on the 3D printed gear. For this reason I dint continue with attaching the flaps. This is also pretty far away from actually being water ready. I plan to keep refining this idea as and when I get time. The idea for this kind of radial drive is proven mechanically. Now its a matter of making it waterproof and perhaps scaling it up in power to see if it actually propels itself underwater!

 

 

 

 

Enerwheel

full_kinetic_demo.gif

For our Kinetic Energy assignment, I collaborated with Dan Oved to build something that would turn muscle power into usable electricity.

–Process–

We started off by brainstorming on a few concepts for generating light from human motion.

Hand cranked music box

The first thing we explored was turning a hand-crank music box into one that emits light in sync with the music.

We would connect a motor to the end of the crank shaft and have that generate electricity.

Wheel chair powered light

We explored using the wheelchair on the ITP floor for kinetic energy – it could work in one of two ways.

When the user pushes on the wheel, it would rotate a DC gear motor attached via a belt, to generate electricity.

Or, when the user pulls the break pedal, it would move a gear motor attached to a rubber wheel down to have the rubber wheel touching the wheel of the chair, the resistance causing it to break and generating electricity.

Electric Poi

Our final idea came from something I’d seen in India, a variant of slingshot where farmers spin a weighted ball attached to a rope around in circles, in order to keep birds away from their crops. Back home its called a gofan but it closely resembles a Poi performance art prop. We thought of turning this swinging motion into kinetic energy. There would be a handle with a rope and wire coming out of it connected to a ball with a light in it. The rope would be physically attached to the shaft of a gear motor which would be inside of the handle; when the ball would be swung around, it would cause the shaft to rotate, thus generating electricity. This electricity would be outputted back to the wire which would power the light.

Poi performance

We then realized this would likely get tangled, or have difficulties rotating the shaft if it was attached directly to it; instead we decided it would be better to attach the rope to a plate or L bracket attached to the shaft, which would increase the torque and force the shaft to rotate.

We decided to go ahead and test this idea for feasibility. We did some calculations to narrow down on the exact motor we would require in terms of RPM and torque. The main components of the math were the length of the string and the weight of the light object attached to it. As soon as the motor arrived, we attached a weighted object to it with a coupler and a wire. We realized the wire wasn’t actually moving the motor shaft but rather just spinning at the very point where it was tied to the motor. It snapped in no more than 4-5 rotations.

We had to think of something else! Thats when I recalled of seeing a make shift and re-purposed, rural Indian toy where these kids in rural areas would essentially find anything which is round and attach it to a stick and run around the village rolling that wheel on the ground. We thought of building on that with a motor at the center of that wheel which powers an LED strip stuck to the periphery of the wheel itself. This meant that we don’t have to worry about mounting a slip ring in between the motor and the shaft or light.

–Parts–

Selecting the motor

To power the lights, we would force a DC gear motor to turn and tap into the electricity it generates. We chose a 127 RPM Mini Econ Gear Motor from ServoCity, because it had optimal RPM and a low torque of 9,602 kgf-cm.

The 127 RPM dc gear motor we used from Servo City

We would use a .770” Pattern Clamping Hub which would attach to the shaft and rotate to generate torque:

The clamping hub

CAD design

Servo city had provided detailed 3D files for the motor and the coupler on their website. We thought it would be best to plan, troubleshoot and refine the idea in CAD itself to save on time and fabrication. We used Rhino to design the wheel around the selected hardware and mounting brackets.

2
Cross section of the wheel at the spokes

Prototyping the circuit

Next it was time to build a circuit that would simulate the power generation. We used 4 diodes as a bridge rectifier so that no matter which way the motor was turned, the current would flow through the circuit in the same direction. We used a bunch of capacitors in parallel to smooth out the current and store energy when the wheel stopped turning, enabling the lights to stay on. We used a 12v white analog LED strip since it has the same voltage rating as the DC Gear Motor.

The prototyped circuit with a bridge rectifier

We were able to test the circuit successfully. Turning the motor in either direction generated power to turn on the lights:

Fabrication

We converted this 3d model into slices of 3/4 inch to cut it on the CNC Router

Then we glued it all together and let it sit overnight

IMG_20180211_195855369
The engine mounted to the wheel. This would allow the circuit to rotate with the wheel without the need for a slip ring.

We found a tripod leg on the ITP junk shelf and thought it would be perfect as a stick that drives this wheel. Plus it was already well finished and accommodated the motor’s mounting bracket perfectly

IMG_20180211_223050632.jpg
match made in heaven!

Fabricating the circuit

Next it was time to build the circuit that could withstand a series of rapid rotational turns. We designed something simple in EagleCad

The circuit with the bridge rectifying diodes and 47uF capacitors in parallel

kinetic_board_and_fabricated_scaled

soldered_bottom_hud86e04b2e53c6c6eadbb581cb21a0d09_3524068_520x0_resize_q75_lanczos_center.jpg
The circuit with the capacitors in parallel and bridge rectifying diodes. Yellow wires would go to the motor and accept either polarity, and red and black wires would be power and ground for the lights.

We tested the circuit with an external 12V power supply, and also tested reversing the polarity of the power supply to see if the bridge rectification worked, and were glad to see that it did.

IMG_20180212_204101612.jpg
Sticking the LEDtape and routing the wire. We also used 3M’s friction tape to add some traction

–Putting it all together–

After coating the wheel with black spray paint, it was time to assemble everything and test it all.

The spray painted wheel with circuit attached
Yellow wires pass through the center and are attached to the DC gear motor’s power and ground.
The shaft of the motor coupled to the rod; when rolling the wheel the torque would cause the engine to generate power.
Getting ready to test everything

Dan testing the wheel
It worked!