Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 12 of 12

Thread: Best combination of components to make a great IoT-Device for beginner-students

  1. #1
    Member
    Join Date
    Jan 2013
    Location
    Zürich, Switzerland
    Posts
    86

    Best combination of components to make a great IoT-Device for beginner-students

    Hi Paul, hi everybody

    I have been teaching begginers classes called «web of things / robotics» for the last two years using Arduino Yuns. I'm teaching 18/19 year old students. I'm not very happy with the yun, because it is badly and inconsistently documented and the AR9331 with it's bridge is just really unusable most of the time because it is way too slow and the 32U4 has to little of almost everything. However, I actually liked the concept of having an Arduino-like Processor together with a connected linux by my side.

    I'm therefore looking for a better combination of a good microprocessor and something with internet capability. I'm quite into teensies, so I thought to ask here. What do you think is the best combination of a teensy (for example Teensy 3.5) and the wireless internet?

    Thank you for your thoughts,
    Dani

  2. #2
    Member
    Join Date
    Jan 2013
    Location
    Zürich, Switzerland
    Posts
    86
    For the record: At the moment, my favorite alternative to the Arduino Yun is a Teensy 3.5 with a Raspberry Pi 3 (because of the included WIFI), connected over Serial1 using Mattias Schlenkers «nuage» (http://www.arduino-hausautomation.de/nuage/) and Paul Stoffregens generalized Bridge (https://github.com/PaulStoffregen/Bridge). That setup works like the Yun – the only drawback is, that the Teensy cannot be programmed over the Arduino IDE/Serial1 (Paul: Is that so?); but that isn't a biggie in my opinion.
    Dani
    Click image for larger version. 

Name:	nuage_setup_rpi3_teensy31_steckplatine.jpg 
Views:	277 
Size:	243.4 KB 
ID:	9628

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,089
    Teensy programming is over USB - the Pi could do that. My look at getting WiFi to a Teensy was with the ESP8266. Cheap and small and Arduino programmable for WiFi - WebServer and some data storage or extra processing power included.

  4. #4
    Member
    Join Date
    Jan 2013
    Location
    Zürich, Switzerland
    Posts
    86
    Thanks for mentioning the ESP8266 – I like that one too – bot only for certain applications. What I like about the setup with the Pi ist the ability to use a real webserver and the Bridge which includes the JSON data storage, the mailbox, the ability to fire shellscripts, use wget or curl, sqlite etc ... so for a project that actually has to be accessed over a complex website or has to be able to process complex data from the web, I like the Pi-setup better, because I can use the to me well known command line tools.

  5. #5
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,938
    There will be better and/or cheaper options but for teaching suspect the Pi/Teensy pairing may give the most robustness and 'googlability' for a pleasant experience for all. And nothing forces you to keep using the two parts together later.

    On option to look at is as defragster noted it is possible to load teensy hex files from a pi. Unsure if the full arduino is yet a thing on pi to actually compile (Pi2 I believe lacked horse power, pi 3 I think is 'can but badly') but there is the command line loader
    https://www.pjrc.com/teensy/loader_cli.html
    Which would allow updating of the paired Teensy from the Pi in a remote location if required (with some futzing to compile and then move the file first). Would also potentially allow debug messages to be visible on usb serial while the bridge ran on the hardware serial, so initial work with connected PC could see them, then once the Teensy side was locked down plug it into the Pi in case you needed to check edge cases or whatever.

    One thing to watch in this rig is gnds, since it's not guaranteed that the PC connected to the Teensy will have the same ground as whatever PSU is feeding the Pi. Some voltage measurements before plugging things together may be wise.

  6. #6
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,574
    Yes you can build on the PI. Might not be as fast as on a high end PC, but then again probably faster than, building it on a PC, setup some link to download the hex to the RPI to run something to program the Teensy... Also again I know some of us our a bit spoiled. It probably compiles a lot faster on the RPI3 than I used to program native stuff for IBM PC back in the 386 days...

    Also now the Arduino Linux has the ability to build things without the GUI. I have verified I could build a Teensy program on I believe a RPI3 using the command line. It worked all of the way up to Teensy loader failing as it did not have the GUI available. Probably not hard to edit the Arduino setup to try to use a different Teensy loader... Or would be great if Teensy.exe could do it for you...

  7. #7
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    4,090

    Cool

    One concern about the Pi3 is it tends to need a lot of power (5v/2.5A). If you want your IoT to be more portable, it may make sense to go for a slower Pi that requires less power (A+ or Zero).


    I tend to like the Raspberry Pi Zero, but often times these are hard to come by, particularly if you want to order more than one. If you have a local microcenter, they seem to get stock fairly frequently. If you go for the Pi Zero, you can get USB hubs that attach directly to the Pi Zero, including this one that adds wifi and bluetooth:


    I had gotten a previous version with just wifi, and I had problems with my local setup. Since I don't need bluetooth and have several of the wifi USB dongles laying around, I went back and just got a 4 port USB hub, and used a separate dongle. However, I see there are now various fixes in the support site:


    For the larger Pis (B+, 2.0, 3.0), the Adafruit Perma-Proto Hat is about the right size to attach a Teensy 3.2 or LC:


    For movement, etc. consider the prop shield with motion sensors with a Teensy 3.2:

  8. #8
    Member
    Join Date
    Jan 2013
    Location
    Zürich, Switzerland
    Posts
    86
    Michael, thank you very much for your detailed ideas – I just ordered some of them to give them a try.

  9. #9
    Senior Member
    Join Date
    Jan 2014
    Posts
    189
    We have found this to work with serial link to teensy - and it is very cost effective.

    C.H.I.P. https://getchip.com/

    Pretty impressive: 1GHz processor, wifi, bluetooth, 4Gig storage(no sd card required), HDMI (with optional adapter), lipo chargerand it cost $9.
    Its big brother C.H.I.P pro cost $16. Both run full Linux.

  10. #10
    Member
    Join Date
    Jan 2013
    Location
    Zürich, Switzerland
    Posts
    86
    Quote Originally Posted by RichardFerraro View Post
    We have found this to work with serial link to teensy.
    Does the Linux-side offer any services to easily access Key/Value-DB's or processes like the Arduino-Yun Bridge does?

  11. #11
    Senior Member
    Join Date
    Jan 2014
    Posts
    189
    I am not using it so I can't say from experience. Looking at the Yun, it's appears to run some type of Linux distribution, which the C. H. I. P. (what a horrible name) does as well. So yes it appears so.

  12. #12
    Just a use case I am working on....

    Suppose you just want data over Serial1 why not use Modbus? Leave the USB programming ports connected between the Raspberry and the Pi3. You can then run debug and download with the IDE on the USB locally. and use Serial 1 at runtime for data??

    I want to put this ETK on the PI for remote HMI. Still doing programming at the RPI3 locally though.
    https://skkynet.com/etk/
    With file services you should be able to program remotely and ftp the binary to the local RPI. I think there is a script to download binaries and is the rub that it expects the screen portion to be active during download??

    Idunno.

    I should get the ETK Next week.
    A lighter alternative would be to put the ETK DIRECTLY on the AR9331. That would be low power, but no IDE local or HMI. forgot to mention that I will run the WebHMI on the Raspberry too at run-time reflection of cloud HMI...we'll see how that dog crawls.

    This will be done on a carrier board. and I'll make a new one to carry just the Teensy and the RPI header, or a AR9331, or a Particle BORON. Currently the Electron is on board connected to the TEENSY3.6 on SPI1 for Data. the Wiznet is on the other SPI for hard realtime Ethernet.
    Last edited by 1bit; 06-02-2018 at 05:34 PM. Reason: I can't type

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •