DIY csCNC Controller – 3 (DIY Arduino Board and Programming with BusPirate)

For CNC controller, we have two choices, PC or dedicated controller card. Most DIY designs use Mach-3 or LinuxCNC. They use LPT port for interfacing and PC side software take care of everything. The problem is that LPT port is not an option today PC even for a bit outdated one. I searched for opensource CNC controller with simple, cheap, DIY friendly building solution ūüôā . Most are not meet up for me.

Finally, I keep my eye on Grbl.

https://github.com/grbl/grbl

https://github.com/grbl/grbl/wiki

– It is opensource, Arduino base, quoted from Grbl wiki

“Makers who do milling and need a nice, simple controller for their system that will run the ubiquitous Arduino Uno. People who loathe to clutter their space with legacy PC-towers just for the parallel-port. Tinkerers who need a controller written in tidy, modular C as a basis for their project.”

I am a PIC guy but the simplicity and rich full featured lib and software support of Arduino swayed my mind. Every programming language and platform has it’s learning curve but Arduino is not. If you have experience on any microcontroller paltform, you can build it up Arduino within a few hours.

In short, I built my own Arduino board (based on UNO core). I don’t want to scarified my ¬†Arduino board in CNC project and want to save a few¬†bucks and also wanna to have fun.

1# Started using a perfboard, a ATMEGA328P, crystal, some capacitor and resistor, headers, pin base and some jumper wires and also FTDI FT232 board.

Started with basic design, I omitted power supply parts. Here is my basic sketch schematic.

MY_DIY_Arduino-Circuit

DIY-Arduino-Hardware (1) DIY-Arduino-Hardware (2)

2# Soldered headers, LED at PIN-13 and Reset switch. Also a header for FTDI board, external power connector, jumper for USB power, Power LED, pulled up resistors for SDA and SCL are soldered. Dont forget FTDI-DTR pin to connect RESET pin of ATMEGA328. If not, you cannot program Arduino.

DIY-Arduino-Hardware (5)

DIY-Arduino-Hardware (6)

3# The back side or perfboard PCB.

DIY-Arduino-Hardware (7)

After building the board, I have to program the ATMEGA328 with bootloader. The procedure is simple but I need a programmer for this. There are some alternative methods for burning bootloader to Arduino.

–¬†http://www.arduino.cc/en/Tutorial/ArduinoToBreadboard

–¬†https://learn.adafruit.com/arduino-tips-tricks-and-techniques/arduinoisp

–¬†https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader

I picked my buspirate and follow the procedure from this blog. Thanks, BP support as AVR programmer.

http://blog.allthingsgeek.com/article/index/index/id/27

http://dangerousprototypes.com/docs/Bus_Pirate_AVR_Programming

1# Connected the Arduino board and Buspirate .

buspirate-AVR_Programmer

DIY-Arduino-Buspirate

2# Download “optiboot-master” from Arduino source. ¬†Installed WinAVR for AVRdude programmer support for Windows.

https://github.com/Optiboot/optiboot

http://winavr.sourceforge.net/download.html

According to Eric’s blog post, I created a .bat file for easy programming.

PAUSE
avrdude -c buspirate -p m328p -P COM7 -U lock:w:0x3f:m
avrdude -c buspirate -p m328p -P COM7 -U efuse:w:0x05:m -U hfuse:w:0xD2:m -U lfuse:w:0xFF:m -U flash:w:optiboot_atmega328.hex -U lock:w:0x0F:m
PAUSE

3# Then, simply run in command line, waited for 10 mins (yes, it is a bit slow) and the job was done.

DIY-Arduino-Firmware (8) DIY-Arduino-Firmware (9)

DIY-Arduino-Firmware (1)

4# Plug USB cable, just build¬†a “blink” sketch and successfully upload and run. LED at PIN-13 is blinking successfully ūüėÄ .

DIY-Arduino-Hardware (15)

Finished DIY Arduino board.

DIY-Arduino-Hardware (16)

5# Side by side with original Arduino.

DIY-Arduino-Hardware (17)

Last job is need to attach all and make the first run.

By Oakkar7

okelectronic.wordpress.com

DIY csCNC – 2 (Linistepper Driver and testing with Buspirate)

Since I started building DIY CNC, I checked the free, opensource motor controller. There are several alternatives. I chose linisteppr controller.

http://www.piclist.com/techref/io/stepper/linistep/index.htm

