Saturday, 27 February 2016

Dagu Mini driver with bluetooth

I bought a Dagu mini driver with bluetooth  . I wanted to set up a easy  remote control robot using any android phone. This arduino based driver fit what I wanted . I had 2 motor driver, 8 digital ports and 6 analog ports. And also 1 port ( of 4 pins ) for bluetooth module. This module is very useful for my purpose. 2 ports for motor, 8 ports which can be used for servo. 6 ports for any analog sensor.
There is also a switch on it. Built in diode to prevent plunging power supply in the wrong way.
Perfect !!!
I got into some problem initially . Arduino error  :

avrdude: stk500_getsync(): not in sync: resp=0x0

I tried many ways to solve it, search through the web and discover nothing (to my surprise ).  
So in the end I solved it by flashing the boot loader . How to flash the boot loader ? I shall do it another day. 
First, for all Arduino, Bluetooth module must be remove before uploading.If in the event that you had damaged the bootloader, you can flash it. Remember take out the bluetooth first. 

Next configure the bluetooth.  Go to Play Store to find the app name Bluetooth Serial Controller .
Install it . Run it . Activate the Connect tab, and it shows you Bluetooth device that you can connect.
Choose HC-06 to connect. If this is the first time you connect, the password is 1234.
When it is connected the Bluetooth light will not flash anymore. Then , it is connected. Next configure your buttons. I has configure it to all these. You can hide, change functions, change text etc.I am preparing for a soccer playing Bluetooth remote control robot. So I have forward and reverse. left and right. Strike, defend and block. let us see how we do it.
At the PREFERENCE tab, once you click it, you can see
 options like Name, command visibility etc
Name , as it implies will show the name . Click on it, change the name of the buttons to what you want. You can see that I changed the buttons name for buttons 2,5,6,7,10, 4,8,12.
 
Next change the command for the buttons.  
"0"  = forward
"1" = backwards
"2 " = left
"3" = right.
"4" =stop.
You can add some more commands to buttons but you have to change the Arduino programs.
 

 
Next we change the visibility to invisible. We are only interested in  some layout and we want to hide some buttons. Or else we will mispress the buttons. The options is a tick box.
 

 Next  the arduino program that I used

 
// Modified by jack on Jan 2015
// Program for dagu mini controller.
//Standard PWM DC control
int M2 = 7;    //ML Direction Control
int M1 = 8;    //MR Direction Control
int E2 = 9;     //ML Speed Control
int E1 = 10;     //MR Speed Control
 
 
void stop(void)                    //Stop
{
  digitalWrite(E1,LOW);   
  digitalWrite(E2,LOW);      
}   
void advance(char a,char b)          //Move forward
{
  analogWrite (E1,a);      //PWM Speed Control
  digitalWrite(M1,HIGH);    
  analogWrite (E2,b);    
  digitalWrite(M2,HIGH);
}  
void back_off (char a,char b)          //Move backward
{
  analogWrite (E1,a);
  digitalWrite(M1,LOW);   
  analogWrite (E2,b);    
  digitalWrite(M2,LOW);
}
void turn_L (char a,char b)             //Turn Left
{
  analogWrite (E1,a);
  digitalWrite(M1,LOW);    
  analogWrite (E2,b);    
  digitalWrite(M2,HIGH);
}
void turn_R (char a,char b)             //Turn Right
{
  analogWrite (E1,a);
  digitalWrite(M1,HIGH);    
  analogWrite (E2,b);    
  digitalWrite(M2,LOW);
}
void setup(void) 
{ 
  int i;
  for(i=7;i<=10;i++)
    pinMode(i, OUTPUT);  
 Serial.begin(9600);
Serial.println("-----LED Bluetooth Control-----");
Serial.println("++++++++++ Commands +++++++++++");
Serial.println("Press 0 to move forward.");
Serial.println("Press 1 to move backward.");
Serial.println("Press 2 to move left.");
Serial.println("Press 3 to move right.");
Serial.println("Press 4 to stop.");
Serial.println("nEnter Command: "); 
} 
void loop(void) 
{
  if(Serial.available()){
    char val = Serial.read();
    if(val != -1)
    {
      switch(val)
      {
      case '0'://Move Forward
        advance (100,100);   //move forward in max speed
        break;
      case '1'://Move Backward
        back_off (100,100);   //move back in max speed
        break;
      case '2'://Turn Left
        turn_L (50,50);
        break;       
      case '3'://Turn Right
        turn_R (50,50);
        break;
      case 'z':
        Serial.println(" Error ");
        break;
      case '4':
        stop();
        break;
      }
    }
    else stop();  
  }
  
}



 

Sunday, 15 November 2015

Extruder - Greg Wade Geared extruder with J-head Hotend 0.35mm

From the Prusa I3 orginal documentation, I downloaded the STL file and assembled the extruder. Assembled as they taught and mounted it on. The only problem is I used J head. I was not sure whether J head can be mounted onto it.
Let's talk about  the gear head. It works well. For so long, the gear did not fail at all. still hard and steady. And I use PLA to print it.

To confess, the PLA printout from Cube 3D sucks. I am not sure how long it will last. but I know, as long as I get it to work, I will duplicate all the printed parts again....
THIS IS AWEFUL

YUCKS.....



But In the end, I managed to get it working ..... 





First Few Prints....

After completed building it, it is time for my first few prints....
There are afew basic print to determine whether your printer is doing a fine job. A hollow box like this....This shows that the printer did follow the path, but the hot end did not do a good job.....

After that I tried to print a solid box 20mm X 20mm. It look like a sponge. This shows that I did not calibrate properly. A better one look like this,.... 

You can see the cross line being clearly laid out.....The print was much better...

You can see that the line are pretty much aligned... also... that is good. But not the end.

Saturday, 14 November 2015

My thought on Prusa i3 (3) : Building the XYZ structure ......

Building that was easy.... Simply cut the M10 threaded rod , re-thread the rod ends. Bolt and nut it.
Had alot of cable tie on hand. It is needed to tie many things...
 That is all. But I found a problem. I do not know what size( height of the NEMA 17) the motor used in the drawing given, so after I built it , the Nema 17 DID NOT TOUCH THE FLOOR......



So I added a piece of supported printed from the 3D printer , after I fully make it work... but the print was bad... You can see the wave print . But not bad consider that I had not fully optimize it....



My thoughts on Prusa I3 (2) : Machining the Vertical Plate and the heated bed support.

The Heated Bed support and the vertical plate is machined from 1 piece of 8mm acrylic that I salvage from somewhere. So it is considered free . If you do not have a milling machine, you can consider buying it. For your info, you need not machine it until like this. I simply had a rectangular plate. It is not that heavy. I was lazy and the milling machine was not that good, So I did not reduce the size too much... But I managed to cut some slots for the linear bearings...


For Heated Bed I used Mk2. Now Mk3 is produced. It will be good as you can possibly lift the bed rather than lowering the extruder. MK2 must be mounted with a flat surface glass. I salvaged a a scanner glass and cut to size...

 Mk 2B.

The New Mk3 is availlable and it has a aluminium layer on it. So not more glass panel. This is good. I will use Mk3 when I have a chance.  But becareful when you buy MK3, Make sure it is MK3. Some supplier make MK2a/2b BLACK.......

My thought on Prusa i3 (1) ....Structure stability.

Easy to built ... It is a big yes  !
Robust  .............No, can do better,

Let me talk about the MECHANICAL BUILT !!!?
If you look at the side view of the printer, you will know it is not stable. The vertical plate is only locked with M10 nut. It will FLEX .... The Extruder is providing a big moment on the structure, so it will have a clock wise moment . If your structure is not stable, the print out will be messy.

So some people added more structure to stablelize it. Like this.
Additional Rib to stablize the structure during printing.  In my case, I added  2 plates which I salvaged from somewhere to stabilize it.  Its free... 

Stability is very important . If you want better stability. Like this ... You can consider using Aluminium Profile 20X20mm Or 30X30mm. I seen Felix 3D printer used 40X40 mm profile. Like the Reprap wilson , 3Drag or even Felix .

Why is Prusa with Acrylic body or Aluminium plate not an ideal structure ?
What is a good structure for 3D printer ?
First, the body should not flex in any condition. Prusa Flex.... Mendel could be a better choice.
 
Second, the extruder exert a force and moment on the body. If it causes flexing it is not good.
Prusa has 2 supporting shaft vertically inline. It is not as good as Mendel where 2 shaft are horizontal. Of course it is easy to solve by making sure that you have additional support at the center of gravity.   
 

My Prusa I3 .............

I built a prusa I3 some 1 years ( or 2 years ago)....     And till now it work better than I had expected.  But of course, I improved it through out these many months,

My Prusa I3 
My built Plan was from http://reprap.org/wiki/RepRap_Options  here.  There are many plans here but do bear in mind, not all work well. 

My reason for choosing Prusa I3. 
I find that Prusa I3 is probably the most easy to built 3D printer that I can find and it is very well documeted . I had a 8 mm acrylic  which I salvage somewhere. I reused it , mill into 2 parts. 1 for the heated bed and the other for the vertical stand,  I used milling machine to cut a center hole. This center square hole become my base for the headed bed., The vertical  stand 

It is very well documented here. http://reprap.org/wiki/Prusa_i3. But beware, it may not be the best....
Thinking back, if you want to built one , but might want to consider other models like Wilson etc. I will blog the reasons why Prusa i3 may not be a good model to follow. 

Where do I get/buy the components from ?


I bought the threaded rod, screws  from local hardware shop. I bought the other components like RAMPS 1.4, Heated bed, linear bearing, 5 Nema 17 Stepper motors , J-head extruder from a shop call  RobotDigg. http://www.robotdigg.com/ .  I paid about USD 230 including DHL. 
The quality is GOOD, compare to other parts that I bought later at ebay, especially the linear bearing.
 The motor was good, the hotend was good.  I receive the items few days later. Really fast...  Well packed....

The green PLA 3 d printed parts are printed from Cube 3d. I am sure it is the worst 3D printer I had used. Expensive and poor results.  The STL file can be found in the wiki page that I referred to above. But since this is the only 3D printer I can access to, I used it to printer out all the parts that I need. Hopefully it will work till I can reproduce another set. I let you see what happen to cubify 3D printout . 

Ok ....Soon I will upgrade this set to a Aluminium profile structure with Mk3 heat bed. Also I am building my first CNC machine . I had some ball screw rods and I managed to test the arduino CNC V3 and IT WORKS...