Posts

Controlling Servos

Controlling Servos Look at the page on the Mechatronics website for info on how to control a servo from the Arduino board. It is in the Year 10 pull down menu, called Servos. Once you have the servo hooked up and moving try altering the program to make it move in an interesting way.

Better millis() program

Image
Better millis() program This program introduces a variable called ledOn to record whether the LED is on or off. It is a Boolean datatype as this can only take 2 values true or false making the if statement easier. So before the program turns the LED on and resets the 'start' value BOTH the switch has to be closed AND (&&) the LED has to be off. So if you press the switch when the LED is already on the program won't do anything. Happy days. :-)

Programs without Delay

Image
Program and setup to control LED using millis not delay The breadboard was set up with 5V power and Ground from the Uno board. A 3K pull-down resistor was connected from the negative rail to a free row on the breadboard. Pin 7 was connected to the same row. A switch was connected from that row with the middle pin 2 rows down and the last pin 4 rows down The positive rail was connected to the row the middle pin was in. This program turns the internal LED on when the switch is closed and then off again 2 seconds later. The time, state of the switch and state of the LED can be viewed on the serial monitor. 0 is low and 1 is high. Yeah..it works. The pull down resistor ensures that pin 7 goes low when the switch is opened which was screwing up my previous attempts. The problem with this program is that if the switch is pressed whilst the LED is on the value of 'start' is reset to the current millis() value so the LED really goes off 2 seconds after the switch is l...
Setting up for cutting Go to the webpage  https://sites.google.com/whs.co.nz/mechatronics/year-10/setup-for-cutting watch the video and prepare one of your parts for cutting.
Inventor After making parts in Inventor you now need to able to assemble them into models to test how the parts interact. This functional modelling is a crucial part of the process. This video shows you the basics (after some Pink Floyd up to 30 seconds)  https://www.youtube.com/watch?v=b4jB704egZ0 Or this longer one which has some useful part creation tips at the start too. https://www.youtube.com/watch?v=FqaGonaRBEM
Image
This is an example of the sort of documentation we'll be expecting from your investigations... This is just one small part of the investigation, it is only about one investigation in to one type of grip which is only one part of the project. You need to do this as you go along, adding a bit each day so that you don't end up with a huge write up at the end. Crab Claw grip I was investigating the grip part of the arm. Rather than move two separate grippers I wondered if it would be easier to move just one, like a crab claw. One side of the grip would be fixed and the other pivot, driven by a syringe to open and close. A syringe can provide a push and a pull so it can open and close the grip. First attempt I hot-glued the plunger of the syringe to the moving part of the claw. This did not work. As the claw pivoted the syringe had to turn because the end of the plunger was fixed rigidly to the cardboard. The plunger moves in a straight line while the part of th...
Image
Top example of breaking the problem down in today's class Lucy and Earina decided to look at the grip part of their arm. A narrow piece of card being pulled with string taped to its edges was quite sticky and hard to move. I suggested a T shaped piece to increase the leverage and maybe trying some pieces of card or paper to act as washers and we had a good discussion that ranged through these issues and produced some good ideas for the next stage of testing. This is what you should be doing - taking one aspect of the design and investigating how you can make it. Looking at the problems and finding possible solutions or ruling out things that don't work. You also need to record what it is you are doing in your blogs.