http://www.romanblack.com/lini.htm

  • – Simple and cheap (my first priority ūüôā ) and I can source required parts locally
  • – ¬†microstepping, open design (Especially, it’s PIC16F628A based. I’m PIC guy and a lot 16F628A in my stock)

Build log is fast, simple and straight. I used a simple perfboard for faster development.

DIY-linistepper (1) DIY-linistepper (2)

 

After building the driver, I tested it with my buspirate using PWM function for generating stepping pulse. I started with 1kHz and increased to 4 kHz.

  • – Buspitrate GND and AUX pin were connected to driver STEP and GND pins
  • – For full step, motor was stalled at 1 kHz
  • – The¬†motor is smoothly run at 1 kHz at half step and 6th microstepping
  • – The motor running faster and smoother at 4kHz for 16th microstepping
  • Need bigger heatsink or small fan, sa mention in linistepper page,it is hot a lot

linistepper-buspirate (2) linistepper-buspirate (3)

DIY-linistepper (4)

The next part is the CNC controller and software.

By Oakkar7

okelectronic.wordpress.com

 

DIY csCNC – 1 (Hardwares)

As mention is DIY Drill Press post, I started building a cheap&small CNC (aka) csCNC. My requirements are :

  • a small , table top CNC
  • Must be simple to build (No need special hardware and tools)
  • Must be cheap (My pocket is very limited)
  • capability of milling PCB, plastic,¬†acrylic and wood.

After learning DIY build logs from internet, I chose Mantis 9.1 CNC techniques.

http://makeyourbot.wikidot.com/mantis9-1

  • I like building technique, its simple, fast and not required special tools
  • it is small and cheap but accuracy and performance is good

But, the parts and tools in my hand is very limited. I have only parts from old printers such as linear rods, rails , stepper motors and some hardware like nuts and bolts. So, I customized the design slightly depend on my requirements and handy parts.

I started the building since last April Thingyan holidays.

1# Designed the draft ,

2# Cut the materials for X,Y assemblies. I used plastic board for assemblies and Bamboo kitchen plate for base (my fav, it is heavy, flat and rigid).

DIY-csCNC_hardware (2) DIY-csCNC_hardware (3)

3# Drilled the base plates. I used sandwich drilling technique and use 90 degree L shape as drill guide. This method worked well. Drilled easily vertical and parallel holes for linear rails.

DIY-csCNC_hardware (4) DIY-csCNC_hardware (5) DIY-csCNC_hardware (6)

4# Used an old school technique, a paper and pencil to make a shape of motor mount. Marked and drilled the base plate for motor mount.

DIY-csCNC_hardware (8) DIY-csCNC_hardware (9)

 

5# Test assembled X table.

DIY-csCNC_hardware (10)

6# Cut the moving bed and glued with linear barring. Used small amount of super glue for keeping parts temporary. (Don’t use much super glue, it will prevent later use of AB glue).

DIY-csCNC_hardware (11) DIY-csCNC_hardware (12)

7# prepared Tap screw for linear slide nut. To prevent backlash, I used tapping with the same lead screw. Mantis 9.1 design used fixed nut with glue. For easy maintenance and replacement, I used an aluminium bracket to fixed the lead nut.

DIY-csCNC_hardware (13) DIY-csCNC_hardware (14) DIY-csCNC_hardware (16) DIY-csCNC_hardware (15)

DIY-csCNC_hardware (16)

8# Installed the lead screw and X motor. A small rubber pipe from Car tier inflation pump is used as coupler. Installed L shape brackets for fixing base plates.

DIY-csCNC_hardware (17) DIY-csCNC_hardware (18) DIY-csCNC_hardware (19)

 

9# Tested alignment of rails and moving bed by rotating the lead screw by hand. After this, all linear barrings and moving lead screw nut with AB glue.

DIY-csCNC_hardware (24) DIY-csCNC_hardware (25) DIY-csCNC_hardware (26)

10# Cut and prepared for Y axis base. Use the same technique for X axis. Y axis , lead screw, linear barrings, nut and motor mount are finished.

DIY-csCNC_hardware (27) DIY-csCNC_hardware (28) DIY-csCNC_hardware (29) DIY-csCNC_hardware (31) DIY-csCNC_hardware (32)

 

11# Designed and cut the fixed mount for Z axis.

DIY-csCNC_hardware (33) DIY-csCNC_hardware (34)

 

12# Finished for Z axis motor mount and lead screw coupling.

DIY-csCNC_hardware (38)

 

 

 

 

 

DIY-csCNC_hardware (35) DIY-csCNC_hardware (36)

13# Finished spindle mount and moving rails parts.

DIY-csCNC_hardware (37)

DIY-csCNC_hardware (39)

14# Fixed everything except spindle mount.

DIY-csCNC_hardware (40)

Next parts is electronics, controllers and motor parts. Stayed tuned.

By Oakkar7

okelectronic.wordpress.com

 

DIY Drill Press

This is an old project which I built since last year. I just want to share and add as a project log here.

As a developer from undeveloped country, my budget is very limited. So, I chose DIY style drill press.  So, I have to collect parts for my projects from old printers, scanner, etc.

This is a pilot project , built for my need to build¬†upcoming a CNC project. ¬†Another problem, I don’t have any power tools except a small drill gun and hand tools. After learning DIY CNC process from internet, before building a CNC, I think I should have a drill press for perpendicular drilling. So,I decided to build a drill press first.

1# collected required material for base and a cheap china made rotary tool. A bamboo kitchen plate is my favorite for base plate in such design, weight is heavy, thick and rough. A L shape supports for vertical stands. Total material cost is about¬†25$ ūüôā .

DIY-csDrillPress (1) DIY-csDrillPress (3)

# Started with vertical support, vertical Z axis linear slide rod from old printer.

DIY-csDrillPress (4) DIY-csDrillPress (5) DIY-csDrillPress (6)

Fixed rods with L shaped aluminium bars with wood stoppers.

DIY-csDrillPress (7)

Assembled Z axis and rails.

DIY-csDrillPress (8)

3# prepared for linear slides and Z-axis slides. Two plastics bars are used as linear slides.

DIY-csDrillPress (9) DIY-csDrillPress (10) DIY-csDrillPress (11)

4# Prepared for rotary tool mount by cutting two plastics plates.

DIY-csDrillPress (12) DIY-csDrillPress (13)

Fixed the holder plates on vertical Z bed.

DIY-csDrillPress (14)

5# Fixed rotary tool on bed by using steel hole bars and spring. I wanted to make flexible and changeable tool bed.

DIY-csDrillPress (15)

Z axis and tool is tested and installed.

DIY-csDrillPress (16)

6# After this, a handle was designed.

DIY-csDrillPress (17)

Designed and cut push down lever crowbar bars.

DIY-csDrillPress (18)

Installed both side of gantry plate.

DIY-csDrillPress (19)

Prepared for handle.

DIY-csDrillPress (20) DIY-csDrillPress (21)

7# Finally, a DIY drill-press is on my bench. Attached a iron flat rod to strengthen vertical stand.

Nothing special, just a simple, cheap and working DIY tool ūüėÄ .

DIY-csDrillPress (22) DIY-csDrillPress (23)

 

By oakkar7

okelectronic.wordpress.com

 

$10 China GSM Phone

We have seen how new Iphone shakes the market. How about low tech phones ¬†and how much a handset cab be cheap? Last year, I saw Bunnie’s blog post about a cheap $12 Gongkai handset from Mingtong Digital Mall in Shenzhen. ¬†Gongkai means “Open” in Chinese and it’s the term alternative of “Open Source”.¬†Mingtong Digital Mall is one of the famous digital gadget’s malls¬†from Shenzhen especially cheap and copy items. I wondered how these cheap handset could be sold in this low price when I saw his blog post.

www.bunniestudios.com/blog/?page_id=3107

I lived in Myanmar, yes a green land opened it’s door recently. The government released telecom sector and has given the two new operators, Telenor and Ooredoo. Just a clarification, some may don’t know how Myanmar telecom sector is squeezed before 2000. I bet you will wonder how much it will cost for a mobile SIM card before 2000. It was cost about $5000 (Please up your jaw, I am not kidding :D). In last decade, owning a mobile phone was¬†a trade mark of being a “boss” in Myanmar. Most people used a public pay land lines phone booth in every sight of cites. Seem these will soon be a history. But for now, news operators are moving and it costs ¬†about only $1.5.

Have you ever seen people queuing for a cheap SIM card?

 

