|T O P I C R E V I E W
||Posted - 07/27/2017 : 02:37:38 AM
I am starting with electronics / arduinos / atmegas here. For a couple of recent days I've played with USBasp programmer, atmega328P MCU as well as with 7805 and LM317 voltage regulators. Now my next step is to try to talk with DS18B20 temperature sensor and then with RF 434 / 868 module.
Here is the datesheet of DS18B20 :http://www.componentschip.com/pdf/6a-DS18B20-T-R.pdf
I was thinking how can I see the data read from temperature sensor without having any LCD and the simple answer is using RX/TX pins. The problem is I've stuck on choosing the right cable to do so. I found THIS great stackexchange post about UARTs and RS232 and it narrowed my problem to THAT data cable - which ish FTDI's DS_TTL-232R.
Now, I've also read this datasheet and I do see it's "USB to UART, 3.3V TTL logic level, Raspberry Pi compatible flying leads" but it also states "5V safe TTL inputs make the TTL - 232R easy to interface to 5V MCU¡¯s".
Do I get it right that this cable will allow me to:
- connect PC via USB to atmega328 RS pins (which have 5V logic level AFAIK)
- connect PC via USB to RaspberryPi's RS pins (which have 3.3V logic level)
Also I do guess basing what I've googled that I will need some other part (logic level / voltage shifter) to connect atmega328 MCU to RasPi directly, right? Or.. is it enough to supply 3.3V to MCU so it has up to 3.05 V ouput high, and not up to 5V, which I again guess would cause damage to my RasPi?
|1 L A T E S T R E P L I E S (Newest First)
||Posted - 07/30/2017 : 10:44:34 AM
Don't try to reinvent the wheel!
DS1820B has a proprietary single wire interface, but instead of trying to bit-bang it to decode, there is an Arduino library and cookbook how to interface the chip on https://create.arduino.cc/projecthub/TheGadgetBoy/ds18b20-digital-temperature-sensor-and-arduino-9cc806.
Once interfaced with Arduino, you connect it through a standard USB cable to your PC. Arduino development program provides "serial monitor" in the "tools", which will display the measured temperature without any further programming.