For this week’s procect we were supposed to imitate some movement of a human or animal. First, I was considering creating a cyclist but even though I had a clear idea how to make its legs move, I realized it would be rather hard to hide the servo and I was also unable to come up with an idea for the part where the legs join the body (the legs would have had to be bendable and movable). Then, I touhgt of creating a walking person. Although this would have fixed my problem with the leg joints, I had to drop the idea as syncing the movement of the legs proved to be too difficult. So I ended up creating a person that is sweeping. Continue reading “Sweeping”
Month: October 2015
Completely Bodiless Nick
For my stupid pet trick, I was planning on creating a head that “lives” in a box, which can be opened in multiple ways, to arrive at different questions the head would ask each time. However, using servos for even the rotating display of the question proved to be difficult (due to the weight of the component), thus I changed my project and turned it into an interactive and friendly head, Completely Bodiless Nick. Different inputs, for instance a “high five”, make him react in different ways. Continue reading “Completely Bodiless Nick”
Rat movement
High five machine
First off, I haven’t been able to get my project to work. The sonar distance sensor isn’t working as I expected, and the servomotor I’m using isn’t powerful enough to reliably throw around some popsicle sticks and cardboard. Regardless, my project was to work as follows. A user is presented with a cardboard cutout of a hand. If she were to pass her hand in front of it, the cardboard hand would rotate forward to give her a high five. Ultimately, this is pretty simple; just a servomotor and a sonar distance sensor. The way I have this setup is such that the sonar sensor is embedded in the cardboard hand. I think (and I could be wrong) that the sonar sensor readings are getting thrown off by the jittering of the servomotor. Even when it’s not being activated, the servo buzzes at a high frequency, which I think messes up the readings from the sonar sensor. Perhaps this was a good opportunity to use an infrared sensor. The end of my post has a few pictures of current (failed) setup.
I think I could make this work by taking some of the following steps. Instead of using a servo motor, I could get my act together and use a step motor with an external power supply. I think that this would prove to be the most difficult solution from a hardware and software perspective, but I think that it would probably result in the best end product. Alternatively, I could slap in a bigger servomotor such that the machine would reliable rotate the hand forward.
High Five!
I recreated the motion of two things high fiving each other!
Shaking Hands
For this week’s assignment, I made two hands that may or may not shake each other, depending on the degree of excitement.
Annoying wood/can/glasspeckers
For this assignment I decided to try out the solenoids to produce linear motion. Inspired by woodpeckers (thanks, Shunya), I set out to create a device that would produce ringing noises by hitting objects with the solenoids.
First I had to get acquainted with the solenoids. To use them, I had to hook them up to a transistor in order to not fry my RedBoard. Transistors are annoyingly not labled and their wiring changes between models, so I had to look that up. The TIP120 transistors we have in the lab have, seen from the front and from left to right, the base (signal in), the collector (voltage in) and then the emitter (to ground). That way, I could use the RedBoard’s output to control the transistors, which in turn control the solenoids.
Motors and transistors
Turning a transistor on and off is just a matter of applying voltage.
Use the Blink example code to turn the motor on and off every second, or try the Fade example to vary its speed.
Here’s the wiring for a p2n2222 transistor (the kind you have in your kit) :
Below is the schematic for a TIP120 transistor (the kind we have in the lab) :
A H-bridge (fund in the lab, not in your kit) allows you to turn the motor in either direction. Use the code below with this schematic :
const int motor1Pin = 9; // H-bridge leg 1 (pin 2, 1A) const int motor2Pin = 8; // H-bridge leg 2 (pin 7, 2A) void setup() { // set pins you're using as outputs: pinMode(motor1Pin, OUTPUT); pinMode(motor2Pin, OUTPUT); } void loop() { // turn the motor in one direction: digitalWrite(motor1Pin, LOW); // set leg 1 of the H-bridge low digitalWrite(motor2Pin, HIGH); // set leg 2 of the H-bridge high delay(1000); // wait for a second // stop the motor spinning : digitalWrite(motor1Pin, LOW); // set leg 1 of the H-bridge low digitalWrite(motor2Pin, LOW); // set leg 2 of the H-bridge high delay(1000); // wait for a second // turn the motor in the other direction : digitalWrite(motor1Pin, HIGH); // set leg 1 of the H-bridge low digitalWrite(motor2Pin, LOW); // set leg 2 of the H-bridge high delay(1000); // wait for a second // stop the motor spinning : digitalWrite(motor1Pin, LOW); // set leg 1 of the H-bridge low digitalWrite(motor2Pin, LOW); // set leg 2 of the H-bridge high delay(1000); // wait for a second }
For inspiration of different gears and things, look at http://robives.com/mechs and http://robives.com/techniques
The Panda That Wanted To Be A Polar Bear
Allen has a polar and he loves it. He’s been sleeping with the polar bear since forever and his obsession with it is becoming unhealthy. For my stupid pet trick I wanted to find a way for Allen to move on from the polar bear but I couldn’t. I didn’t have the courage to steal the polar bear and transform it into a horrific thing and then give it back to Allen. I just couldn’t do that him. The last time he cried he was three months old and didn’t want to break his little heart.
So I stole a panda bear from one of my friends, opened its back, and inserted an Arduino, LEDs, two servos, a speaker, and a pressure sensor. The idea was to make a panda bear that would always make noise. The user, thinking that it would quiet down by hugging it would hug the bear making its eyes move, turn red, and making the noise even more annoying. With the amount of movement, sound, and light depending on the pressure of the hug.
heat machine or love-o-meter
So we had to make a love machine or something similar. I decided to take the traditional path and work on a love-o-meter using a temperature sensor. The sensor, connected to an analog input, gave me numbers that I couldn’t read, so I used arbitrary numbers after playing around and exposing it to several temperatures. Depending on the values received a different number of LEDs would turn on. The hotter the more LEDs turned on.
Here’s how it looked: