Zootalaws

Forum Replies Created

Viewing 6 posts - 121 through 126 (of 126 total)
  • Author
    Posts
  • in reply to: Bluetooth Serial Dongle? #7041
    Zootalaws
    Member

    Even further…

    After experimenting with reliability, distance, etc. I thought I would ramp up the speed. As BT can comfortably handle 3M/s, I thought I would turn the wick up to 230400: AT+UART=230400,0,0

    Worked a treat.

    Responses to commands are snappy.

    in reply to: Bluetooth Serial Dongle? #7039
    Zootalaws
    Member

    Further to this:

    For those that want to implement a Bluetooth connection to their TinyG, here’s a primer:

    For a Bluetooth module, I recommend the HC-05 – on a sled, like the JY-MCU or (my favourite) the CZ-HC-05. You can use a HC-10, but don’t try the HC-06, you won’t have much fun with it. The HC-05 is, in my opinion, the most versatile of the Bluetooth SPPs. I usually have about 50 of varying different types around the place – HC05, 06, 10, 11 – but keep coming back to the HC-05 and in particular, the GOMCU CZ-HC-05 module, which is just better. We use them for programming remote-controlled fishing boats, for controlling bubble walls, LED installations, 3D printers, and all manner of arduino devices that do all sorts of weird and wonderful things. I have tried a number of different brands, including the eye-wateringly expensive units from RedBear, and the $24-$35 units from Adafruit and Sparkfun and keep end up using the $4 units from GOMCU. They have proved remarkably resilient and reliable.

    CZ-HC-05

    I prefer the CZ over the JY for a few reasons – it’s really small, it’s really well made, it has the KEY (P34, state pin) already broken out.

    Tools:
    4 pin female header, soldering iron and solder.
    HC-05 of some sort, on a sled.
    Arduino of some description.
    A breadboard and jumper wires helps.
    This sketch: to program the HC-05

    /*
    AT+ORGL (Restore the factory default state)
    AT+UART=115200,0,0 (Set baud rate to 115200, one stop bit and no parity bit)
    AT+NAME=TinyG
    */
    #include <SoftwareSerial.h>
    #define rxPin 10
    #define txPin 11
    SoftwareSerial mySerial(rxPin, txPin); // RX, TX
    char myChar ;
    void setup() {
      Serial.begin(9600);   
      Serial.println("AT");
      mySerial.begin(38400);
      mySerial.println("AT");
    }
    void loop() {
      while (mySerial.available()) {
        myChar = mySerial.read();
        Serial.print(myChar);
      }
     while (Serial.available()) {
        myChar = Serial.read();
        Serial.print(myChar); //echo
        mySerial.print(myChar);
      }
    }

    Solder the 4-pin female header to the appropriate 4 pins on the V8 TinyG.

    Connect the BT module to the Arduino as follows:

    Arduino pins:
    10 to HC05 TX // RX on Arduino
    11 to HC05 RX // TX on Arduino
    GND to HC05 GND // Common
    5V to HC05 VCC // 5V
    5v to HC05 KEY // 5V : setting this to 5V on the CZ when you power it on puts the HC-05 in command mode, where you can program the features. If you use the JY, you need to be aware of how the implementor has wired it and which pins he has available. Some wire P34 on the sled but leave the pin un-soldered, some wire it all up just like the CZ, some wire other pins… if they haven’t wired it, you will need to hold a signal high to P34 while you power cycle the HC-05 to get it into command mode. Once you have it in CM, you can remove the signal – it will stay in command mode until reset or power-cycled.

    Connect/power on the arduino and load the sketch above.

    Recycle the arduino and the HC05 should initialise and slowly flash its LED – this indicates it is in Command Mode.

    Bring up the Arduino IDE serial monitor and set to 9600+CR+LF
    Enter AT and you should get ‘OK’ back.

    By default, the HC-05 should be set to:

    Slave Mode
    Connection mode: Connect to the Bluetooth device specified
    Baud rate: 38400 bits/s; Stop bit: 1 bit; Parity bit: None.
    Passkey: “1234”
    Device name: “H-C-2010-06-01”

    At this stage I would set to factory defaults, using the AT+ORGL command.

    Then, to set up for the TinyG

    Set the baud rate to 115,200kb: AT+UART=115200,0,0
    Change the device name: AT+NAME=TinyG
    You can also change the pairing key – my Macbook defaults to 0000, but the HC-05 defaults to 1234: AT+PSWD=0000

    There are other parameters in the AT command set, but none of them are relevant to getting the HC-05 working on the TinyG.

    Any questions, just post them here.

    in reply to: A little confused and annoyed… #6998
    Zootalaws
    Member

    Without them having the same belts, steppers, z-screw, etc., it would be a bit pointless, wouldn’t it?

    The Ox is a very flexible build… it’s not a kit.

    in reply to: Bluetooth Serial Dongle? #6983
    Zootalaws
    Member

    Yes and Yes.

    Buy an HC-05 on a JCY ‘sled’ for ease of use (can accept 3.3 – 6V) also buy some female headers to solder to the TinyG. I didn’t and it was a total PITA.

    in reply to: A little confused and annoyed… #6982
    Zootalaws
    Member

    As another Ox/TinyG user, I had similarly strange things happen the first time I tried to do anything with ‘stock’ settings.

    I learned, very quickly, that with something like a CNC machine, there is no ‘stock’ setting and that you need to go through the parameters and set them to your machine.

    Darned n00bs!

    Now, it is smooth and everything works great.

    Rhino, definitely recommend double-belting your X*Y axes… for the additional cost of a bit of GT3, it is very much worth it.

    in reply to: TinyG + Raspberry Pi #6708
    Zootalaws
    Member

    So… it’s been a year. How did this project end up?

    I am just in the throes of building an OpenBuilds Ox and already have a couple of Pi’s around for Octoprinting my 3D printer, so am interested in the results.

    Running tgFX for Tiny control would be the aim, connected over ethernet.

Viewing 6 posts - 121 through 126 (of 126 total)