Sunday, October 29, 2017

Finding EV3dev IP address


EV3 is connected to internet via USB cable to laptop. 
Tested with :
Laptop: Ethernet plug-in connection to internet 
EV3 :    usb cable to laptop sharing laptop's internet

Use ssh to log into the EV3DEV  (id: robot password: maker)

Started with: Determine Your Private and Public IP Addresses from the Command Line but needed to replace eth0 with usb1

Displaying private IP addresses

Note: Host laptop has different private IP address

$ hostname -I
Result: 192.168.137.3

$ /sbin/ifconfig
Result: usb1      Link encap:Ethernet  HWaddr 22:16:53:51:62:2f
  inet addr:192.168.137.3  ...

$ /sbin/ifconfig usb1 | grep Mask
Result:  inet addr:192.168.137.3  Bcast:192.168.137.255  Mask:255.255.255.0 .....

$ ip addr show usb1
result: 
3: usb1: ....
    link/ether...
    inet 192.168.137.3/24 ....
    ....

$ ip addr show usb1 | grep 'inet ' | awk '{print $2}' | cut -f1 -d'/'
result: 192.168.137.3

Displaying the public IP address

Note: Host laptop has same public IP address

http://www.ifconfig.me  (etc)
[curl not installed on ev3dev]

$ wget -qO- ifconfig.me
search for ip_address 

Saturday, October 28, 2017

First look at Lego Water Pumps


How does a water fountain pump work?


Fountain Pumps. The pump is the unseen heart of your fountain. Submerged in the reservoir, the pump draws water into its housing, where an impeller (a water propeller spun by electricity) forces the water out through the pump's outflow fitting.

source: fountainfinder.com/fountain_pumps.htm


4diac task idea using Stepwise refinement

Task 1: Student builds own water pump and test as a fountain
  • Simple to build out of Lego parts in 1/2 hour or less as shown in short videos. Student can also pick how to build their impeller from examples or own ideas.
  • Any motor can be used, so will work for Raspberry Pi or any HW supporting a motor.
Task 2: Water goes into another container then...
    • measure height of water left to know when to stop
    • measure of water in new container to know when to stop
    • measure water rate of flow based on water delivered in specific time (or via water height)
Task 3:  Student ideas for different flow rates and start and stop when ???

Construction

Coming screen shots from videos to help with my first water pump construction try. 
  • All examples used Lego motors and Technic parts, but no Lego EV3 nor programming. 
  • No standardized task description or construction was found.
12/9/17 Simple pump working (repeatable and have videos to chose to post) BUT would like a stronger pump that pumps higher. Easier to put in an larger student project scenario.

1/4/18 update... Will try with a medium power fn motor just got since using EV3 motor it was hard to get enough power to pump the water very high. Will try MattD600 video model and instructions next. Didn't have parts for the propeller nor same kind of motor until now.

Video Examples

  • All examples used Lego motors and Technic parts
  • None use Lego EV3 nor any programming. 
  • Motor on top parallel to top of fountain
  • Water intake usually on bottom
    • So need small legs so water get underneath
  • Pipes are narrow (1-2 dots wide) to help force the water up
Lego Water pump video Link collection with notes

Lego (Technic) Water Pump Building Instructions


Lego (Technic) Water Pump - MOC 

Working Lego Centrifugal Water Pump (with instructions) [MattD600] Has parts and most detailed instructions. Explains how pump works well. 
 [1/4/18] Now have some parts needed for propeller didn't have before and can try flipping the physical motor set switch in application.

Lego water pump tutorial ... 
  • Motor mounts on top are very clear
  • Curved impeller housing
  • Bit chaotic as he forgot how he built it.
Lego water pump tutorial. pumps a lot of water
  • Design simple but good
    • impeller and housing are simple, but effective design
  • Explains details like when weighting is needed
Lego Water Pump V2
  • Different motor connection to impeller
  • Strong simple impeller with more than 3 blades
    • Note: His faster v3 impeller has 3 blades.
  • Very strong water flow
  • Less leakage if long solid pieces on side
Lego water pump tutorial (Pumps Alot Of Water!)
  • Shows building pipe in detail
