CatBus-Collaborate

From ArduinoInfo
Jump to navigation Jump to search

COLLABORATION SPACE: BJK / NK / TK and Others?

NOTE: Menu Item BJK gets here. " DrBearEE " is a member and can edit..

LIST OF WIKI PAGES

NEW ONE [url=
http://shin-ajaran.blogspot.com/2014/12/noobs-guide-to-esp8266-with-arduino.html
][blue]HERE:[/blue][/url]
http://afterhoursengineering.net/blog/blog/2015/03/30/esp8266-low-cost-wifi-module-for-embedded-applications/
https://github.com/pulkin/esp8266-injection-example


ESP8266 based modules can be programmed in 4 or more ways:

  1. "Native" AT commands
  2. Direct new firmware developed with the Arduino IDE and new board definitions
  3. Reflash "NodeMCU" firmware. Then write in Lua script.
    1. http://randomnerdtutorials.com/esp8266-troubleshooting-guide/

  4. Miu Panel: Vendor reflashes 8266 with proprietary firmware DRMed

..

WEATHER STATION:

http://randomnerdtutorials.com/esp8266-wireless-weather-station-with-data-logging-to-excel/
new

** New Article **

Tame the beast: Ultra-Low Power #ESP8266 Thing


The ESP8266 is a single chip with a microcontroller (ARM, I think) and a complete WiFi interface. Call it "ESP" for short.

With a few external parts (including an external Flash memory for program code) you have a complete system that can "talk" on WiFi.

There are several kinds of ESP8266 boards out there.

Some provide the support components and bring out only the minimum serial bus, power, and a few control signals to an 8 pin header. This board includes a PCB antenna for the module, so it is ready to rock and roll with no external antenna. This allows a minimum cost board. These would include the Sparkfun WRL-13252 that I am using to test the ESP tech. I think this is what some call the ESP-01 configuration.

Rui Santos wrote the book (literally) on using this board. But he immediately reflashes it with firmware to run with Lua java script. You can buy the e-book here:
http://randomnerdtutorials.com/home-automation-using-esp8266/

Thanks to him for great basic info, like this wiring diagram that nobody else thought to include...

ESP8266 Pinout.png
ESP-01 pinout, viewed from component side
pins are sticking down away from you in this picture.

Other boards bring out more of the pins on the micro, to allow more I/O in autonomous applications. There is a port of the Arduino bootloader and IDE for the ESP. Marko Schwartz wrote the e-books on THAT.

The Yourduino.com RoboRED version of the Arduino is uniquely suited to operation with the ESP8266. For one thing, the RoboRED male pin headers make it easy to wire over to the male pin header on the ESP8266 module with just some female-female break away jumper wires.

More importantly, the RoboRED is an ideal host for an ESP because the ESP is a 3.3V only device, and it draws significant current in operation. The RoboRED has a very capable on-board power regulator, and can be switched to run at 3.3 V. With the RobRED switched to 3.3 V, its onboard regulator can operate the ESP8266 just fine.

So...speaking of wired up, here is the plan:

"Wall Wart" provides 5 V at 1 Amp maximum.
to
RoboRED (switch set to 3.3 V)
to Wires to the ESP-01:
"VCC" 3.3 V power.
"GND" Common Ground
"RX" Receive Data (Received by the ESP, so transmitted by host)
"TX" Transmit Data (Transmitted by the ESP, so received by host)
"RESET" (Active low reset, pull up to VCC to run, ground to force reset)
"GPIO0" is used as the Run / Program pin by the standard firmware.
Must be pulled high for normal operation, pull low to load new code at reset.
"GPIO2" free GPIO. Pulled up for now.
"CH_PD" is the Power Down signal, normally pulled up to VCC to run from reset. Tie to ground to put the module to sleep. Not clear yet how to sequence wake up. There are examples that use the internal RTC to wake the chip by wiring a GPIO back to the reset pin. Tricky.

