Cheap Nano Arduino ATmega328 board from eBay
And installing the CH340G drivers on OS X Yosemite
After success with the Trinket I decided to try out a cheaper board from eBay. For £2.89 I bought a 'Compatible Nano V3.0 - ATmega328 Mini USB Controller Board' When setting up the Trinket it warned that you couldn't use the IDE for other devices - but I decided to have a go. This board came with the headers already installed - and also this time had a free usb cable with it.
Plugging it into the Mac revealed that unlike the Trinket this has more than two mini leds onboard - one of which flashed manically when plugged in. I loaded up the IDE and one of the eBay listings I found for it said I had to select the Pro-Mini ATmega328 option. There was a 5v and 3v options - so I'm guessing that the v3 stands for 3 volts - so tried that.
Loading up the blink program - I hit program. And the Mac complained about not finding anything on the serial port.
This led me on a long google expedition to find the drivers for this board for the mac.
It seems that these boards have a specific usb driver chip - which acts as a serial interface, but after reading quite a few forum posts this board uses a cheaper chip to do this. The driver chip is underneath the board - and a bright light and magnifying glass revealed it to be a CH340G.
OS X Yosemite doesn't have these drivers built in, and I found the drivers at:
http://www.wch.cn/downloads.php?name=pro&proid=65
However it seems that there are still issues with these drivers - and in the end I had to run a workaround to enable the Mac to run with these drivers. It meant sending a system setting to the bootup memory to allow an evil driver unauthorised by Apple to run. I DONT RECOMMEND DOING THIS!:
sudo nvram boot-args="kext-dev-mode=1”
So before you do read the warnings at: http://www.cindori.org/enabling-trim-on-os-x-yosemite/
After running the above you need to do a reboot (well at least I did)
Now when I ran the IDE and selected the serial ports menu option I get two new ports - so selected the /dev/tty.wchusbserial1420 and was able to get blink downloaded to the board.
So a success. lets just hope after installing this I'm not now sending all my keystrokes to a anonymous server in china…
You can see the devmode you added above to the bootup ram by typing:
sudo nvram boot-args
and you can back out the developer mode by running:
sudo nvram -d boot-args
This boards got way more pins than the trinket - so in a later post I'll explore them and do some other things with this board. I will probably back out the driver change I put in my mac above and use a windows machine to program this in the future.
12-Dec-2014 Add comment
blog comments powered by Disqus Permanent Link