Working Lego Centrifugal Water Pump (with instructions)
  • Another impeller idea
  • Complete building instructions

Education appropriate apps

Apps appropriate for education if:
  • Similar to real life industrial apps
  • Construction in Lego possible with reasonable amount of parts
  • Construction able to be moved
    • Extra plus if simple enough students can build
  • Possible with some HW and 4diac
  • Basic app can be improved some
So far....

++ Lego EV3 Model Color Sorter

Video:LEGO® MINDSTORMS® Education EV3 Color Sorter.
Program: Program with description.
Construction:  
 Needs EV3 basic core edu set and 2-5 hours to build (long for class)

+++ Lego Water Pump

Video: Many videos, nothing standardized. See separate exploratory post (coming) for links with notes.
Program: None, but student could be assigned to pump water from one container to another and stop when water at correct height or too low or test rate of flow.
Construction:  Simple enough students could build quickly and design own impeller

  • See videos for How Tos now
  • Needs regular Lego parts

+ Automated LEGO warehouse, AS-RS system

Video:of Automated LEGO warehouse, AS-RS system 
++-Program (s) : Realistic app, but program not shared, but could be replicated with each student group doing a part
+--Construction:  


  • +Not shared, but simple enough to be replicated from video. 
  • - Probably too many Lego parts needed to be feasible.

Lego EV3 pgm blks vs 4DIAC FBs

Compare 
  • Lego EV3 programming blocks apps from National Instruments (IEC 61311 based) 
  • to 4DIAC apps and IEC61499 FBs 
  1. General mapping of features to features
  2. Example mapping for EV3 Model Color Sorter program 
  3. Example equivalent 4diac app

General mapping of features to features

Summary:
  • Event actions 
    • Lego - Event action takes several blocks
      • Action until
      • Event timer trigger
      • Stop Action
    • 4diac - Event driven via event trigger to fb
  • Inputs
    • Lego - Connector at bottom of pgm blk with curve down
    • 4diac - Connector on left of FB
  • Outputs
    • Lego - Connector at bottom of pgm blk  with curve up
    • 4diac - Connector on right of FB
  • Loops
    • Lego - have event trigger test at beginning or end (or both)
    • 4diac - test is separate FB
Block Examples
coming soon

Examples 

Mapping (coming in future)


Restart and reorient 2017

After an extremely long break starting / hoping again to use 4DIAC.

This blog is still a good place for documenting not just any progress or experiments, but also details took to do whatever so repeatable. An idea may first appear in an fairly unstructured first exploration post. 


11/26 reoriented and moving on First Goals:

4DIAC-IDE

Installed in C:\Program Files (x86)\4DIAC-IDE_1.8.4_win32.x86_64
Status: 10/24/17 Downloaded, installed, opened
11/15/17 - Patch for spelling clean-up for 4DIAC website. Side track but learning specifics to contribute now like Gerrit and EGit.


Tutorials and Examples

    • Flip-Flop 
      • loca11/8/17
      • distributed 11/20/17 forte/fbrt HMI  11/26/17 RaspberryPi/ fbrt HMI
    • Examples systems
    • X +3 11/17/17
    • Boiler
      • 11/17 unknown types when download. Need to import or real problem?
    • Mech Press - PC 
      • 11/17 unknown types when download. Need to import or real problem?
    • Trafic - Beagle Bone Black
      • Will consider doing something similar on RPi
FORTE supported HW

1. Simulated on PC

2. Lego EV3 10/28-29 installed EV3DEV version of Debian (jessica) Raspbian

ev3dev Debian based  
Follow excellent directions here: http://www.ev3dev.org
  • Status 
    • 10/28/17: installed on SD card and booted
    • 10/29/17 Network connection and ssh
3. Raspberry Pi
Status: 11/13 Raspbian(Stretch) on RPi3 installed.
11/26 Ran distributed apps with PC HMI (FBRT) caused led to blink on Raspberry Pi and simulated LED on PC to blink in sync.
Side Projects [have own post]

1. Compare Lego EV3 programming blocks apps from National Instruments (IEC 61311 based)  to 4DIAC apps and IEC61499 FBs 
2. Find/evaluate Construction and app ideas suitable for education apps