For reliable operation, I think decoupling capacitor and reservoir capacitors are needed from VCC to GND right at the module pins.
I've added decoupling and reservoir capacitors to my setup because they are cheap insurance against the flakey operation that some people have reported with simpler but insufficient power supplies. YMMV but I like to concentrate on a cool application and not worry about dumb stuff like power supplies after its wired up.

Here is the link to the expressif docs for the AT command set:
http://bbs.espressif.com/download/file.php?id=256&sid=398301f84155a628a3a39725226e7379

copied to dropbox at:
C:\Dropbox\ProductDevelopment\ESP8266\AT command docs\


AT firmware boots from hardware reset or power up and dumps bootloaer diagnostics at
IKYN 76800 bps.


load 0x40100000, len 25052, room 16
tail 12
chksum 0x0b
ho 0 tail 12 room 4
load 0x3ffe8000, len 3312, room 12
tail 4
�chksum 0x53
load 0x3ffe8cf0, len 6576, room 4
tail 12
chksum 0x0d
csum 0x0d

It then boots the AT command processing, and switches baud rates. This one is at 9600 bps
It looks like this:
‚’ò—©��‡�>‚«
�>Iƒ��CŽ›¶��øš‡�Ò’ô�>I�ü
[Vendor:www.ai-thinker.com Version:0.9.2.4]

ready
sent AT
got
OK


More ESP8266 LINKS

http://williamdurand.fr/2015/03/17/playing-with-a-esp8266-wifi-module/from
http://www.esp8266.com/wiki/doku.php?id=getting-started-with-the-esp8266
http://bbs.espressif.com/ Their BBS and How-To
http://bbs.espressif.com/viewtopic.php?f=67&t=821 newbies
http://bbs.espressif.com/viewtopic.php?f=51&t=1022 ESP AT commands




SOME YourDuino 2DO for Terry:

  • LED 'brick panel' plugs into Arduino standard female pins, has 13? LEDs
  • BlueTooth Modules
  • WiFi Modules


FLIGHT development: Info, Links, Discussion


Looking for 2 or 3 types of vehicles:

  1. Large trainer fixed-wing, crashable. Electric drive
  2. Medium-Large fixed wing: Photo / FirstPersonView capable
  3. MultiCopter with Photo capability


Possible Suppliers: (Need to check reputation etc)
Shenzhen Suppliers we use / know about:


Discussion/Info Sites:

Video footage from the IEEE R & A meetup: Flying Unmanned Aircraft in North Carolina Today
Part 1 http://youtu.be/q_4tHKiJT1o
Part 2 http://youtu.be/TNzHWguju24
Part 3 http://youtu.be/tnt--LJl3AA

Some links: *(Random, email T got etc)
http://p6trc.emv2.com/HM?a=FtX7Cqlkt1Fw8SA9MKJdCQjnGHxKLJ3yKwjtS5kGaPGr0bBhOG5mpqVsje_HhdApYkqa




CatBus Project Section:

Newest First, Approximately
BK:
What about driving this (or any) shield from a Mega? DO we just assume we'll patch PB2,3,4,5 (from the ICSP header) and power from the Mega?

on the Mega, ICSP connector is the same but maps to different pins

BK:

Driving the CatBus

We want to be able to use the SPI hardware assist to drive the CatBus. SO we have to connect to the SPI pins of the host Arduino:
Arduino Signal Name
Description
CatBus Signal
Micro Pin,
Arduino Pin
ICSP
connector
SPI SCLK
Serial Clock
Serial Clock
PB5,
13
ICSP 3
SPI MISO
Data,
Master In, Slave Out
Serial Data Out
of Arduino
PB4,
12
ICSP 1
SPI MOSI
Data,
Master Out, Slave In.
Serial Data In
into Arduino
PB3,
11
ICSP 4
SPI SS
Slave Select
Strobe
PB2,
10
n/a
Ground
Ground
Ground
Power 6 & 7
ICSP 6
Arduino Power

+5
Power 2 & 5
ICSP 2
BK:



POWER SCENARIOS (Terry's understanding 5/30/13)


BUS POWER:


  • Power Source Jumper (2-3)
  • CatBus AUXPOWERIN is 12V or maybe 9V Passes thru to AUXPOWER out
  • Local 5V regulator
  • I/O groups using LOCAL+5


EXTRA 5V CURRENT from local 5V supply:


  • POWER_JACK fed from local 5V power supply, probably 1A
  • I/O Groups use JACKPOWER
  • CatBus AUXPOWERIN feeds 5V regulator for LOCAL+5 Passes to AUXPOWER out




ORIGIN or MIDPOINT AUX POWER FEED:


  • POWER_JACK from external +12V supply, probably 1A
  • Power Source Jumper (1-2)
  • AUXPOWER fed from POWER_JACK, passes downstream via AUXPOWER out
  • I/O Groups use LOCAL+5




QUESTION: What is LM2931 output current rating at AUXPOWERIN 12V, 9V ??



BK:

ANSWER: 100 mA max output current, independent of Vin. Low dropout down to 6 V in to hold 5 V out, 26 V max input.



This is the commonly used regulator in Arduino stuff because it's low dropout, reverse protected, and input transient protected to 60 V. Higher current regulators exist in this package, but we start to thermal regulate anyhow. 9 V to 5 V at 100 mA is (of course) 400 mW. But 12 to 5 at 100 mA is 1.2 W. At that point you want to go to switchers, so the usual answer is to use an off line switcher wall wart at the desired output voltage (like 6 V, 1 A). Hence the jack power. Then the 2950 is only making local 5V for the logic.

Power on the CatBus

For power wiring, we think that we should have the power jack be able to power everything on a given CatBus board and everything downstream as well. So we need a jumper to power the local regulator and downstream Aux power from either 1) the jack power 2) the upstream Aux power. This also allows mixed voltage systems, where the CatBus board has for example 12 V jack power even when the Auxpower upstream is only 9 V.

We already have power jumpers for feeding the power pin of each three-pin input or output from either the local +5 or the local aux power.


Power up reset

We are close, but we need to have the outputs power up in a safe state, equivalent to what would happen on the arduino itself. That means we should use the '595 and leave the outputs tristated until the data has been initialized. If we use a flip-flop to remember whether or not the register has been updated since power up, its output controls the tristate control. The first valid strobe EDGE will enable the outputs.

We only need one bit. SN74LVC1G374 is an edge triggered D latch, in the small 1 gate package.
DigiKey part number 296-18777-2-ND

Need the latch to power up in a known state which we can then toggle with the strobe.

Form factor:

It would be nice if the CatBus board was in shield format, that is, the board drops onto the Arduino, but doesn't tie up very many pins (only the ones that drive the CatBus), and other shields can stack with it.  There is only one kind of CatBus board, the "head" is directly driven from Arduino pins, but is the same board as any Remote CatBus board.

More about form factor: We want the ins and outs be laid out in GVS triplets like on Sensor Shields.

It would be nice to have the CatBus board plug onto either our Arduino Uno or a Mega without jumper cables, if possible. We need to connect to the host Arduino's SPI CLK, MISO, MOSI, SS (Slave select) to drive CatBus Strobe, and Ground. These drive into the same points as the CatBus Input side Cat6 jack. Not all the signals are available on the ICSP connector.

So the CatBus board needs to be similar form factor to a sensor shield.

Output Shift Register:
NOs: ‘595 has tristate outputs (not needed)
‘164 has no output latch
‘4015 is two 4 bit sections and has no serial out and no latch

‘594 has direct outputs
TI: SN74 HC 594 D or SN74 AHC 594 D
(Suffix –T or –R is tube or reel put up )
Datasheet at: http://www.ti.com/lit/ds/symlink/sn74hc594.pdf
NXP: 74 AHC 594 D,118
..are in SOIC 3.9 mm wide
In reel quantities, about $0.20 each at DK.

So, HC or AHC 594 it is.


Input Shift Registers:
YES:
‘589 has tristate serial out (but not needed)
‘165 is deeply multisourced:
TI: SN74HC165DR
Datasheet: http://www.ti.com/lit/ds/symlink/sn74hc165.pdf
NXP: 74HC165D,653
ON Semi: MC74HC165ADR2G

HC165 it is.


Bus Driver / Line drivers


HC14, LS14, are line RECIEVERs, with schmitt trigger inputs (very important). However, they are not line drivers (LS especially have weak pull up)
Also..
'125 or '126 might work, they have schmitt trigger inputs and are line driver outs, but have tristate outputs we don't need. They are non-inverting which makes the opposite sense strobes on 165 and 595 a problem.

LVC14 or AC14 or ACT14 ARE high current drivers. (AC14 Looks good for capacitive loads)
AC is 5 V CMOS family with supply- compliant input thresholds.

“CatBus” aka Broken Ring Bus aka MicroNet


[/file/view/Cat6.pdf/427547096/Cat6.pdf Cat6.pdf]
[/file/view/Cat6.pdf/427547096/Cat6.pdf Cat6.pdf]
* [/file/detail/Cat6.pdf Details] * [/file/view/Cat6.pdf/427547096/Cat6.pdf Download] * 52 KB

Now let’s assign the pins.

Pin
Color (Cat6)
Twist
Function
1
White / Green
1 with 2
Ground
2
Green
Serial Shift Clock (SCK)
3
White / Orange
with 6
Serial Data Out (MOSI)
4
Blue
4 with 5
1-wire Data / parasite power
5
White / Blue
1-wire Return, Ground
6
Orange
with 3
Serial Data In (MISO)
7
White / Brown
7 with 8
Aux Power (+12 or +5)
8
Brown
Serial I/O Data Strobe


Connectors:

(Prices are in Y (RMB) $ = RMB * 0.16 )
RJ45: Several from Sindh Supplier
external image T1B4JtXexDXXX3b1sV_020313.jpg_310x310.jpg
RJ45 WITH LEDs

Seem similar / same board layout as Amphenol RJHSE-5481
http://www.digikey.com/product-detail/en/RJHSE-5481/RJHSE-5481-ND/1242705

CatBus ??

Google Search does not find a data bus named CatBus referred to.. "CATBUS" often refers to some physical bus people transport stuff. http://CatBus.Info available..

BK:
Yeah, or this:
For those that don’t know, Catbus is a character in the 1988 Japanese anime film, My Neighbor Totoro. Catbus is a cat with a bus on its back. Mice with glowing eyes serve as headlights atop the bus. The bus interior is furry.

totorocatbus

totorocatbus



BK: But all right. CatBus it is. Logo is a bus, with cat with its head out the window like a dog. :)


"Bus Pirate" being sent to DrBear. Here's a review:
http://www.edn.com/electronics-blogs/dev-monkey-blog/4411574/Bus-Pirate-Module-Tests-and-Simulates-Serial-Devices

Bus pirate arrived (arr!). Will try it when we have a Cat bus wired

UPDATE: Breadboarded circuit and wrote test Sketch: LINK HERE:


More on SPI:

NOTES 4/5/13 RE: SPI for Serial Bus: TK
http://arduino.cc/en/Reference/SPI
http://en.wikipedia.org/wiki/SPI_bus


- SPI is considered to be a "ring"with full duplex data transfer. It simultaneously sends and receives serial data from an "SPI Device" (which our CatBus system is??)
- Code is like: <received byte> SPI.transfer(<Byte to Send>) //Once for each byte

- Is SPI essentially Static? Speed agnostic up to some (high) max??
most SPI devices will operate down to DC, and specify some max usually around 1 MHz. For us, getting the bus capacitance to swing, and the prevent slew between clock and data from messing the data, we can use any SPI device I've seen.

-So, why can't we 'include' other SPI devices in our ring? They could be on a similar PCB, with LS14 buffers. There are LOTS of choices...

SPI slaves don't echo the data bits on MOSI to MISO. So you can't make a ring of standard SPI slaves.

But you can use the SPI drivers in the Arduino to control a shift-register ring.

And we can use the aux pins on the bus to run a SPI slave.

- Do we have any samples of MicroChip or NXT or ?? SPI I/O expanders?? Other chips?