Yesterday, one of my colleagues showed me a GSM handset with a surprised price tag, 10000 MMK. ¬†It is about $10 (1$ = 986 MMK). I quickly checked specs and my¬†curiosity leaded me to bought one. It is a normal low price GSM handset with basic functions. I saw many cheap China handset but non are not lower than¬†$20. This is the cheapest¬†handset I have ever seen. Note that Bunnie’s¬†Gongkai Phone is $12 at China, main land but I bought my $10 phone from local retail shop from Mandalay, Myanmar. More surprising fact is that my friend told me wholesale price is >$9. If this is right, how much it will be the ground cost of these handset in it’ts origin, China!! Unbelievable. Here is my cheapo handset. It is just ordinary phone but specs are even a little higher than Bunnie’s phone¬†come with a box, handset, a battery, charger and a hands free earpiece.

DSCN7341 DSCN7344

 

The spec and functions listed on the box,

  • Touch
  • FM Radio
  • Music Player
  • Video player, recorder
  • MicroSD
  • Camera
  • Bluetooth
  • Multi languages
  • 1.8″ Display
  • Dual SIM (Dual standby) , Stereo Speaker (Really, only one Speaker), Games

DSCN7342 DSCN7343

 

The brand is Soloking and model is T176. I quickly searched google and searched more info. superfone.en.alibaba.com/product/1807438912-215027443/T176_1_8inch_soloking_china_mobile_phone_cheap_price_celulares.html

  • Platform ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬†¬†:¬†coolsand 8851
  • Operation System ¬† ¬† ¬†: Mstar
  • Build in memory ¬† ¬† ¬† ¬†: 32+16 Mbt
  • Frequency ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬†: ¬†GSM 900/1800 ¬† optional ¬† 850/9001800/1900
  • Multi Media ¬† ¬† ¬† ¬† ¬† ¬† ¬† ¬† : MP3/MP4/3GP/FM Radio / Bluetooth¬†Camera 0.3 Mega Pixels
  • Multi Function Torch : Alarm ,Calendar ,Calculator ,Audio recorder ,Video recorder
  • Flash Card Support ¬† ¬† : T-Flash Card Max support to 8GB
  • Languages Multi language :¬†Arabic,French,Turkish, Thai,Vietnam,Russian, English, Hindi, Indonesian, Spanish etc

I installed battery, SIM and power up the phone.

DSCN7347

 

Tested basic functions call, menu, camera, FM etc. DSCN7352 DSCN7356 DSCN7359

– FM

DSCN7360

РIt supports Java.

DSCN7361

It even include Myanmar language support. Changed and tested it but some menu were¬†not properly show ūüôā .

DSCN7357   DSCN7358

Finally, I teared down to check how these cheapo was made.

DSCN7363 DSCN7345

Just removed 4 x small screws, everything disassembled.

DSCN7366   DSCN7374     DSCN7369 DSCN7372

 

Other are usual parts such as speaker, mic,  SIM holder, SD slot, small camera, FM antenna and 2 x LEDs for torch. The phone is controlled by all in one chip.  The back side Speaker housing is attached with multi-band antenna.

  • LCD, this must be a friendly 1.8″ SPI TFT, LCD ¬†(ST7735 controller ) from hobby shop around the world. I even ordered these LCD from elecfreaks ¬†last a few months ago.
  • There is a EMI shield which covered the chip but google infos and some partially label can able to guess ¬†me the main chip. It is RDA8851 from RDA Microelectronics, one of chip manufacturer from China. In short, it’s all in one chip which doo everything for phone such as baseband, interface, Bluetooth, FM, camera, Flash (32Mb build in), UART, SPI, I2C etc. Here is the links to chip datasheet.
  • www.rdamicro.com/products/Detail_238.aspx
  • Firmware is Mstar from MStar Semiconductor, Taiwan . From¬†¬†Wiki ,¬†MStar is often referred as “Little-M” in Chinese community, as a contrary part of the bigger company “Big-M”, MediaTek.

– The only weakness of this phone (in comparable this price) is it’s charger. I also opened and checked the charger design. It voids all of safety rules. Manufacturer should include a more safe charger with¬†a buck. The stock charger is one of the simplest and reduced version without any protection of it’s line. The design includes 13001¬†NPN Epitaxial Silicon Transistor,¬† 1 IN4001 diode rectifier, small SMPS transformer, 5V zener, 3¬†capacitors and some resistors, that’s all. The output voltage is about 6V.

DSCN7379

Final thought:

– First, I don’t expect much from this phone but the price is really amazed¬†for me. It is a bare phone without no contract and unlocked. It exported from china to Myanmar. What will be local retail price and how much it can be lower?

–¬†The cost of the phone is the parts and production costs plus a little export costs. There will be absolutely NO licensing, copy cats fee ūüôā and seem no¬†certification.

