Since i have a bunch of Atmega328p-pu(5v), Attiny85(1-5v), ESP8266(3.3v) & Raspberry's(3.3v) it was time to get:
- A USB to TTL
- Logic level converter
Now before buying that stuff i read about those USB to TTL converters.There are alot of them. Some need special drivers, some destroy chips if not original and some cost alot.
I found that one CH340G, i read good things about that USB to TTL. People are happy with the product and so i buyed it.
Like i said i need it both for the Atmel chips but also for the ESP8266 wich is 3.3v. It works on the ESP8266 with a minor problem. Some sources say that it needs drivers for older win OS's or OSX. I'm on win8.1 and it works out of the box apparently, even if i tried to install & uninstall the special drivers.
I can't get it to work with Atmega328-p pu. I only get "device not wroking correctly unrecognized".No COM port is listed in the arduino ide. As the device CH340G only has TX RX 5v(also3.3v) & GND and NO DTR & RESET i gueess i need to put the (Atmel)chip in some sort of connection mode & pullup/down something. What?
Like i said it works with the ESP8266. But i got a little suspicious after various transmission errors and measuring the TX & RX. In fact the voltage was 3.65v and dropped right after a sec to 3.58v. Now the Datasheet of the ESP8266 says it's limit is 3.6v and so i tried both of my logic level converter (One based on the PCA9306, one on mosfets). They both don't work. Device unrecognized. Is 3.65v ok if the max should be 3.6v? if not why do those logic level translator not work?
note:To test the logic level converter i used a AMS11117 3.3v regulator on the ESP8266 side and set the CH340G to 5v. basically if you want 3v logic you bridge the 3.3v pin if you want 5v you bridge the 5v pin to the VCC PIN.
Actually i got the logic level converters only to control a WS2812B Adressable led strip(5v) from a raspberry(3.3v). I read that those self made mosfet/transistor Logic level converters don't work properly. I also tried with some BSS138 mosfets(one of the first sparkfun's logic level converter), no luck. And so i got "expensive" ones. One is based on the PCA9306. I just noticed now that the second one is also just an array of mosfets. So basically the only "good" logic level converter is the PCA9306. i don't get why it does not work with USB2TTL.
EDIT related to questions in the comment.
The 328p-pu chips have an optiboot.. the default one (Arduino IDE). And yes i would like to program them on a breadboard. Thats why i got myself a usbtottl. It's frustrating to remove the chip everytime you have to upload something new.
Atm i'm using 2 original arduino UNO to program attiny's and atmega328p-pu.. but like i mentioned above its alot of work to remove the chip every 2 seconds.
To program the Attiny85 i made my own "shield" with the relative capacitor. and connections to the UNO board.Also a simple blinky led to see if the bootloader is programmed correctly the first time.. or if i change the frequency.But that uses different pins.. not tx rx.
Solved second problem
It works on the ESP8266 with a minor problem.
To test the logic level converter i used a AMS11117 3.3v regulator on the ESP8266 side and set the CH340G to 5v.
I added an additional external powersupply only for the ESP8266. Always using the AMS11117. but this time powered by a normal phone charger powersupply. Looks like when programming it needs alot of power.There are no more transmission errors. So i guess this 0.05 overvoltage has nothing to do. And should not harm the mcu.
the main problem remains unsolved.