BC66 GPIO pins and Dallas Semi temperature sensor

@WizIO tnx for info!

I have one more question regarding you arduino example with bc66, ds1820 and bipolar digital NPN (in my case i used 2N3904) according to transistor shematic. I commented out display code from main.cpp and now it compiles successfully.

// #include <dallas.h>
// OWU ds;
// #include <Adafruit_GFX.h>
// #include <Adafruit_SSD1306.h>
// Adafruit_SSD1306 display = Adafruit_SSD1306(128, 64, &Wire);

after fw upload module gets initialized but code blocks in method uart_getc do-while loop Serial1.available() - it seems there is no data …

just to make sure about my wiring - im using same dev board as you “Olimex NB-IoT-DevKit” and i have connected wiring to pins: VCCB, GND, TxD-AUX P29 and RxD-AUX P28 - is there somethin i’m missing?
( board pinout: https://github.com/OLIMEX/NB-IoT/blob/master/HARDWARE/NB-IoT-DevKit-pinout.png )

the only thing that i’m not sure about is that VCCB is unconnected by default ?

tnx!

Hi
I switch my board to work with 3.3v ( look Olimex documentation )
or connect sensor to 5V… pull-up must be aprox 1mA ( Dallas - see doc )

@WizIO I switched board to 3.3V (I measured) but still I program stuck in do-while loop (Serial1.available()) - do you have any other advice what else can I try? :thinking:

Anyway, I’m not sure do I have DS18S20 or DS18B20 temperature sensor (it’s sealed waterproof version) - can that make difference? Or 2N3904 is not good choice ?

(when i’m disconnecting sensor from VCCB line i’m geting some bytes …)

Tnx!

no idea… look on scope

ok tnx @WizIO!

ok it seems that problem was 4.7k on 3.3V pull-up resistor :smiley: i connected to 5V now i get data but every measure fails, method DS18X20_read_decicelsius fails … :frowning:

i’ll try to change pull-up resistors (R2 & R3 from schematic one-wire-to-uart) and connect it to 3.3V

must be ~1mA … see Dallas manual

Hello,
I am also trying to read DS18B20 with the board at 5V.
But I don’t have 7002 transistors. Can I use ZXMN3A01F instead?
I am not sure about how to select transistors for the board
Hope you can help me guys,
Thanks

… any NPN transistors …
I use digital … it was on the table
uart and diodes can not provide current for sensor power

BTW: direct access to GPIO register provide 14 uSec pulse front
( 35 kHz pin toggle @ 78 MHz ) { DHT used minimal time … 20-40 uSec }

If I have time will make example… :slight_smile:

Hi @WizIO
I have done some tests using OpenCPU GPIO API Ql_GPIO_SetLevel() takes around 20uS.
So, theoretically, we can achieve a 50kHz (without accounting for bit processing overhead) frequency. The 1-Wire standard frequency is 15.4kbps.
Hence, GPIO could be fast enough for 1-Wire communication, no need for UART, do you agree?
I will try to do some tests

I have any problem with GPIO-s… noise… with external pull-up, pull-down resistors?
Quectel - is there any protection ( volttage, current ) GPIO-s ???
shot - GPIO2 - Olimex level convertor to 3.3 - Resistor 2.7k to GND
if R is connected to VCC-3.3 the image is reversed ( noise is down )

Direct GPIO ( no level-convertor )

DHT sensor

@WizIO so you managed to support DS18x20 and DHT(11,22) sensor without any additional module (1wire to uart)? i suppose you only have pull-up ressistors (3.3k ohm?) and connected both sensors on 3.3V?

will you show an code example? :innocent:

br,
domagoj

as default - only GPIO

удебелен текст

Hi @WizIO,
Great that you achieved that and you could share it with us.
I currently have an Olimex BC66 devkit module, which has a level converter to 5V.
You mentioned in a previous post that you were seeing noise when using a level converter, have you tried it with this module (BC66 devkit)? The BC66 pins are not directly accessible so I am not sure I can connect the sensor directly to GPIO
Thanks

now work with Quectel BC66 dev board ( Arduino shield )
No idea about Olimex noise problem…

Hi,
I am having some problems, but I think the issue could be the level converter

Can you share details about your wiring?
So, you are powering the DS18B20 at 5V and connecting the data pion directly to the GPIO

I didn’t know GPIOS on the BC66 were 5V tolerant… Could you send me the link to that datasheet? I tried but can’t find it anywhere

Thank you

http://www.mikroblog.net/wp-content/uploads/2018/03/DS18B20-Wiring.jpg
my R = 3.3 @ 3.3V
bypass Olimex GPIO_x level-convertor

Hi @Adrian_Santos,

did you manage to connect temperature sensor directly to the olimex nb iot bc66 board without level converter?

Are gpio somehow directly accessable ?

Br,
Domagoj