– Everybody talks about SAR. But I think the RDA chip can take care of this in a basic level. The package label state that SAR Head : 0.342 W/Kg(1g) and body : 0.429 W/Kg (1g).

РI know that designing a mobile phone is not that hard. I designed my own DIY mobile phone recently with a basic functions like this phone with the same LCD. Even LCD it self costs about $6.4  in some ebay retail shops. What will be the lowest bargain price of this LCD? (I believe the LCD must be the most value part in this phone. Any idea?)

– For the chip, I don’t know how much cost for this RDA chip in volume and in retail. Bunnie said that¬†MT6250 chip from his¬†Gongkai Phone in retail price is $2.1.

– If someone knows about these, let me know and also share your thought.

Last :

Again, it is not rocket science to build a mobile phone. This is my DIY GSM mobile phone prototype which I recently developed for fun and hobby. Some basic functions such as call, sms, GPS are done and still working for a complete prototype. But, you may not defeat China at least in quantity and cost :D. Thanks for visiting.

DSCN7380

By oakkar7

okelectronic.wordpress.com

ISEE3 Rebooted

This post is an honorable post to a group of  Citizen Scientists and Volunteers for their effort to reboot an cold world era (launched 1978) satellite which floated around the universe.

Source: http://www.planetary.org/ NASA International Sun-Earth Explorer (ISEE-3) The International Sun-Earth Explorer (ISEE-3) launched in 1978 on a mission to study Earth’s magnetosphere. In 1983, it became ICE, the International Cometary Explorer, and was sent on a new mission to study comets Giacobini-Zinner and Halley.

Mission control team used GNURadio (opensource SDR radio software) to wake up and control the runaway bird.

http://www.fsf.org/blogs/community/free-software-in-space-gnu-radio-and-the-isee-3-spacecraft

And they used the huge monster disk Arecibo because this is the only dish on the planet to reach that distance so far.

 

 

A nice , simple and clean mission control room. This is different from the war room we have ever seen.

 

isee3.team

ISEE-3 Reboot Project Mission Control Team

http://spacecollege.org/isee3/

https://twitter.com/ISEE3Reboot

It was 10 July 2014 early morning, I was waiting for World Cup, surfed the net and follow their twitter stream about TCM burn (the mission control team started and burned a series of thrusters). And they also feed the live telemetry data. I followed their tweet and live data stream.

DSCN7251

2014-07-10_013106

2014-07-10_011305

 

This shows how a crowd funding and citizen scientists can go far. And this is the first collaboration project with public for space science.

Congratulation to all.

okelectronic.wordpress.com

 

RTL-SDR & FUNcube

While World Cup was continuing its exciting show, I made some my RTL-SDR and satellite research progress. My next target was FUNCube Sat (aka) FUNcube-1 (AO73) is a complete educational single CubeSat project with the goal of enthusing and educating young people about radio, space, physics etc.

http://funcube.org.uk/

http://amsat-uk.org/funcube/funcube-cubesat/

There is one thing that Funcube is magnificent than others, it’s data warehouse. The earth station can receive its telemetry data and can upload this data to data warehouse by online. There is also Dashboard Application for telemetry data decoding and uploading to data warehouse.

Here is the link for those who interested.

РFuncube Handbook 

– Data Warehouse

Dsahboard Application

N4JTC wrote about RTL-SDR and Funcube  , I followed this.

http://n4jtc.wordpress.com/2013/11/23/rtl-sdr-sdr-radio-funcube-sat-fun/

This time SDR Radio V2 software was used because this software has some distinct features such as sat tracking and I liked to test it. I believe that any rtl-sdr app can do this.

 http://v2.sdr-radio.com/Download.aspx

 

OK, before world cup final match, I do this. I tuned 145.9xx MHz and saw waterfall data stream and audible beep. It is SSB data.

funcube_manualtuning

Then, piped audio data stream to Dashboard application. The telemetry data show up.

2014-07-11_113953

 

I already registered to Data-warehouse sites and Dashboard App automatically uploaded to warehouse site. Then, my uploaded data appeared in site. Seem I am the only one and first data provider earth station from Myanmar.

 

funcube_datawarehouse2

# Final thought

– Noticed some noises along with the whole spectrum and some recommend for shielding. I have to test it. Anyway, shielding an RF device is a best practice. Hree is the link for this. I will try this.

http://sdrformariners.blogspot.com/2013/09/reducing-electrical-noise.html

Anyway, it is happy research and hobby time.

okelectronic.wordpress.com