Tecnología ESO en Ingles https://www.petervaldivia.com Sección Bilingüe de Tecnología en Inglés Thu, 10 Aug 2023 10:31:34 +0000 en-GB hourly 1 https://wordpress.org/?v=6.4.3 Lifting Bridge part 3 https://www.petervaldivia.com/lifting-bridge-part-3/ Sun, 25 Jan 2015 11:32:23 +0000 http://www.petervaldivia.com/?p=369 Bridge Part 2 Part 3    Lifting Bridge. 3. 3.4.5 Calculating the total transmission ratio The multiplier transmission in figure 23 is composed of two transmission reactions, each one with a transmission ratio of 3:1. If we combine both the ratio is multiplied and the final ratio is 9:1. In such as case we can […]

The post Lifting Bridge part 3 first appeared on Tecnología ESO en Ingles.

]]>

Lifting Bridge. 3.

3.4.5 Calculating the total transmission ratio

    • The multiplier transmission in figure 23 is composed of two transmission reactions, each one with a transmission ratio of 3:1. If we combine both the ratio is multiplied and the final ratio is 9:1. In such as case we can talk about a total transmission ratio (iT) since two or more single transmissions are represented in the calculation. The formula used to calculate the total transmission ratio are: iT=  Na / Ne “Na” represents the number of turns of the entry wheel, wheel a, and Ne, is the number of turns of the exit wheel, wheel e.
    • iT=( Z2 x Z4 x Z6 x ….) : (Z1 x Z3 x Z5 x ….. )
    • Where z represents the number of teeth on each wheel. iT= i1 x i2 x i3 xi4… Where i represents each of the single transmission ratios. In the case of figure 25 where Z1 and Z1′ 0 13 teeth and Z2 and Z2′ =39 teeth i = Z2/Z1 = 39/13 = 3;  i’ = 39/13 = 3   iT = 3 x 3 = 9

Results

Our mechanism in figure 24 is non-multiplying which means that the turns of the last wheel are reducedimage 24 while its power is increased.The transmission ratio is as follows iT= (Z2 x Z4 x Z6 x Z8 ) : ( Z1 x Z3 x Z5 x Z7 )

= (50 x 50 x 50 x 50) / (10 x 10 x 10 x 10 ) = 625:1

3.5 Assembly of the different parts

3.5.1 Fix the motor to the base (1) with 4 2.9 x 9.5 mm screws (36), as shown in figures 29 and 30.3.5.2 Attach the connection  strip with two 2 x 21mm screws (20) and fix the battery holder (39) in place with two 2.9 x 9.5 mm screws (36). See figures 29 and 30.3.5.3 Attach three 40 x 15 x 10mm pieces of wood, obtained in point 3.2.9, together to form the counterweight. Screw two  eyebolt (35) into the counterweight as shown in the figure. Then loosen open the side bolt with a screwdriver in order to be able to pass the string through it later. image 253.5.4 Screw the other two eyebolt  into the back part of the left support. See figure 25. Then tie the end of the cord to each one, so that the cord is tense. The cord will act as a guide for the counterweight.3.5.5 Cut a piece of string of about 40cm and tie a knot at one end. Pass the string along the groove in the crosspiece in the centre of the bridge and pull until the knot makes contact with the groove. Tie the other end of the string to the eyebolt on top of the counter weight. Place this near the top of the vertical piece of wood and pass the cord through the cleft of the pulley.Place the guiding string in the open eyebolt on the side of the counterweight and test it by raising the bridge manually. When the bridge is up, the counterweight shouldn’t be touching the base.3.5.6 Tie a knot at one end of a 70 cm long piece of string and pass it through the other groove on the crosspiece in the centre of the bridge. Stretch out the string until you find the end and tie the far end to the shaft to which the red wheel of the motor is attached. This shaft will function as a winch, winding the string round itself.File the mounting shaft down a bit and attach the knot in the string to the shaft with hot fusing glue. This will ensure that the knot doesn’t slide on the shaft.Pass the string through the pulley winch and make the motor turn (with a battery) so that the string wraps round the shaft until it is tense but not yet lifting the bridge.

3.6 Electrical installation.

The connection of the wires (27) to the motor, to the sliding switch (25) and to the limit switches  (24) will be done using soldering, at the appropriate terminals. It’s convenient to solder the end of the wires that connect to the connection strip to assure a good level of contact. In the electrical plan, figure 26 shows the connections that must be made. Before starting the installation of the wiring, assign a colour to each wire (C1,C2, C3…). This way, it will be easier to make the connections and controls. The wires and their positioning are shown in figures 27 and 28.When the installation of the wiring is finished and its correct functioning has been checked, you can attach the wires to the appropriate pieces of wood with warm fusing flue at small intervals. image 26

4 How it works

Place the batteries (not provided) into the battery holder to which the (40) will be connected. When the bridge is in the horizontal position, the green LEDs on each side of the bridge ought to be lit up and the motor should be stopped.When you move the sliding switch the motor should start to work and the string should roll itself up round the winch.When the bridge starts to lift the barrier should go down and the green LEDs should go out while the red LEDs simultaneously light up.When the maximum elevation is reached, the motor must be stopped by the limit switch . The Leds shouldn’t change.Upon moving the sliding switch again the motor should start again in the opposite direction and teh bridge should lower. The LEDs will stay the same.When the bridge reaches the horizontal position the barrier should lift, the red LEDs should go out and the greens, simultaneously, light up, all of which is caused by the inferior limit switch.If the bridge doesn’t work as described above, there must be a connecting error and you should recheck the connections and wiring, following the diagram and making any necessary changes.The direction of the motor’s turns may invert itself thereby changing the connection of the terminals in the motor or of the sliding switch.If the LEDs don’t work, check to see if you have set them up with the correct polarity.If the motor stops too soon or too late, move the limit switches backwards or forwards.If the motor jumps or stops, check the mechanism.If any piece of wood is rubbing against another, rub it gently with sandpaper.  

image 27image 28

image 29

Dictionary::::

brass :  any of various metal alloys consisting mainly of copper and zinc

The post Lifting Bridge part 3 first appeared on Tecnología ESO en Ingles.

]]>
Lifting Bridge part 2 https://www.petervaldivia.com/lifting-bridge-part-2/ Sun, 25 Jan 2015 11:31:19 +0000 http://www.petervaldivia.com/?p=367 Bridge Part 2 Part 3        Lifting Bridge.   3.2.5 Cut the following pieces from the 250 x 70 x 5 mm piece of plywood. 1 piece of 110 x 70 x 5 mm 1 piece of 60 x 70 x 5 mm 2 pieces of 10 x 45 x 5 mm 3.2.6 […]

The post Lifting Bridge part 2 first appeared on Tecnología ESO en Ingles.

]]>

 

 

Lifting Bridge.

 

  • 3.2.5 Cut the following pieces from the 250 x 70 x 5 mm piece of plywood. 1 piece of 110 x 70 x 5 mm 1 piece of 60 x 70 x 5 mm 2 pieces of 10 x 45 x 5 mm figure 13 3.2.6 Stick the above pieces down in the positions shown in figure 14
  • figure 14 3.2.7 With the flat file , level out the area between the walkway and the 110 x 70x 5 mm piece. image 153.2.8 Attach the 70 x 10 x 5 mm strip, obtained in point 3.1.6, as shown in figure 15. The 17mm measurement ought to be checked by supporting the walking on it 3.2.9 Obtain the following pieces from the 325 x 15 x 10mm piece (6) 1 piece of 310 x 15 x 10 mm,  1 piece of 300 x 15 x 10 mm,  1 piece of 160 x 15 x 10 mm 1 piece of 150 x 15 x 10 mm, 2 pieces of 90 x 15 x 10 mm, 3 pieces of 40 x 15 x 10 mm image 16 3.2.10 Perforate the 310 x 15 x 10 mm strips and the 300 x 15 x 10 mm strips, obtained in point 3.2.9, as shown in figure17. The holes should be in the upper part arch of the bridge (this will be put together in point 3.2.11). The M4 x 30mm bolts (28) that will form the shaft for winding up the string, will be put through these holes. iamge 17 3.2.11 Attach the pieces obtained in point 3.2.10 to the bride supports laterally. The higher arch on the bridge will be formed by a 310 x 15 x 10 mm piece, a 150 x 15 x 100 mm piece and a crosspiece of 90 x 15 x 10 mm. image19 3.2.12 Attach the two wooden pulleys (7) with the M4 bolts (28), four washers (30) and four M4 nuts (29), as shown in figure 9. image 20 3.2.13 Attach the sliding switch in its hole with the 2.2 x 6.5 mm screws (38) and fix the two Limit switches (24) in place, in the positions shown in figure 19, with four 2 x 12 mm screws (37). Note: Firstly, fix the Limit switches in place with one screw and when the rest has been set up, the second screw can be screwed in as we search for the ideal position, in terms of function. 3.2.14 Place the LEDs (21 and 22) and the resistors (23) in the two terminals, as shown in figure 19. Note: The shorter leg of the Led is the negative pole. The polarity of the protective resitors is unimportant. The leg of the resistor mustn’t be in contact with the negative pole of the LED. Fix the connection strip  with the LEDs and the resistors to the supports of each arch with a 2 x 12 mm screw (37), as shown in figure 19.

    3.3 The construction of the barrier

