HexTronik 1300Kv Brushless motor rewind

I recently rewound a Hextronik 1300Kv brushless motor (HXM2730-1300), also called “blue wonder”. I rewound it to see if i can make it better. Better thrust, cleaner windings and lower current consumption.

Some specs related to the motor insides…

  1. Number of stator poles : 12
  2. Number of Magnet poles: 16
  3. Motor tube diameter : 8mm
  4. Gauge of wire : 26AWG (0.43mm diameter)
  5. Number of turns per stator tooth : 14~15
  6. Termination : WYE

This motor is a 12N16P motor wound in the ABCABCABC format with a WYE termination. My goal here is just to rewind the motor with a better wire in a cleaner manner. No other modifications done.

A really good link for rewinding is from RcGroups : Link

20130507-101614.jpg

The stator after the rewind. Not pretty.

20130507-101627.jpg

Rather than terminating the wires loose, i decided to terminate them at a solder board. The rubber grommet is just to provide some clearance between the winding and the board.

20130507-101637.jpg

Soldered stator. The black thing you see is the dried ‘liquid tape’. Not needed actually.

20130507-101645.jpg

20130507-101651.jpg

Finished motor with the new termination board.

Tagged with: , ,
Posted in Electronics, r/c

Burning a compiled hex file for Atmega chips using Arduino avrdude command line

For my latest project i wanted to use the famous GRBL firmware that loads into an arduino and helps drive steppers with G-code as input. I had an Arduino-Uno that i wanted to use.

Now the arduino IDE can be used to compile and upload sketches. But what if you had the compiled ‘hex’ file itself? : Like in the case of GRBL. The github page hosts hex files compiled for the Atmega328p.

You can use external programs like Xloader to do the job. However it looks like these programs have their own issues. So why not make use of the Arduino that you already have ?

The arduino IDE does 2 things.

  1. First it compiles your C/C++ sketch for a particular Atmega processor (depending upon the type of the arduino board) and generates a ‘hex’ file or a binary file that the processor can understand. 
  2. Then it uses its own ‘avrdude’ and config file and uploads this hex file.

Here’s a typical output command of the uploading process from arduino.

C:\Users\rkovvuri\Downloads\arduino-1.0.2-windows\arduino-1.0.2\hardware/tools/avr/bin/avrdude -CC:\Users\rkovvuri\Downloads\arduino-1.0.2-windows\arduino-1.0.2\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -carduino -P\\.\COM5 -b115200 -D -Uflash:w:C:\Users\rkovvuri\AppData\Local\Temp\build37.tmp\BlinkWithoutDelay.cpp.hex:i

So for my case, to burn in the GRBL hex file, i did the following

  • cd Users\rkovvuri\Downloads\arduino-1.0.2-windows\arduino-1.0.2\hardware/tools/avr/bin
  • avrdude -CC:\Users\rkovvuri\Downloads\arduino-1.0.2-windows\arduino-1.0.2\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -carduino -P\\.\COM5 -b115200 -D -Uflash:w:C:\Users\rkovvuri\Desktop\grbl.hex:i

Thats it!

Tagged with: , ,
Posted in Electronics

ER9x mixer settings for Parkzone Stryker FQ-27

I recently found a very good deal on the Parkzone Stryker FQ-27 ultramicro flying wing. I am still a newbie at flying R/C. I bought this bird hoping i could fly it one day.

Usually flying wings have only elevons (airelons and elevator). The Stryker however has rudders too along with the elevons. It comes built in with DSM2 receiver.

20130218-155101.jpg

For the TX, my choice was the Turnigy 9x with ER-9X firmware. Below are mixer settings for correct throws on this airplane.

20130218-165906.jpg

Tagged with: , ,
Posted in r/c

From cardboards to castles

Another year, another Princess castle Pinata. This year was my daughter’s 5th birthday and she wanted the same Pinata i made for her the year before. However she reminded me that i need to do a better job in making sure that the candy fell. Last year, the candy release mechanism messed up and we ultimately had to manually tear open the pinata to get the candy to fall. This year i wanted to make sure that the mechanism worked.

 So i started off with 2 cardboard boxes to form the main castle body. Some leftover pool-noodles from last year formed the towers. The tower roofs were made from cardboard stock cut into a circle and made into a cone. The base was the dollar-tree foamboard. I wrapped all the parts of the castle with a pink wrapping paper from dollar tree. Then onto painting using some acrylic paints from hobby-lobby. I wanted the pinata such that it could be re-used. Which meant that the candy and goodies should be released by without the pinata being hit. Like last year, i decided to use the string system. I add a bunch of strings to the castle . Only one string will release the goodies. other simply just come off. For the characters, i simply dug through some of my daughter’s princess sticker books. Stuck the stickers on a cardstock, cut them out and glued them to the castle with a little paper stub. That gives them a 3-D appearance. For grass, i cut green tissue paper into small bits and sprinkled them on the castle surface which was prepped with from white glue. Some pom-poms from dollar tree rounded out the bushes and some flower plants.

20130205-044601.jpg

So here’s the final finished product, being hung from the roof. The purple ribbons at the bottom is where the kids would take turns, guessing which is the right ribbon to pull. Only one of them engages the mechanism that releases the trap-door at the bottom that releases the goodies. The mechanism was given a dry run before hanging up and it worked great!

20130205-044628.jpg

As usual, the top section is not attached and can be lifted, revealing a cutout at the bottom section where the goodies can be added. ‘Aurora’ sits at the top of the castle as that’s my daughters favorite princess.

