Showing posts with label arduino. Show all posts
Showing posts with label arduino. Show all posts

02 February 2019

ESP32 with OLED and maybe LoRa

I've bought a few too many ESP8266 boards over the years. Done a couple projects but most are sitting looking lonely in a box of good intentions. So in order to fix the wrong, I've decided I'm going to buy too many ESP32 boards.

I have a few of these:

  • ESP32
  • 0.96" OLED SSD1306
  • About $8

And a couple of these:
  • ESP32
  • 0.96" OLED SSD1306
  • 18650 Battery Holder
  • About $10



And seriously considering these:


And want a couple of these:

  • ESP32
  • GPS NEO-6M
  • LoRa SX1278
  • 18650 Battery Holder
  • About $26


05 January 2009

USB Bluetooth to Serial

I wrote about a crap Bluetooth dongle that I bought last year. I was terked about the big honkin' plastic case with a fake antenna. While looking at the pcb, I noticed that it was a Cambridge Silicon Radio (CSR) chip labeled BC212 015BD A21AA. At the time, I did a quick Google search on the part number and moved on after not seeing anything too interesting.

Tonight I read a post on the Arduino Forum about cheap Bluetooth that said most USB Bluetooth dongles were "just a USB Serial Com device for the Bluetooth software stack to talk to". What?!? No frickin' way. A USB dongle is a USB Slave device that requires a USB Master device to interfaces with it. Isn't that so?

Mr Dougl's (junior member) post started me thinking about that Bluetooth crap thing. There's no way that it's just a serial port device. I went back to that quick Google search and began reviewing the hits. This one seems interesting. A Bluetooth RS232 to Bluetooth Adapter. And it uses the same CSR BT chip as my crap. Hmmm. Could my chip have a simple serial interface? And if it does, can I interface this crap to the simple serial rx/tx interface of an Arduino?

A little more digging uncovered the CSR BlueCore DataBook that says the BC212 has both a USB and UART interface.

First thing I noticed here is the module uses CTS/RTS handshaking, which is currently a bit of a rough spot with Arduino. Another deal breaker may be the words above that say "requires external RS232 transceiver IC". I dunno. I'll look at this again soon and see if any progress can be made.

31 December 2008

Xbee Shield Kit Schematic V2.0

I've been getting a lot of Google hits on the blog looking for the Arduino Xbee Shield Kit V2.0 schematic. I had a hard time finding V2.0 also 'cause NKC Electronics seems to only have V1.0 posted. NKC's Support Forum link is also 404'd. I emailed them in October about the bad link but when I checked a few bits ago, it was still a dead end.

I ended up getting my V2.0 schematic copy (that's only a partial shot over on the left) from NKC support via an email exchange and have uploaded the pdf to: http://www.mediafire.com/?zjtykjtohji

Let me know if the link doesn't work for you. Or leave a comment if it does. Tell me what you're using the shield for. Or look around at the rest of the blog. It's free ...

01 October 2008

Xbee Arduino Shield Kit

Yow. I've soldered a few things in my day but I kinda struggled putting together the NKC Electronics Freeduino Arduino Xbee Shield V2.0 Kit. Sure laugh it up, look at the very few parts in the picture. But this took me almost 3 hours of intensive labor, smelling caustic fumes, and burning fingers. I clearly over estimated my solder-foo.

The kit is great, well marked, pieces are minimal, the assembly instructions are clear, I just need practice soldering the many header pins. I'm so glad there wasn't any Surface Mount (SMT) because I couldn't have done it.

Now that it's built ... Now what? I need to interface this thing to the Pololu LV168 Orangutan Robot Controller. The shield is intended to work with an Arduino not an Orangutan. Both are based on the Atmel ATmega168 microcontroller but different form factor, different layout. Hmm ... Did I buy the wrong Xbee thing? Why was the shield thing the way to go? This click-to-buy option on web pages is starting to get me in trouble. I buy before I really know if it's the right solution. Hell, at least I got to practice my soldering skills.

The great thing about an Arduino shield is that it lines up with the sockets on the Arduino board and makes all the necessary electrical connection auto-magically.

The bad thing is that an Orangutan isn't the same form factor as an Arduino and that shield wasn't going to just line up and plug in. I need to connect the pins myself.

The best that I can tell, the Xbee really only needs 4 pins connected. Many other options but in the dirt simple mode, just these four:
  • +VCC
  • Ground
  • Din (Tx)
  • Dout (Rx)
The shield has a TLV2217 voltage regulator that takes the Orangutan's +5V and outputs a nice +3.3V for the Xbee. I knew that I wanted that shield for something. So, I need to power the shield with +5V but where? Where does the voltage get applied? Looking at the schematic, it was still not clear. The only place I see +5V is to the ICSP. Could that be it?

I posted a few forum questions at various boards and received the usual RTFM responses. Those are really helpful. I'm struggling, just have a question that I can't find the answer to anywhere, I really have read the flippin' manual and searched till I'm blue, and the experts don't help. Instead they write, "If you look at the pins on an arduino, you can see which pins get connected to what". Great, thanks much.

In the ICSP link above, the Tinker It Now dude says "connect the 5v only if you want your Arduino to power the target board". That was the first clue (thanks Tinker It Now) that I found about how a shield gets powered.

So I hook +5V to the shield's ICSP pin 2, GND to the shield's ICSP pin 6. Half way there.

What about Rx/Tx (Din/Dout)? What pins do they get hooked to? On an Arduino, digital pins 0/1 are Rx/Tx. Are they the same for an Orangutan? Pololu's excellent docs come to the rescue yet again. TTL-level communication are with pins PD0 (RX) and PD1 (TX).

But it can't be that easy, can it? After I hooked it up, I didn't seem to transmit. Something's wrong. Stupidity is what's wrong. Don't hook Rx to Rx and Tx to Tx. The Rx from Xbee goes to Tx on the Arduino/Orangutan. The Tx from Xbee goes to the Rx on the Arduino/Orangutan. That's better. Make the right connection and the damn thing works. Cool. What's next?