3.3.1 Draw the shape of the barrier on the 90 x 10 x 5 mm strip of wood obtained in point 3.1.7 and cut it out with the coping saw. See figure 20. Polish up the edge and make a hole of Ø 3mm, as shown. image 20 3.3.2 Round off the 20 x 10 x 5 mm piece, as shown in figure 20, and make a hole in it of 3mm. Round off one of the 15 x 10 x 5 mm pieces, as shown in figure 20. The second 15 x 10 x 5 mm piece will form the  barrier limit.3.3.3 Put together the four pieces made in point 3.3.1 with a M3 x 20 bolt (32). two M3 washers (34) and two M3 nuts (33), as shown in figure 21. Glue the whole structure to the bridge support.The barrier must be able to move on its access with friction. image 213.3.4 Test the barrier carefully by raising and lowering it manually.3.3.5Attach the rail and the rest of the bars to the sides of the entrance to the bridge. See figures 27 and 28.

3.4 The construction of the reduction motor

In figure 22 we have:

1. Mounting blocks (14)     2. Cylindrical bolt (31)    3. Separating ferrule (15)  4. M3 Nut (33)

5. Electric motor 1.5/4.5V (17)  6. Metal shaft (13)  7. Pinion 0.5 (19)  8. Double toothed wheel, o.5 (18)9. Separating washers (12)  10. M4 washers (30) 11. M3 washers (34) 12. 5mm brass ferrule (16)

image 223.4.1 Place the motor and the two separating ferrules (15) between the two mounting squares, fixing them in place with two M3 x 35mm bolts (33). See figure 22.3.4.2 Finish setting up the mechanism, following the directions in figure 22. Start by putting the two shafts (13) in place and passing the separating washers (12) along them. Going from the inside to the outside, pass the 5 M3 washers, the brass ferrule (16) and the four double toothed wheels (18) along the shafts. The last piece should be the red toothed wheel. Check that the toothed wheels interlock well.Finish placing the separating washers (12) on the shafts. All the white toothed wheels should move freely on the shaft.Place the pinion (19) on the shaft of the motor.Only the pinion and the two red toothed wheels are fixed to the shafts.3.4.3 Check the functioning of the motor by moving the pinion of the motor with your hand. The second shaft will be moved by the toothed wheels. image 23

For example, if every time the first wheel turns twice the last wheel turns once, we have the following transmission ratio.

i = N1 / N2 = 2/1 = 2

N1 always represents the entry figure and N2 always represents the exit figure. You can also calculate the transmission ratio working from the number of teeth of on wheel (Z1 and Z2) or from the diameter (D1 and D2):

i = N1 / N2 = Z2/Z1 = D2/D1

When the transmission is a multiplying transmission the exit wheel turns faster than the entry wheel, but with less force. In a non-multiplying transmission the exit wheel turns more slowly but with greater force than the entry wheel. In summary, if the exit wheel turns faster it has less force and if it turns slower it has more force. The intensity of the force is inversely proportional to the velocity of the rotations. When the velocity of the turn reduces by half, the power doubles, if the entry is the same.

Dictionary:

brass :  any of various metal alloys consisting mainly of copper and zinc

The post Lifting Bridge part 2 first appeared on Tecnología ESO en Ingles.

]]>
Lifting Bridge https://www.petervaldivia.com/lifting-bridge/ Sun, 25 Jan 2015 11:30:29 +0000 http://www.petervaldivia.com/?p=365 Bridge Part 2 Part 3   Lifting Bridge. Posted on April  14th, 2009 by     Note: Once finished, models shouldn’t be used as toys in the commercial sense of the word. They are an educational tool, suitable for the classroom   1.) Technical Information  Activities to be undertaken  Interpretation of diagrams and plans  Construction of […]

The post Lifting Bridge first appeared on Tecnología ESO en Ingles.

]]>

Lifting Bridge.

Posted on April  14th, 2009 by

 

lifting bridge

 

Note: Once
finished, models shouldn’t be used as toys in the commercial
sense of the word. They are an educational tool, suitable
for the classroom

 

