แสดงบทความที่มีป้ายกำกับ techno แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ techno แสดงบทความทั้งหมด

วันพฤหัสบดีที่ 9 กุมภาพันธ์ พ.ศ. 2560

Arduino AvoidanceBot




Project description :
        Transforming cheap rc toy to be AvoidanceBOT Arduino control.
Materials and Tools
Materials
1. Arduino controller - Pro Mini 3.3V/5V
 

2. 2-LEDs (Different color)
3. 2-Resistor 1 kOhm. 1/4 watt.
4. Ultrasonic Distance Sensor Module (HC-SR04)


5. L298N dual motor drive module


6. Dupont wires.













7. PCB - DIY circuit board or prototype bread board.













8. Motor size 120













9. Motor size 180









10. Battery 5-9 V.
Tools
1. Soldering gun.
2. Soldering wire.
3. Soldering paste.
4. Screw driver.
5. Plier.
6. Hot glue gun.
7. Screw,Bolt & Nut.

Electronic devices installation & Wiring

Arduino Pro Mini pins to 
2 : Green LED
Arduino Pro Mini pins to Ultrasonic Distance Sensor Module
3 : Trigger pin
4 : Echo pin
Arduino Pro Mini pins to L298N module
5 : ENA
6 : IN1
7 : IN2
8 : ENB
9 : IN3
10 : IN4
L298N module to :
OutputA : Steering motor
OutputB : Driving motor
+12V : Battery positive pole
GND : Connect Battery negative pole and Mini controller GND pin together.
+5V : Mini controller Vcc pin
* Don't use too small wire gauge,nevertheless controller pin will always HIGH status.
* Soldering need skill and extra cleanliness to prevent small electrical touching points.
Code sketch installation 
Arduino sketch and Library :
1.Down load sketch file .ino and library zip file S05RF from Github.(This library file use with new ultrasonic sensor module HY-SRF05 but it can be applied to old model HC-SR04,they said it shall eliminate 0 noisy signal and better than older library(NewPing_v1.7).Add the library to your Arduino IDE.
2.Comply and upload .ino sketch to Arduino mini controller.(This sketch valid for Arduino UNO/Nano/Pro Mini 5V / 3.3V)
3.Open Arduino serial monitor to see output.
Observe ultrasonic sensor read distance value by varying different distance to detect.(This attached sketch read in centimeter unit.) If there are some 0 distance,it's normal.But If there are many continuous 0 distance,perhaps the ultrasonic sensor is defective.
4.Let's the robot test run by laying obstructive object around.Collect every problems for editing the sketch.
5.The speed of two motor can be adjusted to match the robot size,weight and battery power that you assembled by changing PWM value in command analogWrite(enableA, PWM) and analogWrite(enableB, PWM ); from 0 to 255.(in attached sketch is 150 for steering motor and 100 for driving motor)
To calibrate the robot speed,timing,appropriate distance zone and driving power is very difficult step.It needs time and experience to run the robot properly.
* Checking short circuit before connect power supply battery is necessary.





วันอังคารที่ 7 กุมภาพันธ์ พ.ศ. 2560

How to flash Turnigy/FlySky TH9X with er9x firmware

How to flash Turnigy/FlySky TH9X with er9x firmware




           Cheap Chinese RC transmitter Turnigy/FlySky TH9X is a favorite RC hobbyist's transmitter,easy to use,simple firmware for beginners to pros,on-line supply spare parts.
           Nevertheless we can upgrade its original FlySky firmware to be er9x.The er9x firmware has more menu,alternative value setting,programmable curves,etc.Very suitable for multirotor application.The upgrade cost just few dollars but the return likes new big brand-named transmitter.
            There is another opensource firmware,OpenTX which could be flashed on TH9X but unfortunately the latest version still have bug(Jan.2017).

1.Equipment&Tools.

- 9-CH Transmitter Turnigy/FlySky FS-TH9X

  

DuPont Cable


- Long nose plier
- Screw driver
- Plastic cutting plier
- Hot glue rod and hot glue gun
- Soldering iron,soldering wire and soldering paste

2.Hardware installation.

TH9X backside


- Open TH9X transmitter case off by screwdriver.


- Solder Double row pin header socket with Dupont wires and the marked soldering pad on TH9X PCB mainboard together(see pictures).


- Cut a hole on transmitter case for header socket.
- Fix pin header socket with transmitter case by hot glue gun.

3.Software installation.

- Download  ATtiny44 USBTinyISP Programmer driver from 
http://fab.cba.mit.edu/content/projects/fabisp/ select usbtinyisp w32 driver v1.12 
for windows 32bit.
- Click installer_x86.exe  to start installing.(This installer could not run on 64bit operating system)
- Connect ATtiny44 USBTinyISP programmer to the pin header socket that we have prepared with PC's usb port.If the operating system select FabISP driver instead of usbtiny driver.You have to change it in device manager property. 




  Flashing does't need to turn transmitter on.
- Download eePe-EEPROM Editor from http://www.er9x.com/


- Install eePe-EEPROM Editor on your computer.
- Download er9x standard firmware.Save er9x.hex file to hard drive.


- Open eePe-EEPROM Editor 
    Select Preferences menu,setting parameter as shown in the picture.
    Profile of your transmitter can be changed as your transmitter mode/stick setting.
    Programmer parameter has to set "usbtiny" and mcu has to set "m128".
- Open Read Firmware from Tx in Burn menu,save your original firmware to specified directory.
Open Flash Firmware to Tx in Burn menu,browse your download directory and select er9x.hex file to be flashed to.Click ok.Wait until flashing process complete.
- Disconnect USBTinyISP programmer.
- Turn on transmitter,it will beep and display its Logo.

4.Test and Problem shooting.
- Play new firmware,try to use every function,bind with receiver and test with servo/esc.Everything should fine after right doing.