20130205-044638.jpg

A closeup view

20130205-044645.jpg

Tagged with: , , ,
Posted in Crafts

Constant current lighting for model trains

I had a lot of old style passenger carriers in my HO collection and i wanted to add LED lighting to them. So i quickly threw in a Schottky diode bridge, followed by a 470uf capacitor to convert the pulsing DC to DC. The 470uf cap should help over dirty tracks. Most of LEDs were the 0603 or 0805 SMD type. So i used 1k-ohm to drop the current to about 12/1k = 12mA.

However during running, there was constant flickering of the LED. Initially i wondered if the capacitor was not sufficient. Then it hit me. LED’s are primarily current driven. It means, you can actually apply 110v DC across an LED, just as long you can maintain its forward current to be within limits.

See what happens here is that we have a series circuit involving a resistor and an LED. Say over a dirty track, the power connection is lost for a brief moment. The capacitor can supply the current. However its voltage will dip slightly. Now the resistor is a voltage controlled device with its current I = V/R. So as V drops, I drops. And the LED dims. when the carriage again connects with power, current increases, LED brightens: It flickers.

The flickering was too annoying and i wanted the carriages to have the same constant brightness. So i was looking for a device that could maintain the same current (I) even with voltage variations. So you’ll need a Mosfet to that.  I came across this great current regulator from NXP, available from Digikey :  PSSI2021SAY. This tiny little Mosfet can regulate current up-to 50mA, for voltages up-to 75V. This fits the bill. It is about $0.50 for quantities of 10+.

So i pulled up EagleCAD, got a quick board layout done and sent it off to OSHW for pcb prototyping. Back in about 3 weeks and assembled, the board under a magnifying loupe.

The board is really tiny. About 0.25″x0.25″. All you need are 2 components. The PSSI2021SAY device and a resistor to determine the current setting. I chose about 7ma. The foot-prints are small, but the soldering is not that bad. Total cost?

Board = $0.50, PSSI2012SAY = $0.75, Resistor = $0.10. Thats less than 2 dollars. Of-course not counting the time and soldering work needed.

IMG_2857

Then I test-rigged it with the LED strip. Success!. I put the strip back into the carriage. Ran it on the tracks. No flickering. No dimming. Great lighting!.

IMG_3139

Moral of the story? : While using just a bridge and a capacitor and series resistor might be okay for lighting, go one step further and get a constant current regulator. It does not cost that much, but it makes your lighting much more prototypical.

Tagged with: , ,
Posted in Electronics, Model trains, Uncategorized

DSM2 Antenna mod for turnigy 9x radio

I have a turnigy9x radio that came with a 2.4Ghz module. However i also had some DSM2 receivers (Orange rx) that i wanted to use. I came across lots of posts that describe the process of adding a DSM2 module to the 9x radio. But not of them had a way of using both the antennas in a pleasing way. So if you are looking to use both the existing 2.4ghz radio module and the DSM2 module, read up.

So here’s what you need (or similar)

  • Turnigy 9x Radio
  • DSM2 module (I got mine from a HP6DSM radio)
  • Two 2.4Ghz antennas (I got mine here from HK)
  • Two Right angle SMA female connectors (I got them from Ebay)
  • Two PCB strips that connect the SMA connectors to the back of the TX (Gerbers attached)
  • 3.3v UBEC (it was cheap here at HK)
  • 50ohm Co-ax wire for antenna connections

20121004-134145.jpg

With the 2 antennas bent, that’s how the modified TX looks.

The interior of the Turnigy 9X radio with the DSM2 module secured and the 3.3v UBEC wired in.

The black spots on the wire are the ‘liquid tape’ from Home-Depot.

The power is switched manually between the DSM2 module and the Turnigy module. The switch is at the back of the TX.

20121004-134112.jpg

Close-up of the SMA connector and the PCB-board. I used OSH-Park for the PCB service.  The screws are 2mm socket head.

20121004-134122.jpg

Finished TX. The switch at the back right above the Turnigy TX module controls the power to the DSM2 or the turnigy module.

20121004-134130.jpg

20121004-134140.jpg

Some links that help in adding the DSM2 module to the turnigy 9X radio.

Link1

Link2

Link3

Tagged with: , ,
Posted in Electronics, r/c

USBASP & AVRDUDE: Reading fuse bits

Recently the USBASP programmer has become a hot favorite to program AVR chips. It is small, inexpensive and works great with avrdude.

I was recently working with an RC brushless speed controller (ESC) and wanted to read the fuse values of the on-board Atmega8L chip. After running through some iterations i got it working. Here it is

avrdude.exe -c usbasp -p m8 -U lfuse:r:low_fuse_val.hex:h -U hfuse:r:high_fuse_val.hex:h

-c usbasp : Is the USBASP programmer. You do not need to mention the port to be USB. Seems like avrdude picks the programmer up without that info

-p m8 : The atmel device. In my case it was an Atmega8.

-U lfuse:r:low_fuse_val.hex:h

Here, ‘lfuse’ is a keyword that lower fuse byte is being accessed. Other keywords are ‘efuse’, ‘hfuse’, ‘flash’

‘r’ indicates that a read is being performed.

low_fuse_val.hex is just a name of a file into which the lower fuse byte will be written

‘h’ indicates that value will be in raw hex format. ‘i’ gives you the intel-hex format.

Tagged with: , ,
Posted in Electronics, r/c
Archives
Categories
Follow

Get every new post delivered to your Inbox.