Projects Archive

The Huxley is here

Finally I have a working 3D printer.  It has taken a while and I’ve had a few problems along the way but I am now printing in 3D.

After a lot of time spent finding the parts and building a Reprap Prusa 3d Printer , I have failed to get it to print reliably.  After giving up in disgust at my inability to make it work I finally folded and brought a Raprap Huxley kit from Reprap Pro.

I have had some previous experience with the Prusa build and sailed though the construction.  It was also very easy to commission.  They have done a great job there of getting the kit together and getting the software set up for the printer.

Reprap Huxley

RoboBerry

I have started hacking at a robot controlled via a Raspberry Pi and an Arduino. I have a basic bot prototype working.

It consists of :-

  • Raspberry Pi running Raspbain Wheezy.
  • An Ardino Uno connected to the Pi via usb.
  • A motor driver shield for the Arduino.
  • A small robot base. This is an old Cybot base with 2 motors and a caster. This is all I am currently using from this robot.
  • A web cam.
  • A usb wifi adaptor.

Currently I have a small server app running on the pi that takes images from the web cam and this is streamed via http.

I have another small server written in python that displays a form with the image from the previous server plus some basic controls for the robot.

By clicking the buttons on the form I can control the motors on the robot base. I can see what the robot is seeing via the web can.

By forwarding the correct port on my router I am able to access this from anywhere via the web.

By using free dns service I am able to give my page a domain name and view the web page.

 

Useless Machine……part three

< Useless Machine Part two

Code for the useless machine:  download source file

You can download the file above or you can copy and paste from the file below. (more…)

Useless Machine……part two

< Useless Machine Part one
Useless Machine Part three >

As it stands this is a very simple circuit with very simple code.

Useless Machine Schematic

Useless Machine Schematic

Click for a larger image

The complete circuit fits on a piece of strip board 10 strips X 14 holes.

Strip board circuit for useless machine

Strip board circuit

Most of the parts came from Rapid Electronics. They are local to me which is very handy.

I picked up a bunch of cheap servos on ebay with no connectors. Resistors etc came from my parts bin. I used a much larger voltage regulator than was needed as I had it on hand. I have substituted a better spec’ed part in the parts list. I also used a battery holder with a battery clip and fly lead with clip. I have spec’ed a simple battery holder with fly leads in the parts list.

Parts List
Description Order code Cost
ATtiny85 73-5122 £3.38
Relay 5v spdt 60-0787 £1.14
Da78l05 V Reg +5v 100ma To-92 47-3612 £0.26
Toggle Switch 75-0082 £0.655
Battery Holder 4xAA 18-3695 £1.21
2N22222 npn transistor 81-0256 £0.24
Capacitor 47 uf Elec 11-0815 £0.09
Capacitor 47nf Ceramic 08-1030 £0.136
IC socket 8 pin (tube of 60) 22-0107 £1.63
3 Pin Header 22-0500 £0.037
Resistor 2k2 Parts bin Pennies
Resistor 1K Parts bin Pennies
Hobby Servo Ebay Cheap

All the build details and picture to come in the next posts………

On to post 3. The source code……..

 

Useless machine

 Useless Machine Part two >

A simple toy using an attiny85, a servo and a toggle switch.

The idea is simple. A toggle switch is mounted on the top of a box. When turned on, a ‘finger’ pops out of the box, turns the switch off then returns to the box leaving the machine in a powered off state.

The finger will be attached to a servo horn.  When the switch is turned on, the micro will fire up, turn on a relay that by-passes the switch. It will then rotate the servo to move the finger to operate the toggle switch. The micro will then retract the finger and turn off the relay removing power to the circuit.

The micro I intend to use is the attiny85. Why ? Cause I had a couple to play with.

Why ? cause I had just go hold of the USBtinyISP byLadyAda from .:oomlout:. and…. err…

OK, So I have a new toy and wanted a simple project to use it for. This seems pretty simple.  Two outputs, the servo and the relay. No inputs. 5 Volt regulator and a power switch.

I grabbed an attiny85 and my trusty UsbTinyIsp programmer. Bread board awaiting, I add an led, power through a switch to the rails (5 volt regulated from the Bench psu).

Connect up a servo to one of the pwm pins (PB0 or PB1) and away we go…….

Ah.

My first problem is the code.

I can’t get a pwm generation going……..

Out with the scope.

Play with the code…

Recompile…

Reprogram chip…

Rerun program…

….and loop

After many iterations I get a working waveform.

Hook up the servo.

Trim the top and bottom values.

Wohooooo

Working servo control.

After getting the servo to move I had to trim the output.  The attiny can drive a servo beyond its home and full rotation positions.  To get the most out of the servo the code needs to be adjusted so it gets close to full rotation with out hitting the end stops.  This stops the motors and gearboxes in the servo being damaged.

To trim the servo you could use a variable resistor connected to an analogue input. Read this and adjust the servo until correct then output the value some where.  Instead of this I just tried a few values, entering each one in the code and recompiling. Start with a value below the max and approach it bit by bit. When the servo does not move any further for and increase in value, back the value off by one and use that.

I may add a trim feature to the circuit and software.  If this sounds useful, let me know.

On to part 2. The hardware.