1.) Technical Information

 Activities to be undertaken

  •  Interpretation of diagrams and plans
  •  Construction of various structures
  •  The construction and adjustment of a reduction
    motor
  •  Assembly of the electronics involved
  •  Mechanical assembly
  • Required tools (not included in the
    kit)


  • Set square
  •  Saw
  •  Files
  •  Vertical drill and drill bits of 3 and 4mm
  •  Screwdriver
  •  M3 and M4 keys
  •  Scissors
  •  Pliers
  •  Soldering iron and solder
  •  White glue and glue gun
  •  1.5V batteries
  • 1.3 Measurements

    600x320x150mm

    1.4 Objective

    The construction of the bridge will allow the students to
    learn how to resolve two problems-How to ensure the safe
    passage of people and vehicles over the bridge-How to equip
    the bridge to allow the passage of boats taller than the
    bridge

    2.1. Material provided

     

    Material Number Measurements   Piece Picture

    Plywood

    1 10x140x498 mm Base lifting bridge material 1
    2 Pine strip 1 10x50x300 2x10x50x1002x10x50x50
    3 Pine strip 4 10x75x80
    4 Pine strip 1 10x50x350
    5 Plywood 1 5x70x250 1x5x70x601x5x70x1102x5x10x45
    6 Pine strip 4 10x15x325 1x10x15x3101x10x15x3001x10x15x160

    1x10x15x150

    2x10x15x90

    3x10x15x40

    7 Wooden Pulley 2 Ø10×10 mm
    8 Pine strip 3 5x10x250 1x5x10x1151x5x10x903x5x10x80

    1x5x10x70

    1x5x10x20

    3x5x10x15

    9 Rods 12 Ø3×500 mm
    10 Cotton thread 1 2 meters
    11 Metal rod 1 Ø3×95 mm
    12 Retention rings 6 Ø3
    13 Metal rods 2 Ø3 x 70 mm
    14 Mounting blocks 2 30×53 mm
    15 PVC fittings 2 Ø7 x
    25 mm
    Reducing motor
    16 Brass fitting 1 Ø4 x
    25 mm
    Reducing motor
    17 Motor 1 Ø21 x
    25 mm
    18 Double toothed wheel 4 50/10 teeth 3 whites, 1 red

     

    2.2 Material provided

     

    Material Number Measurements Picture
    19 Pinion 1 10 teeth lifting bridge materials 2
    20  strips connections 2 12 connections
    21 LED 2 Ø 5mm
    red
    22 LED 2 Ø 5
    mm green
    23 Resistors 2 130
    Ω
    24 Limit switches 2 250 V/5A
    25 Sliding switch 1 6 contacts
    27 Electric wire 1 10 m
    28  screw bolt 2 M4 x 30 mm
    29 Nut 4 M4
    30 Washer 6 M6
    31 screw bolt 2 M3 x 35 mm
    32 screw bolt 1 M3 x 20 mm
    33 Nuts 4 M3
    34 Washer 8 M3
    35 eyebolt 4 Ø 3 x 10 mm
    36 Screws 6 DIN 7981
    37 Screw 8 DIN 96
    38 Screw 2 DIN 7981
    39 Battery holder 1 2 (1,5 V) battery
    40 Battery holder connector 1

     

    3. Construction

    Before starting to make the bridge it is important to
    familiarise yourself with the general plans of the bridge
    (figures 27/28) and the diagram of the electrical layout.

    Construction phases

    3.1. The construction of the moving section of the bridge
    3.2 The construction of the bridge

    pillars
    3.3 The construction of the barrier3.4 The
    construction of the reduction motor3.5 The assembly of the
    different components3.6 Electrical installation

    3.1 The construction of the the moving
    section of the bridge

    3.1.1 Cut two 80 x 50 x 10 mm pieces and two 50 x 50 x 10
    mm pieces of wood from the piece of wood measuring 300 x 50
    x 10 mm (2), using a saw. The two pieces 80 x 50 x 10 mm are
    going to be used for the bridge pillars

    image4

    image 5
    3.1.2 Mark the centre of the two 50 x 50 x10 mm pieces,
    obtained in point 3.1.1, and round them off as shown in
    figure 2. These pieces will serve as the base for the moving
    section of the bridge.

    3.1.3 Drill a hole through the two pieces at the same,
    using a Ø3mm drill piece, at the
    point indicated in figure 2.

    Note: Put the pieces on on top of the other, fix
    them together with adhesive tape and drill both holes at the
    same time. The Ø 3 x 95 mm shaft
    (11) will be passed through this hole later. 3.1.4 Make a
    2.5mm wide and 55mm long groove in both sides of the 10 x 50
    x 350 mm strip of wood (4), as shown in figure 3.
    figure 3

    figure 3
    3.1.5 Glue the two perforated 50 x 50 x10 mm pieces onto the
    walkway piece of the bridge (4), as shown in figure 3. 3.1.6
    Cut the following pieces, indicated in figure 4, from the
    two large pieces (8) of 500 x 10 x 5 mm. 1 piece of 115 x 10
    x 5 mm 1 piece of 90 x 10 x 5 mm 3 pieces of 80 x 10 x 5 mm
    1 piece of 70 x 10 x 5 mm 3 pieces of 15 x 10 x 5 mm
    figure 4
    3.1.7 Make a slit, 1mm wide and 5mm long, in both ends of
    the 115 x 10 x 5 mm piece of wood (obtained in point 3.1.6),
    as shown in figure 5.

    figure 5

    3.1.8 Make a piece like the one shown in figure 6 from
    one of the 15 x 10 x 5 mm pieces (obtained in point 3.1.6).
    Then glue this piece to the end of a 80 x10 x 5 mm piece of
    wood (from point 3.1.6) in the position indicated in figure
    6.
    figure 6

    3.1.9 Stick the 115 x 10 x 5 mm piece from point 3.1.7,
    with the the piece of 80 x 10 x 5 mm, obtained in point
    3.1.8, and the 80 x 10 x 5 mm strips onto the walkway of the
    bridge, as shown in figure 7. Fix an M4 washer (30) to the
    outside face, over the hole, as shown in figure 7.
    figure 7
    3.1.10 Make the frame and rails of the walkway of the bridge
    using the rods (9) and the template in figure 29, on the
    scale 1:1. Make one side first, then the other and glue them
    to the underside of the walkway. Then fix the crossbeams (a)
    between both frames and the diagonals (b) to each end
    triangulating the end of the structures, as shown in figure
    8.

    figure 8 bridge

    3.1.11 Make the two rails by cutting eleven short pieces
    and one long piece for each side from the rod (9). Space the
    short rods equally, as shown in figure 8. Stick the whole
    together and glue to the bridge. Note: Assure
    yourself that neither the frame nor the rails exceed the
    limits defined in figure 8 as this could cause problems with
    the raising and lowering of the bridge.

    3.2 The construction of the bridge
    supports

    3.2.1 With care, cut out a hole in one of the 80 x 75 x
    10 mm pieces with a coping saw, as shown in figure 9. This
    is where the sliding switch will be placed later, to connect
    and disconnect the current. Take a second 80 x 75 x10 mm
    piece and bevel the corners of both pieces at the angle
    shown and make a hole in the same position in both with a
    3mm drill, as shown in figure 9.

    Note: Put the two pieces one on top of the other,
    join them together with adhesive tape and do the beveling
    and perforating in both at the same time.

    image 9

    3.2.2 Stick the two large 80 x 75 x 10 mm pieces with the
    Ø 10 mm pieces obtained in point 3.1.1, as shown in figure 10.
    Do the same with the two 80 x 75 x 10 mm pieces without
    holes and another 75 x 50 x 10 mm piece.

    figure 10

    3.2.3 Stick the first piece (the one with holes),
    obtained in point 3.2.2, to the large 495 x 140 x 10 mm (1)
    piece, to act as a bridge support, as shown in figure 11.
    figure 11
    3.2.4 Place the moving part of the bridge (from point 3.1)
    between the two bridge supports and fix them in place using
    the Ø 3 x 95mm metal shaft (11).
    Make sure it can move. On the right, the board must be a
    little lower than the horizontal. If necessary, file the
    support down a little at the points where it supports the
    walkway of the bridge. See figure 12. Fix the rod in place
    with the washer (12). See figure 12 Attach the second
    support (without holes) to the end of the base. Make sure
    there is a gap of 0.5 and 1 mm between the support and the
    walkway.
    figure 12

    Dictionary:::

    pillars:  vertical support; a column

    The post Lifting Bridge first appeared on Tecnología ESO en Ingles.

    ]]>
    Helicopter Assembly Details 3 https://www.petervaldivia.com/helicopter-assembly-details-3/ Sun, 25 Jan 2015 11:18:26 +0000 http://www.petervaldivia.com/?p=357 Thermoelectric helicopter Part 1 Part 2 Part 3      Helicopter Assembly Details 3   6.6 Final assembly 6.6.1 Fix the radiator and its cell in place in the cabin, leaving a 40mm gap between the cell and the base support of the candle. To do this place an object of 40mm in height (a […]

    The post Helicopter Assembly Details 3 first appeared on Tecnología ESO en Ingles.

    ]]>

     

     

    Helicopter Assembly Details 3

     

    6.6 Final assembly

    6.6.1 Fix the radiator and its cell in place in the cabin, leaving a 40mm gap between the cell and the base support of the candle. To do this place an object of 40mm in height (a piece of aluminium tube, wood or other) on top of the candle support, placing the radiator on top. The sides of the cabin will be placed between the motor supports.
    With a pencil mark, in the motor support, the points of contact with the sides of the cabin and take away the radiator. Bend the motor support to the right and left, inwards, to the marks made earlier with a pencil, so that there remains a space of 25mm for the motor. You can round off the edges of the support so that they adapt better to the curves of the motor.
    image 28
    image 296.6.2 Cut the black wire 40mm from the cell, peel back the ends and solder. Place the radiator on the support, separate from the cabin. Check the measurements and curves and adjust the cell so that the flame of the candle is in the centre of it. Solder, or glue with two component glue, the motor support to the right and left sides of the cabin.
    6.6.3 Take the protective strips of the two motors (7), throwing them away, and place a pulley (3) on eachimage 30 shaft.
    Note: To put the pulleys in place, place them on a base and press down on them from above with the motor’s shaft, as shown in the picture.
    6.6.4 place one of the motors at the back, between the ends of the helicopter’s side bars, so that the connection wires remain on the left side (seen from the direction of flight) in the upper and lower part of the side structure. Mark the contact point of the frame with the motor using a pencil. Rub these points with sandpaper.
    6.6.5 Place the second motor on the main rotor support and adjust it so that the connection wires remain on the left of the rear edge of the motor support (seen from the direction of flight). Mark the points of contact between the motor and support. Take the motor out and rub the points of contact with sandpaper.
    6.6.6 Cut the black wires at 30mm from the motors. Peel back the ends and solder them.
    Solder the sandpapered spots in the motors and pulleys (cover with a layer of solder). Be careful to avoid overheating the surfaces of the motors. Then, place the motors in the appropriate places, adjust their positions and solder.
    image 31
    6.6.7 Solder the centre of the blades of the main rotor and the rear rotor (a soldered point to fix them to the pulley) as shown in the drawing.
    image 32
    6.6.8 Lean the cabin on its right side and weld the rear rotor to the pulley as shown in the drawing.
    image 33
    6.6.9 Rest the cabin on the runners and solder the principal rotor as shown in the picture.

    6.7 Wiring and operating check

    6.7.1 Solder the black wires of the motors (7), the siren (8) and the Peltier cell to one of the sidebars of the cabin.

    6.7.2 Solder the following red wires together making one bunch; 1.) The principal motor, 2.) The Peltier cell and 3) the siren. Adapt the length of the three cables to the shortest cable’s length (the motor). Cut, peel back the ends and solder.
    Then, attach the bundle of three wires to the rear rotor’s red wire. To do this, cut a piece of about 80mm (9a) from the electric wire (9), peel back the ends and solder.
    Lastly, solder together the ends of the wire (9a) with the bundle of three wires and the wire from teh motor.
    Simply for aesthetic reasons, align the red wires along the left hand side of the structure, fixing them in place with adhesive tape.
    Helicopter electricity cables

    6.7.3 Operation check
    Light the candle and wait about a minute. The wick must burn correctly. Place the lit candle on its support. The rotors will begin to turn and the siren will go off a moment later. When you have made the system work you should keep in mind the warnings about maximum functioning times and the minimum cooling periods, suggested at the beginning.

    7. Plans

    Plans for the forward and rear rotors, the runners and the runners supports. The radiator, candle and main rotor supports. Scale 1:1

    Plan 1
    Plans of the lateral fuselage and of the alignment. Scale 1:1
    fuselage

    Dictionary:

    Wick :  a bundle as of cotton, which in a candle serves to draw up the melted wax to be burned.

    Signs:  a notice,  warning, or advertisement, that is displayed  for public view. eg.  a traffic sign.

     

    The post Helicopter Assembly Details 3 first appeared on Tecnología ESO en Ingles.

    ]]>
    Helicopter Assembly Details 2 https://www.petervaldivia.com/helicopter-assembly-details-2/ Sun, 25 Jan 2015 11:17:34 +0000 http://www.petervaldivia.com/?p=355 Thermoelectric helicopter Part 1 Part 2 Part 3      Helicopter Assembly Details   6.3 Preparation of the undercarriage 6.3.1 Get 4 pieces of 130mm (1i) and 2 pieces of 110mm (1k) from two rods (1). Polish 6.3.2 Bend one of the ends of the 130mm rods at an angle, as shown in the drawing […]

    The post Helicopter Assembly Details 2 first appeared on Tecnología ESO en Ingles.

    ]]>

     

     

    Helicopter Assembly Details

     

    6.3 Preparation of the undercarriage

    6.3.1 Get 4 pieces of 130mm (1i) and 2 pieces of 110mm (1k) from two rods (1). Polish
    6.3.2 Bend one of the ends of the 130mm rods at an angle, as shown in the drawing and on the plan on page 19.

    image 14
    viceNote: If possible bend them in twos using the vice ( see illustration on the left )
    6.3.3 Bend the pieces (1k) of 110mm at at angle at both ends, as shown in the drawing and in the plan on page 19.image 15

    6.3.4 The pieces (1i) should be soldered together at the ends to form the landing runners.
    Note: Place the pieces (1i) on the heat resistant base and secure them with adhesive tape, as shown in the drawing.
    6.3.5 Once the runner are soldered, align them in parallel with a distance of 90mm between them and fix them in place with adhesive tape. Then place the two crossbars at right angles at 25mm and 90mm from the far end. Solder. See picture.
    Note: Use an aluminium tube (5) to keep the cross bars perpendicular
    image 16
    6.3.6 Keep the undercarriage on the base and solder the cabin.
    Note: Start by heating the point to be soldered with the soldering iron and then put the wire solder in place.
    image 17

    6.4 Preparation and assembly of the main and rear rotors

    6.4.1 To make the main rotor, get two pieces (1g) of 320mm and one piece of 25mm (1h) from two metal rods (1). Polish the ends.
    6.4.2 Mark the pieces (1g) in the middle and double them as shown in the plan on page 19.
    image 18

    6.4.3 Align the pieces (1g, 1h) as shown in the plan on page 19 and solder them.

    image 19
    image 20. rear rotor6.4.4 You will need one metal rod (1f)of 100mm for the rear rotor. Polish the ends and bend as shown in the plan on page 19.
    Note: Bend one end to the right and one end to the left.

    6.5 Preparation of the supports for the candle, radiator and the main rotor.

    6.5.1 Transfer the measurements of the pieces (4a,4b,4c) on to the copper sheet or cut out the plans on page 19 and stick it to the sheet. Cut the pieces with metal shears ( see on the left ) or a hacksaw. Polish them.
    Note: before working with the copper sheet, polish the edges.
     

     

    image 21
    6.5.2 Saw the aluminium tube (5) into equal pieces. Polish the ends.
    6.5.3 Fold the copper piece (4b) as shown in the picture.

    image 22
    6.5.4 Transfer the measurements shown in the drawing to the candle support (4c) and cut with metal shears or a hacksaw. Bend the pieces upwards and polish them.
    image 23

    6.5.5 Fix the aluminium tubes (5a) and the motor support (4b) to the radiator base (4a) with two component glue, as shown in the picture. Put a thin layer of glue in the places indicated. The tubes will hold with adhesive tape.

    image 24

    Note: Before putting flue on the places indicated you should rub them with sandpaper. Pay attention to the manufacturer’s instructions on the glue. You should prepare the glue, to stick the siren beneath the candle support, at the same time.

    6.5.6 Glue the candle support onto the back of the siren (8), directing the siren’s cables towards the narrow back part of the candle support, as shown in the diagram.

    image25

    6.5.7 When the glue is dry, cut the black siren cable down to 40mm, peel one end back and solder. Prepare more two-component glue to stick the thermoelectric cell to the radiator and the siren to the base of the cabin.
    6.5.8 Stick the siren down with the candle support in the centre of the cabin, placing the narrow back section and the wires facing the back. See drawing.

    6.5.9 To avoid overheating destroying the Peltier cell, place a drop of two component glue on the four corners of the cell.
    Glue the ceramic plate (6) onto the base of the radiator by the side that doesn’t have the wires soldered to it, as shown in the picture.
    Note: use a very thin layer of glue. The thinner the level, the better the diffusion of heat. Stick the cell down using rotating movements.

    image 27

    1.The ceramic plate the cables are fixed to is in the upper part
    2.Stick the ceramic plaques down by the corners.

    Dictionary:

    Goods : Supplies, possessions

    Signs:  a notice,  warning, or advertisement, that is displayed  for public view. eg.  a traffic sign.

    The post Helicopter Assembly Details 2 first appeared on Tecnología ESO en Ingles.

    ]]>
    helicopter assembly https://www.petervaldivia.com/helicopter-assembly/ Sun, 25 Jan 2015 11:16:37 +0000 http://www.petervaldivia.com/?p=353 Thermoelectric helicopter Part 1 Part 2 Part 3      Helicopter Assembly Details   1. Technical information Type: Functional model to be constructed Use: Construct in a workshop, for students of 12 and above 2. Elements used Radiator: Material: aluminium (non-magnetic, smooth) Treatment: Cut, file and polish Attachment: Stick together with a two-component glue After […]

    The post helicopter assembly first appeared on Tecnología ESO en Ingles.

    ]]>

     

     

    Helicopter Assembly Details

     

    1. Technical information

    Type: Functional model to be constructed
    Use: Construct in a workshop, for students of 12 and above

    2. Elements used

    Radiator: Material: aluminium (non-magnetic, smooth)
    Treatment: Cut, file and polish
    Attachment: Stick together with a two-component glue
    After finishing: It doesn’t need any further treatment

    Frame
    Material: Steel rods (copper-plated covering)
    Treatment: Cut, bend, file
    Attachment: String together, light soldering
    After finishing: It doesn’t need any further treatment

    Material
    Material: Brass, copper and zinc alloy. Good, hard electrical conductor
    Treatment: Cut, file
    Attachment: Light soldering
    After finishing: It doesn’t need any further treatment

    Bases
    Material: Copper, non-ferrous metal. Ductile and a good electrical conductor
    Treatment: Cut, bend, file
    Attachment String together, glue with a two component glue
    After finishing: It doesn’t need any further treatment

    3. Tools

    Cutting: Saw for cutting metal. Note: Do not squeeze the saw while it´s not in motion. There is a risk of cutting yourself.

    Filing: Choose the tool most suited to the job. In this case fine files. Note: Only press the file when it’s moving.

    Sticking: We recommend a two component glue with a fine cap. Follow the makers’ instructions.
    Adhesive tape.

    Soldering: Use a 60W soldering iron or blowtorch
    Clean the surfaces to be soldered, use paint stripper or solder with an incorporated paint stripper.

    4. Material provided
    Application Material Quantity Measurements Drawing
    Cabin, Rotors and landing 1- Metal bars 7 Ø 2X500mm
    2.- Runners Brass tube 1 Ø3/0,5x100mm
    3.- Brass pulley 2
    Radiator/Support 4.-Copper sheet 1 0,8x80x150mmor

    0,6x80x150

    5.- Aluminium tube 1 Ø25/1x200mm
    Propellant 6.- Peltier cell 1 5x30x30mm
    7.- Motor 2 Ø 25 mm
    8.- Siren 1 1-12 V
    9.- Electric wire 1 500 mm
    10.- Candle 1

     

     Helicopter

    helicopter pieces

    6 – Assembly instructions

  • 6.1 Preparation of the lateral frames
    6.2 Preparation of the flight cabin
    6.3 Preparation of the undercarriage
    6.4 Preparation and assembly of the principal and rear rotors
    6.5 Preparation of the supports for the candle, the radiator and the main rotor
    6.6 Final assembly
    6.7 Wiring and operating check
    Important observations:
  • The Peltier cell has a ceramic cover so is fragile.
  • Before soldering the metal rods you should remove any oxides from them using metal wool or sandpaper.
  • The generator is fitted for use in a model, not for continual use. You should leave the motor resting for 15 minutes after 10 minutes of use.
  • Don’t touch the radiator (the aluminium tubes and copper sheet). There’s a risk of burning.
  • In order to avoid all risk of fire you must handle the candle and match with care and avoid proximity between the helicopter and flammable material.
  • Don’t allow children to play with the helicopter unsupervised.
  • The rotor blades could be dangerous to small children so they shouldn’t go near the helicopter.
  • 6.1 Preparation of the lateral frames

    6.1.1 You will need 2 metal rods (1) of 500mm and two pieces of metal rods of 200mm (1a) to make these parts. Polish the ends of the rods
    6.1.2 Bend the two rods (1) as shown in the pattern on page 20, the plan of the lateral fuselage.
    Note: To form the rounded curves you can use a tube or bottle with an appropriate diameter. Keep checking the curves against those shown in the diagrams. Don’t use tools so that you don’t leave marks on the rods. At the same time you should make sure that the curves maintain the rods alignment, without forming lateral deviations.

    6.1.3 In order to connect he rods (1/1a) you will need to cut two 15mm pieces (2a) from the brass tube (2). You will place the ends of the rods in these tubes. Polish the short pieces to get rid of the burr produced by the sawing.

    Note: To avoid breaking the saw blade, saw using a light, even motion.

    6.1.4 The piece of metal rod on the right (1a) is joined with the uppermost part of the curved rod (1), through the brass tube. The tube will be soldered into place between the two.
    To do this make a mark about 7mm away from the end of one of the rods. Slide the tube along the rod to the mark and solder. The end of the other rod should be pushed into the tube until hitting the other one and the soldered into place.

     

    image 7

     

     
    6.1.5 The excess part of the rod (1a) should be cut down until it matches the length of the other. Solder these two ends together.

    6.2 Preparation of the flight cabin

    6.2.1 With the remains of the previous rods and the one new tod, prepare four crossbars (1b, 1c,1d, 1e), as shown in the drawing. Polish the ends.

    crossbars

    6.2.2 Transfer the alignment diagram (p20) by cutting out and then pasting it to a heat resistant base ( thick wood, for instance) of a minimum of 150 x 200mm.
    Note: this base has to be heat resistant because the crossbars and sidebars will the placed on it and soldered together on it.
    step 11

    6.2.3 Place the aluminium tube on top of the alignment diagram, as shown in the drawing. Fix it to the base with adhesive tape.
    6.2.4 Always following the drawing, adjust the sidebars of the cabin and fix in place with adhesive tape. Align the side frames in such a way that there is a 12mm separation between them at the back.
    Note: This 12mm space is important, because the rotor motor will be placed here later.
    image 12
    6.2.5 Place the crossbars (1b, 1c) on the base, as shown in the drawing. Their edges need to touch the side bars. Solder.

    Finished cabin

    Note: Owing to differences in crossbars and in angles, there could be differences between models.

    6.3.6 When the metal has cooled, turned the cabin 180º so that the upper part is on the base, as shown in the drawing. Adjust the crossbars (1d, 1e) and solder.
     

     

     

     

     

    Dictionary:

    Bend : benderHave you watch  Futurama on Tv?. Do you Know Bender. Do you Know what was the task of bender when he was working on the factory. So Bend is Bender’s favourite hobby

     

    The post helicopter assembly first appeared on Tecnología ESO en Ingles.

    ]]>
    Thermoelectric helicopter with siren https://www.petervaldivia.com/thermoelectric-helicopter-with-siren/ Sun, 25 Jan 2015 11:15:38 +0000 http://www.petervaldivia.com/?p=351 Thermoelectric helicopter Part 1 Part 2 Part 3   Thermoelectric helicopter with siren!.       Note: Once finished, models shouldn’t be used as toys in the commercial sense of the word. They are an educational tool, suitable for the classroom   Does the idea of checking if a propeller is turning after filling two recipients […]

    The post Thermoelectric helicopter with siren first appeared on Tecnología ESO en Ingles.

    ]]>

    Thermoelectric helicopter with siren!.

     

    Helicopter

     

     

    Note: Once finished, models shouldn’t be used as toys in the commercial sense of the word. They are an educational tool, suitable for the classroom

     

    Does the idea of checking if a propeller is turning after filling two recipients with water at different temperatures see strange to you?

    The electricity necessary to make a motor cause the propeller to turn is provided by a thermal element as one side is heated and the other is cooled

     

    This is the Seebeck cell. Another thermoelectric element is the Peltier cell which is the direct opposite: When you supply a Peltier cell with an electric current it acts like a heat bomb, producing cold on one side and heat on the other. Both cells can be used, with less efficiency, to create the opposite effect. If you send a current of 8V and 3 A through the cell in this kit, one face will heat up to 60º and the other will cool down to 50º. Here we’re not going to use the Peltier cell to obtain heat and cold, but for the opposite effect. One side will be cooled down and the other will be heated up to obtain a voltage of 1-3 volts and a current of 10 to 500 mA. Electricity is generated in a silent and ecological way through the difference in temperature. So why isn’t it used more?

    There are two basic reasons:

    1. The output of the current thermoelectric cells is such that hardly more than 5% of the temperature differential is used to generate electricity. 2. Thermoelectric cells are still very expensive.When their output is raised and their cost lowered it will be possible to use residual temperature differentials, such as that produced by the burning of rubbish, in a very interesting way.

    In 1821 Thomas Johan Seebeck had the idea of making a circuit with two different materials, passing through two welded seams. While cooling one and heating the other he proved that a current was flowing through the closed circuit he had constructed. On the other hand, when the temperature of both metals was the same no current was produced. This thermoelectric effect was henceforth known as the Seebeck effect and is the basis of all modern day thermal elements using different materials. Nowadays, instead of two soldered metals we use semi-conductor materials.

    Let’s see fist what is a N and P semiconductor

    Doped silicon crystal

    N semiconductor. Phosphorus or Arsenic have 5 electrons in its outer band. Is small quantities are added to Silicon, then four of the five electrons will bind ( linked ) with the Silicon atoms leaving one electron unbound and free to move, so we can find negative charge moving along this material

    P Semiconductor. In case of adding elements such as Boron or Indium (three valence electrons )  in its outer band, unfilled spaces known as “holes” will appear as no all electrons can bind with silicon atoms, so we can find positive charge moving along this material.

    Don’t forget that both materials are neutral in term of charge

     

    seebeck effect

    On  the left a semiconductor thermocouple ( a N semiconductor and a P semiconductor ).

    Heat produces realising  of charges, so when heat is applied to one side of a semiconductor ( see in  illustration red surface ), charge carriers into the conduction band and by this way, they cam move freely, electrons in the N semiconductor and holes in the P semiconductor. The area in every semiconductor closed to the heat surface will produce more free charges and the will be concentrated at the hot side of the device. If there are a lot of negative charge in the N semiconductor, the rest of electrons in the N semiconductor will be  repel  eachother with the result is that they tend to migrate towards the cold side of the N semiconductor.  In the P semiconductor, within the hotter area, a high concentrate of holes will attract  the electrons of the N semiconductor. The yellow arrow indicate the movement of the electricity.galileo probe As both materials are neutral, if N material has a negative charge below the heat surface, there is a positive charge above the cold surface. The same occur in the P material.

    Nowadays, thermal elements are used in many different fields, for example the Galileo probe, that is far from the sun, doesn’t obtain its electricity through solar panels but through thermal elements, obtaining heat from nuclear energy and cold from the temperature of the surrounding space. They are also used in the detection of gas leaks in pipes. Since 1999 there has been a watch which works using a thermal element in a thin layer, obtaining heat from the human body and using the surrounding air to cool it down. The surrounding air is sufficient to cool down the tiny element. Progress in the production of thermal elements will allow us, perhaps soon, to obtain electricity at an auxiliary energy.

    Structure of a Seebeck cell with various elements  Thermal parallelism and electricity in series.

    As we have seen before, a positive area and a negative area is produce in every semiconductor as a consequence or heat. Sea next image and if you add some semiconductor we obtain a “serial battery”.

    How a Seebeck cell works

    How a Seebeck cell works. Hydroelectricity Comparison

    First situation: without a difference in the level between the 2 recipients Hydroelectricity Comparison No difference in level. The water doesn’t move. The generator doesn’t produce electricity There’s no slop between the two recipients, the water doesn’t circulate and no electricity is produced in the generator. The same occurs in the Seebeck effect (the Seebeck generator) if there’s no difference in temperature. Second situation: with a difference in level between the two recipients Hydroelectricity Comparison 2 The water circulates. Difference in level. The generator produces currents You can’t rightly talk about a current here as with electricity but the process is visible immediately. There’s a slope, the water circulates and produces current. If you transfer this principal to a ‘fall’ differential in temperature, you can easily understand the basis of how thermic generators operate.

    How does the thermic helicopter work?

    If the previous explanations have been assimilated correctly, it shouldn’t be difficult to understand how the thermic helicopter works. The thermoelectric Peltier cell will be explained first. The cell will heat up to about 110ºC with the flam of a candle. The other face will stay colder, at about 70ºC, due to a radiator. The temperature differential will create a voltage of between 1.4 and 2 volts and 100mA, enough to move the helicopter’s two motors. The cell produces energy as long as a temperature differential is maintained, but the duration of activity of the model is limited owing to some technical restrictions. When the radiator of aluminium tubes has heated up the temperature will lessen, the motors will turn more slowly and the siren will go silent. At this point, after about 10 minutes of use, it will be the right moment to blow out the candle so that the radiator cools down. You shouldn’t forget that the Peltier cell can only support temperatures of up to 140ºC, after this point the interior weldings melt. There are cells that can support higher temperatures but their price is prohibitive for teaching purposes. You can lengthen the duration of use by placing damp cotton in the aluminium tubes. Water absorbs a lot of heat and can lengthen the duration of use by some 5 minutes, but in the end it is vital to have a pause in the use of the helicopter. Under no circumstances should you use a heat source other than a candle, for instance a lighter, as this will destroy the cell.

    Dictionary:

    Goods : Supplies, possessions

    Signs:  a notice,  warning, or advertisement, that is displayed  for public view. eg.  a traffic sign.

    The post Thermoelectric helicopter with siren first appeared on Tecnología ESO en Ingles.

    ]]>
    Php Delete https://www.petervaldivia.com/delete/ Sun, 25 Jan 2015 10:31:18 +0000 http://www.petervaldivia.com/?p=334 Php Listing Modify Delete     Deleting a record in a Mysql database.   The object we wished to sell has been sold and it’s time to delete the announcement so that people stop calling us. To do this we have to undertake three tasks. 1st Delete the record from the database 2nd Delete the […]

    The post Php Delete first appeared on Tecnología ESO en Ingles.

    ]]>

     

     

    Deleting a record in a Mysql database.

     

    The object we wished to sell has been sold and it’s time to delete the announcement so that people stop calling us. To do this we have to undertake three tasks.
    1st Delete the record from the database
    2nd Delete the big photo from the appropriate folder.
    3º Delete the small photo that was in the thumbs folder.
    To do this you have to use the appropriate php instructions, as always!
    Let’s start with

    How to delete a record in Mysql

    If there is an instruction in PHP for adding records (a collection of data) then there will also be instructions for making changes to and deleting a records. In this case we’re going to see how to delete a record and then how to make changes to one. To delete we use:
    The first line is the the entry line used so that a certain piece of code is executed and it tells us that if the variable erasead appears then it should execute what appears in the braces. this instruction is isset..
    In the form there is a button whose name receives the erasead value. In the form, there is a button called erasead. If it is pressed then a variable with the value $_POST[‘erasead’] appears. The first instruction simply verifies that this variable exists in the code (because it’s been created when we clicked on the button)

    if(isset($_POST[‘erasead’]) ){

    The first thing we have to do is delete the photo that has been saved in the appropriate folder. We can’t delete an announcement and leave the photo because we would fill up the server with obsolete photos. We have to delete them and it’s the first thing we should do.
    The function we must use is unlink (). This instruction deletes the file that appears in brackets. As the route where the photo is saved has been registered in one of the fields, the field _9, we haveto see what it’s been called. To do this we create the variable $foto like this.

    $foto = $row[‘field_9’];

    // se borra del la carpeta
    unlink ($foto);

    Now we can delete the record and to do this we have to do a mysql_query with the following information -> DELETE FROM board WHERE id=$id. This tells us to delete the record with the identifier id given by the variable $id from the board. This last variable $id is taken from a previous consultation that you can see below where we see the full code

    // ahora el registro
    $sql = “DELETE FROM board WHERE id=$id”;
    $result = mysql_query($sql);
    echo “Anuncio borrado”;

    We’ve now deleted the whole advert. But this always happens whenever we push the delete button. But what happens if we only want to change one value, for example, the price of the object?
    To make changes in the announcement we have to follow a similar procedure but, in this case, we have to show the full announcement on the page and write in the field we wish to change, in this case, the object’s price.
    When this page opens it shows all the ID fields corresponding to this entry. Then an UPDATE instruction will appear which is what is responsible for actualising all the fields with the information that we change in the form. This is what it looks like in a simplified form.

    $sqlUpdate = mysql_query(“UPDATE board SET field_1 = ‘$nombre’, field_2 = ‘$apellidos’, field_3 = ‘$email’,
    field_4 = ‘$password’, field_5 = ‘$telephone’, field_6 = ‘$object’,
    field_7 = ‘$message’, field_8 = ‘$title’, field_9 = ‘$photo’
    , field_10 = ‘$today’, field_11 = ‘$prices’

    WHERE field_3 = ‘$email'”, $link) ;

    This instruction causes us to look inside the table ‘board’ for a record where field three coincides with email (WHERE field_3 = ‘$email’ ) and once found field 1 is realised with the value $nombre and field 2 with the surname etc, etc.
    The complete code can be seen below

    <?php

    // conectamos a la base de datos
    include(“config.inc.php”);
    $link = mysql_connect($db_host,$db_user,$db_pass);
    if(!$link) {
    die(“Error al intentar conectar: “.mysql_error());
    }
    // seleccionamos la base de datos
    $db_link = mysql_select_db(“$db_name”, $link);
    if(!$db_link) {
    die(“Error al intentar seleccionar la base de datos”. mysql_error());
    }
    //  ********fin conexion ********
    $usuario = “email”;

    // hacemos una consulta  para mostrar los datos
    //$sql = mysql_query(“SELECT * FROM $db_table WHERE field_3 = ‘$usuario’, $db_link)or die(mysql_error());

    $queEmp = “SELECT * FROM $db_table WHERE field_3 = ‘$email’ ORDER BY id DESC LIMIT 10 “;
    $resEmp = mysql_query($queEmp, $link) or die(mysql_error());
    $row = mysql_fetch_array($resEmp);
    echo $row[‘field_4’];
    if ( $row[‘field_4’] == “$password”)
    {

    if(isset($_POST[‘actualizar’]) && $_POST[‘actualizar’] == ‘Update’){
    // comprobamos que no lleguen campos vacios
    if(!empty($_POST[‘nombre’]) && !empty($_POST[‘apellidos’]) && !empty($_POST[’email’])){
    // creamos las variables
    // que vamos a usar en la consulta UPDATE
    // y le asignamos sus valores
    //$usuario_ID = $_POST[‘usuario_ID’];

    $nombre = $_POST[‘nombre’];
    $apellidos = $_POST[‘apellidos’];
    $message = $_POST[‘message’];
    $password = $_POST[‘password’];
    $telephone = $_POST[‘telephone’];
    $object = $_POST[‘object’];
    $message = $_POST[‘message’];
    $title = $_POST[‘title’];
    $prices = $_POST[‘prices’];
    $image = $_POST[‘image’];
    $_FILES[‘image’][‘name’] = $image;

    echo “$image”;
    // EN ESTA PARTE ENTRAMOS LA IMAGEN
    if($_FILES[‘image’][‘name’]!=”)
    {
    $image_filename = “file_2_”.date(“sihdmY”).substr($_FILES[‘image’][‘name’],strlen($_FILES[‘image’][‘name’])-4);

    if(!move_uploaded_file($_FILES[‘image’][‘tmp_name’], “./files/”.$image_filename)){
    die(“File ” . $_FILES[‘image’][‘name’] . ” was not uploaded.”);
    }
    }
    echo “Esto debe aparecer -> $image_filename”;
    /*

    //File upload handling
    // lo dejo por ahora porque no me recarga la nueva foto
    if($_FILES[‘field_2’][‘name’]!=”){
    $field_2_filename = “file_2_”.date(“sihdmY”).substr($_FILES[‘field_2’][‘name’],strlen($_FILES[‘field_2’][‘name’])-4);
    if(!move_uploaded_file($_FILES[‘field_2’][‘tmp_name’], “./files/”.$field_2_filename)){
    die(“File ” . $_FILES[‘field_2’][‘name’] . ” was not uploaded.”);
    }
    }
    */
    $photo = $row[‘field_9’];

    $today = date(“F j, Y, g:i”);
    echo “$image_filename”;
    // la consulta UPDATE
    $sqlUpdate = mysql_query(“UPDATE board SET field_1 = ‘$nombre’, field_2 = ‘$apellidos’, field_3 = ‘$email’,
    field_4 = ‘$password’, field_5 = ‘$telephone’, field_6 = ‘$object’,
    field_7 = ‘$message’, field_8 = ‘$title’, field_9 = ‘$photo’
    , field_10 = ‘$today’, field_11 = ‘$prices’

    WHERE field_3 = ‘$email'”, $link) or die(mysql_error());

    echo “Registro actualizado correctamente”;
    echo “$image_filename”;
    }else{
    echo “debe llenar todos los campos”;
    }
    }else{
    // mostramos el mensaje
    echo “<p>”.$mensaje.”</p>”;
    ?>
    <!–
    el formulario.
    los values de los campos
    son los valores que optenemos
    de la consulta SELECT
    –>
    <form name=”actualizar-registro” method=”post” action=”<?php $_SERVER[‘PHP_SELF’]; ?>”>
    Anuncio numero: <?php echo $row[‘id’];
    $id = $row[‘id’];
    // vamos a borrar el anuncio

    if(isset($_POST[‘erasead’]) ){
    // parte donde se borra la foto
    //primero borramos la foto de la carpeta
    // ya que la informacion de su nombre esta en la base mysql

    $foto = $row[‘field_9’];

    // se borra del la carpeta
    unlink ($foto);

    // ahora el registro
    $sql = “DELETE FROM board WHERE id=$id”;

    $result = mysql_query($sql);

    echo “Anuncio borrado”;
    }else{
    echo “Debe especificar un ‘id’.\n”;
    }
    // fin de borrado
    ?>

    <input type=”submit” value=”Erase” name=”erasead”><p>Nombre: <input type=”text” name=”nombre” value=”<?php echo $row[‘field_1’]; ?>” />
    Apellidos: <input type=”text” name=”apellidos” value=”<?php echo $row[‘field_2’]; ?>” />
    e-mail: <input type=”text” name=”email” value=”<?php echo $row[‘field_3’]; ?>” />
    password: <input type=”text” name=”password” value=”<?php echo $row[‘field_4’]; ?>” /></p>
    <p><br />
    telephone: <input type=”text” name=”telephone” value=”<?php echo $row[‘field_5’]; ?>” />
    object: <input type=”text” name=”object” value=”<?php echo $row[‘field_6’]; ?>” />&nbsp;&nbsp; Prices:
    <input type=”text” name=”prices” value=”<?php echo $row[‘field_11’]; ?>” size=”6″ />
    €</p>
    <p>title:
    <input type=”text” name=”title” value=”<?php echo $row[‘field_8’]; ?>” size=”107″ /> </p>
    <p>Message<textarea rows=”8″ name=”message” cols=”56″><?php echo $row[‘field_7’]; ?></textarea></p>
    <p>image:
    <input type=”text” name=”image” value=”<?php echo $row[‘field_9’]; ?>” size=”26″ />&nbsp;
    <?
    /*
    if(isset($_POST[‘erase’]) ){
    // parte donde se borra la foto
    $foto = $row[‘field_9’];
    $consulta = “DELETE FROM board WHERE field_6=’$foto'”;
    $query = mysql_query($consulta) or die (mysql_error());

    // se borra del la carpeta
    unlink ($foto);

    echo “Borrado”; }
    else{}
    */
    ?>
    e” name=”erase”> </p>
    <font face=”Verdana”>&nbsp;New image <input type=”file” name=”image” value=”<?php echo $row[‘field_9’]; ?>” size=”57″></font><p><br />

    <input type=”hidden” name=”usuario_ID” value=”<?php echo $row[‘usuario_ID’]; ?>” />
    <input type=”submit” name=”actualizar” value=”Update” />
    </p>
    <p>&nbsp;</p>
    </form>
    <?php } }
    else
    { echo “Anuncio y usuario dado de baja “;}
    ?>

    The post Php Delete first appeared on Tecnología ESO en Ingles.

    ]]>
    php Modify https://www.petervaldivia.com/modify/ Sun, 25 Jan 2015 10:30:50 +0000 http://www.petervaldivia.com/?p=332 Php Listing Modify Delete     Making changes to data in Mysql. Posted on June  14th, 2009 by Technology Department  We’ve already put out mobile phone number in the announcement but we haven’t heard anything. None has rung and none has sent an email. Perhaps it’s too expensive? I have to lower the price. We’ll […]

    The post php Modify first appeared on Tecnología ESO en Ingles.

    ]]>

     

     

    Making changes to data in Mysql.

    Posted on June  14th, 2009 by Technology Department 

    We’ve already put out mobile phone number in the announcement but we haven’t heard anything. None has rung and none has sent an email. Perhaps it’s too expensive? I have to lower the price. We’ll see how to make changes to one of the fields of an announcement in this page.
    To do this we will have enter some keys, in the case of this programme, my email address and the password that we introduced when we registered the announcement. 

     Mysql Code

     

    <?php

    $code = “computer”;

    include(“config.inc.php”);
    $conexion = mysql_connect($db_host,$db_user,$db_pass);
    mysql_select_db(“$db_name”, $conexion);

    $queEmp = “SELECT * FROM $db_table WHERE field_6 = ‘$code’ ORDER BY id DESC LIMIT 10 “;
    $resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
    $totEmp = mysql_num_rows($resEmp);

     

     

    while ($rowEmp = mysql_fetch_assoc($resEmp)) {?>

    <table border=”1″ width=”92%” bordercolor=”#333399″ style=”border-collapse: collapse”>
    <tr>
    <td width=”165″ bgcolor=”#E6E0C0″ bordercolorlight=”#FF9933″ bordercolordark=”#FF6600″ bordercolor=”#FF6600″ rowspan=”2″>
    <font size=”1″>

    <img border=”0″ src=”images/schedule.png” width=”27″ height=”26″ align=”left” hspace=”1″></font><p>
    <font size=”1″>

     

    <? echo $rowEmp[‘field_10’];?>

    </font></p>
    <p>
    <font size=”1″>
    <?
    $base = “https://www.petervaldivia.com/technology/php/board/”;

    $image1 = $rowEmp[‘field_9’];

    $image2 = substr ($image1, 7);
    $image3 = “thumbs/”.$image2;

    echo “<a href=# onclick= abrirpopup(‘$image1′,500,500)> <img src=’$image3′ border=’1′ class= borde></a>”;
    border=’1’ class= borde></a>”;

    ?></font></p>
    <td bgcolor=”#B6E5FF”>
    <p style=”margin-top: 0; margin-bottom: 0″><font size=”2″>

    </span> </font><b>
    <font size=”2″>
    <img border=”0″ src=”images/money-bag.png” width=”32″ height=”32″ align=”left”> <? echo $rowEmp[‘field_11’];?> €</font></b><font size=”2″><b><span lang=”es”>
    </span></b> </font> </p>
    <p style=”margin-top: 0; margin-bottom: 0″><font size=”2″><b>
    <font color=”#FF3300″>Title</font></b><font color=”#FF3300″></b></font>:<b><font color=”#333399″> <? echo $rowEmp[‘field_8’];?>
    </font></b> </font> </p></td>
    </tr>
    <tr>

    <td bgcolor=”#B6E5FF”>
    <p style=”margin-top: 0; margin-bottom: 0″><b>
    <font size=”2″ color=”#FF3300″>Description</font></b><font size=”2″>: <?

    $string1 = $rowEmp[‘field_7’];

    $description = substr($string1,0,400);

    echo $description;?>
    </font><b>
    <font size=”2″>&nbsp;<font color=”#FF3300″>Owner</font>:<? echo $rowEmp[‘field_1’];?> </font>
    </b>

    <img border=”0″ src=”images/HP-Mobile-2.png” width=”32″ height=”32″ > <? echo $rowEmp[‘field_5’];?>
    <img border=”0″ src=”images/address-book-2.png” width=”32″ height=”32″> <? echo $rowEmp[‘field_3’];?>
    <b>
    <span lang=”es”>
    <font size=”2″>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    </font>
    </p></td>
    </tr>
    </table>
    <?
    }
    }
    ?>

    The post php Modify first appeared on Tecnología ESO en Ingles.

    ]]>
    php Listing https://www.petervaldivia.com/listing/ Sun, 25 Jan 2015 10:30:19 +0000 http://www.petervaldivia.com/?p=330 Php Listing Modify Delete     The presentation of lists with the results of the adverts. Posted on June  14th, 2009 by Technology Department  It’s now time to show the results of the announcement placed by our students and by users in general. Let’s suppose that we want to show a list of all the […]

    The post php Listing first appeared on Tecnología ESO en Ingles.

    ]]>

     

     

    The presentation of lists with the results of the adverts.

    Posted on June  14th, 2009 by Technology Department 

    It’s now time to show the results of the announcement placed by our students and by users in general. Let’s suppose that we want to show a list of all the adverts that are classified as computer adverts, for this we need to consult Mysql again to call up all the records (identifiers id) whose ‘type of object’ field is computer.

     

    Simplified code to show results Mysql

    In the first part of the code we must simply repeat what we did before, that is, we have to open the php, assign a variable $code el valor computer and incluide the file with the data from the database.

    <?php

    $code = “computer”;

    include(“config.inc.php”);
    $conexion = mysql_connect($db_host,$db_user,$db_pass);
    mysql_select_db(“$db_name”, $conexion);

    Next, we’ll take the table and select the last 10 records. The way of saying this is by using the annotation ORDER BY id DESC LIMIT 10. If we want 20 records on the paeg we just have to change it to DESC LIMIT 20.
    Remember that we name the variables $queEmp o $resEmp whatever we want. You could call then $cadena1 o $busca-datos, etc. if you liked

    $queEmp = “SELECT * FROM $db_table WHERE field_6 = ‘$code’ ORDER BY id DESC LIMIT 10 “;
    $resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
    $totEmp = mysql_num_rows($resEmp);

    A ‘While’ appears in the next line,this is while what is in brackets is done. This function recuperates a row as an associative matrix. Imagine that, while you were looking in the database, the first indentifier fulfills the condition that field 6 must contain the word computer. This instruction colelcts all the data that there is in this row, from the first field to the last, and presents it in an array of data. Now we have an array with all this identifier’s (id) information ready to be shown on screen. Firstly, we generate a table in html and to do this we close php and add the required html code in accordance with what the student wants. This table can contain however many fields, rows and columns as you like and you can colour the cells, add borders to the table etc, etc. This is a html thing and can be done using a html editor like nvu. As it is not the topic of this chapter, we’re going to move back to the what is essential to the topic.

    while ($rowEmp = mysql_fetch_assoc($resEmp)) {?>

    <table border=”1″ width=”92%” bordercolor=”#333399″ style=”border-collapse: collapse”>
    <tr>
    <td width=”165″ bgcolor=”#E6E0C0″ bordercolorlight=”#FF9933″ bordercolordark=”#FF6600″ bordercolor=”#FF6600″ rowspan=”2″>
    <font size=”1″>

    <img border=”0″ src=”images/schedule.png” width=”27″ height=”26″ align=”left” hspace=”1″></font><p>
    <font size=”1″>

    The first line that we see where the first datum of the database is generated is the following

    <? echo $rowEmp[‘field_10’];?>

    It’s very simple. The first thing to do is open php, then we tell it to show the value of the variable $rowEMP, which has been taken from the database, on the screen. But, because this variable is an array varaible (it has many values according to position or value) we select the field_10 that corresponds to the date we have stored.
    In this way we can access all the data, like the price, description etc.
    I want to make it clear that this array variable has no value like como $dato1 = “344”;but it can contain many values and it is because of this that these variables are called multidimensionals.
    The rest of the code is easy to understand because we just have to apply our former criteria.

    </font></p>
    <p>
    <font size=”1″>
    <?
    $base = “https://www.petervaldivia.com/technology/php/board/”;
    //Vamos a quitar el enlace desde donde esta la foto y tomar la foto pequeña
    // para ello le quitamos el directorio y le ponemos el nuevo directorio con la foto pequeña
    // la imagen 1 dara la ruta de la foto grande
    $image1 = $rowEmp[‘field_9’];

    $image2 = substr ($image1, 7);
    $image3 = “thumbs/”.$image2;

    echo “<a href=# onclick= abrirpopup(‘$image1′,500,500)> <img src=’$image3′ border=’1′ class= borde></a>”;
    //echo “<a target= _blank href=’$image1′> <img src=’$image3′ border=’1’ class= borde></a>”;

    ?></font></p>
    <td bgcolor=”#B6E5FF”>
    <p style=”margin-top: 0; margin-bottom: 0″><font size=”2″>

    </span> </font><b>
    <font size=”2″>
    <img border=”0″ src=”images/money-bag.png” width=”32″ height=”32″ align=”left”> <? echo $rowEmp[‘field_11’];?> €</font></b><font size=”2″><b><span lang=”es”>
    </span></b> </font> </p>
    <p style=”margin-top: 0; margin-bottom: 0″><font size=”2″><b>
    <font color=”#FF3300″>Title</font></b><font color=”#FF3300″></b></font>:<b><font color=”#333399″> <? echo $rowEmp[‘field_8’];?>
    </font></b> </font> </p></td>
    </tr>
    <tr>

    <td bgcolor=”#B6E5FF”>
    <p style=”margin-top: 0; margin-bottom: 0″><b>
    <font size=”2″ color=”#FF3300″>Description</font></b><font size=”2″>: <?
    // vamos a reducir el texto a poner a 400 caracteres
    $string1 = $rowEmp[‘field_7’];

    $description = substr($string1,0,400);

    echo $description;?>
    </font><b>
    <font size=”2″>&nbsp;<font color=”#FF3300″>Owner</font>:<? echo $rowEmp[‘field_1’];?> </font>
    </b>

    <img border=”0″ src=”images/HP-Mobile-2.png” width=”32″ height=”32″ > <? echo $rowEmp[‘field_5’];?>
    <img border=”0″ src=”images/address-book-2.png” width=”32″ height=”32″> <? echo $rowEmp[‘field_3’];?>
    <b>
    <span lang=”es”>
    <font size=”2″>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    </font>
    </p></td>
    </tr>
    </table>
    <?

    }
    }
    ?>

    In the former code substr($string1,0,400);-> takes the first 400 values, counting from the value 0, from the variable ( $string1 ). It does this to limit the number of words that can be shown.

    The post php Listing first appeared on Tecnología ESO en Ingles.

    ]]>