From Nick Gammon: Very nice info, schematics etc..
Good SPI Info:
Good HC165 Info
Good HC595 Info:

http://tronixstuff.wordpress.com/2011/05/13/tutorial-arduino-and-the-spi-bus/

Interesting: MicroChip USB to SPI breakout board. The CatBus could also be driven from a PC!
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en556988&part=ADM00421

SPI, Devices, Manufacturers: http://www.mct.net/faq/spi.html



CONNECTIONS to Arduino or Mega: (NOTE: The ICSP (In Circuit Serial Programming) connector has everything we probably need.
external image ArduinoUno_R3_Pinouts.png
external image ArduinoMega2560_SPI_pins.jpg





[/file/view/Arduino%20Bricks%20Design.docx/410089606/Arduino%20Bricks%20Design.docx Arduino Bricks Design.docx]
[/file/view/Arduino%20Bricks%20Design.docx/410089606/Arduino%20Bricks%20Design.docx Arduino Bricks Design.docx]
  • [/file/detail/Arduino%20Bricks%20Design.docx Details]
  • [/file/view/Arduino%20Bricks%20Design.docx/410089606/Arduino%20Bricks%20Design.docx Download]
  • 157 KB




1-Wire Distributed System Notes:


EXAMPLE DS18B20 ARDUINO SOFTWARE: See Dropbox\ProductDevelopment\1-WireDevelopment

LIST OF 1-Wire DEVICES


OH: Another 1-wire Thermometer!
http://datasheets.maximintegrated.com/en/ds/DS28EA00.pdf


Latest Application Notes - 1-Wire Devices



DS2408===1-Wire 8-Channel Addressable Switch 8-Channel, Bidirectional Port Expander AKA "8-bit I/O Port" useable in multidrop configuration..===
||

DS2405 Addressable Switch

However, "The DS2405 is no longer available. The 1-Wire DS2413 with 2-CH GPIO functionality is recommended as a replacement."
So:

DS2413 Addressable Switch

Which has two open drain I/O pins.

DS2406 is the same as the 2413 plus 1 K of EPROM (OTP), and also has power input bonded out on some packages.

Guidelines for Reliable Long Line 1-Wire® Networks


BEST 1-WIRE LIBRARIES:

BASIC 1-WIRE Library
DS18B20 Library



RJ45pinout.jpg

CABLING / POE Considerations:


One cabling example:

  • The Pins 3+6 could be "Aux" and not necessarily power. Could be used for DHT11/DHT22 etc.
  • Must be some low-cost 12V to 5V modules for remote power if needed. Maybe isolated?
  • ?? What current could be available on the 5V and 12V pairs


POE Standards:

POE-standards.jpg






Cabling
Use Standard pre-made / precrimped Cat-anything cables.

Category 5 cable uses 24 AWG conductors, which can safely carry 360 mA at 50 V according to the latest TIA ruling.
Voltage drop in 100 foot cable (round trip) at 24 AWG for 400 mA is 2.11 V.

This can be somewhat alleviated by the use of Category 6 cable which uses 23 AWG conductors.
Voltage drop in 100 foot cable (round trip) at 23 AWG for 400 mA is 1.72 V.

mating jack on PCB could be:
FCI 8p8c mod jack at DigiKey

external image 54602-908LF.jpg


ELECTRONIC BRICKS/PRODUCTS IDEAS / INFO:


SEEN IN THE MARKETPLACE:
http://www.ebay.co.uk/itm/50A-100A-150A-200A-Bi-Uni-AC-DC-Current-Sensor-Module-arduino-compatible-/110894073072?pt=LH_DefaultDomain_0&var=&hash=item19d1cd44f0

RS485 Node for Sensors:
http://www.dfrobot.com/index.php?route=product/product&product_id=886#.UWVIWbV-rmd
CheapDuino:
http://www.dfrobot.com/index.php?route=product/product&path=48&product_id=899#.UWVMmbV-rmc




OTHER LINKS:
http://www.highcharts.com/

image001.jpg