networking teensies

Status
Not open for further replies.

Kai_

Member
Hello

Looking for guidance on possible architectures. The goal is to instrument a 12m x 3m space with various sensors (voltage, various transducers, reed switches, etc).

It has to be wired solution, and I happen to be running power cables at the same time in a star network and so looking to mimic power distribution for synergy.

Don't anticipate there will be too much processing done by the teensies. It should mostly be reading ADCs, reading digital inputs and pushing the data out to wherever.

I think what I need is a small number of teensies at selected locations all running back to a central processor of some description. Currently thinking the topology is a star Ethernet running out of a multi-port hub. I then run node-red on a PC, plug into the hub and interrogate the teensies for info.

Ethernet was picked to reject noise as data cable is run parallel to power cables.

Can the same be done on USB / is it easier on USB / is there any other solutions? If possible, please point me to an existing teensy project so I can.... ah.. emulate.

Thanks
Kai
 
Hi yes, have considered it. The sensors are bunched up in low enough density that a single teensy can handle a single cluster. A single teensy can't handle an adjacent cluster largely because of the distance and number of dedicated cable cores required. I would have to amplify the analog signals, run them in dedicated pairs and lose benefits of a distributed architecture.

keep them coming :D
 
Ooh, yes, that will do, because longer runs of wires tend to capture noise and be fed to ADC.

Any ideas on how you interconnect Teensies? You can just use the serial ports available.
I tend to put some serial data headers so the receiving side can check where to start reading
(i.e. the 0xFF and 0x00 in a byte stream containing FF 00 xx xx xx xx...).
 
well your still limited by distance, unless you go with RS485 for uart, you'd still have to design a uart protocol for the data
ethernet, wifi, spi, i2c can make your life easier, distance, not so much
for distance you can go wifi, ethernet, rs485, even radio, but even there, radio needs protocol as well, and data filtering
 
@ Revalogics
currently thinking Ethernet. I've just found another thread here that says while teensy 3.6 has the hardware, the library is still alpha-ish. So I might have to rethink.
 
@tonton81
I'm very much for making my life easier, given the serial runs are relatively short. I would really really prefer if I didn't have to roll my own protocol as well.

I'm reading up on node-RED now, and it looks like a host PC can talk to arduinos via a USB emulating a serial connection. I'll hop over to node-RED forums and pilfer suitable info. And this way I don't have to deal with the TCP/IP implementation!

EDIT: Not a OSI model guru. I can tolerate implementing a CRC check on incoming data in the end-user application, but anything at a deeper layer is out of my skillset
 
Last edited:
on the contrary, TCP/IP protocol, at least on Wifi end, (havnt touched ethernet) transfers payloads without you writing any of your own protocol.

I gave an example in another thread of transferring 32 packets of 9 bytes, 288 bytes in 209ms (last test) from one ESP to another ESP, with a teensy 3.5 as the host. the beauty is the payloads are intact, and because it's TCP/IP, the data stays intact. Pretty sure the ethernet is implemented the same way as most of the time they use almost same commands as one another. although i am using 2 different uart protocols at the host end, based on payloads and events, the ease of wifi/ethernet/spi/i2c seem relaxing as theyre soo easy to control :)
 
wanted to close out thread and leave info for future reference.

likely to be going with a mini-PLC solution (not sure about posting other vendors here so won't do it). Modbus RTU interface in a star network back to a centralised host. Addressing of individual devices and error checking taken care of by modbus RTU protocol.

thanks for the ideas, cheers
Kai
 
I think what I need is a small number of teensies at selected locations all running back to a central processor of some description. Currently thinking the topology is a star Ethernet running out of a multi-port hub. I then run node-red on a PC, plug into the hub and interrogate the teensies for info.

That's the approach I would take as well. Inexpensive, off-the-shelf, standards-based, commodity components.

I don't know Node-Red so I'd use HTTP. But whatever you already know the best is what I'd recommend. There are plentiful solutions once are operating at the IP level.

Hardware-wise, look into using a Wiznet WIZ850io (preferred) or WIZ820io and an adapter board from PJRC compactly and inexpensively add TCP/IP. Works with Teensy LC, 3.0, 3.1, 3.2, 3.5 and 3.6

Would you care to share any more of the high-level details of your project. Just curious.
 
Status
Not open for further replies.
Back
Top