Scale-Up your Tevo Tarantula 3D printer from a basic to an advanced setup

tarantula.jpgThis post is an upgrade guide for improving a TEVO Tarantula 3D printer both in its precision in order to produce better prints as in its usability in order to provide convenience to its usage.

Let’s start with the basics as why the Tarantula model was selected. There are currently many 3D Printers available on the market which might be more precise and usable than the tarantula model. In fact, Tarantula is an assemble-it-yourself 3d printer when there are ever pre-assembled 3d printers capable to produce prints out of the box. So what does it make this model worthy of attention? As it was stated in another one of my posts about how to maintain this printer, from the one side, the benefit of being a significantly less expensive printer to purchase and from the other, once properly set up, to become a very precise system, is an essential trade-off and one of the reasons many makers have selected it. Another reason is that since it is an assembled model, it can be maintained, customised and upgraded which is a feature that pre-assembled printers may prevent as they arrive in the form of a more complete and protected product.

How is an assemble-it-yourself printer being upgraded?

The benefit of assembled 3d printers, from a system’s perspective, is that they are literally self-upgraded! In more detail, a 3d printer may be used to print parts which may be used to upgrade the 3d printer itself! Currently, there is a large community of makers who contribute to this kind of 3d printer models, with upgrade parts,  and host their designs in online databases for 3D printed models as:

https://www.thingiverse.com/ and

https://www.myminifactory.com/

The benefit of having such a community driven interest and contribution is that in most cases a person may find a ready to be printed object which already solves a problem someone else previously came across.

How is this guide useful?

From all of these parts, some of them are essential to the overall printer’s setup while others may not produce a significant impact, some may be faster to be printed and have an immediate effect while others may be important but may require more effort and might not be the best option for a given moment. This guide acts as a guideline for someone who just got a new Tarantula with the goal to spare him from getting lost to all of the available parts and strategically increase the system’s precision and usability from a fast yet effective route. In other words, in each step, the guide takes into account factors as the current system’s setup, its weak spots and its needs!

Scale-Up!

1. Adjustable Belt Tensioner/Tightener and Belt Tie (Tevo Tarantula) – precision

ae5fb61ff83eb72fcf3b0c8108a35f14_preview_featured

https://www.thingiverse.com/thing:1780636

The first printer’s need is to tighten the X and Y belts. By tightening the belts the printing precision is increased. This ingenious piece is as small as it can be and still provides the required precision needed. One for the Y-axis may be printed as well!

this is a: fast print – to be later replaced

2. Tevo Tarantula X Axis Idler – precision

d295d24e796f7e2c35c5510b9ec4a722_preview_featured

https://www.thingiverse.com/thing:2418924

From the printer’s setup, it may be observed that the X axis has loose belt wheels with no support from the opposite side, this great part is fast to be printed and provides the desired solution for this problem until something more precise but with more printing effort is printed.

this is a: fast print – to be later replaced

3. Tevo Tarantula in front Z axis endstop holder – precision/usability

c6fda24808d5607db144f7cb56dc840f_preview_featuredhttps://www.thingiverse.com/thing:2587618

This part, as the previous ones, is fast to be printed, yet very effective. It’s goal is to bring the z-endstop in the front of the setup in order to increase its usability when calibrated but that’s not all, in addition, it increases the endstop’s precision as now a screw may be rotated to provide far grater precision when adjusting the z-axis home level height.

this is a: fast print – is not to be replaced

4. Tevo Tarantula bed level knob – precision/usability

https://www.thingiverse.com/thing:2330042 16108e3ad168db96001e2fc9554fe5c9_preview_featured

The specific knobs were selected over others as they have a grater radius. In circular motion the bigger the radius, the greater the precision and thanks to the upgrades so far as shown in the guide, the knobs may be printed in great precision!

this is a: fast print – is not to be replaced

5. Z-Axis Stepper Bracket for TEVO Tarantula – precision/protection

https://www.thingiverse.com/td7017b02c0072dcc0bb3c80b00bbfa97_preview_featuredhing:2269993

The next piece is for the z-axis as the original one is not very sturdy, shakes a lot which is something that reduces precision and may easily break in case of a non-responding z-endpoint. The particular piece was selected due to its great design which provides support from edge-to-edge!

this is a: slow print – is not to be replaced

6. Belt tensioner pulley for Tevo Tarantula

https://www.thingiverse.com/thing:1704100 a1725e3c201705b0daaa4205dbdcdb33_preview_featured

As the previous step, this phase is slow and needs five parts to be printed but produces an effective solution for adjusting the Y belt. From now on this piece may give a millimetre scale precision when setting the Y belt.

this is a: slow print – is not to be replaced

7. A Sturdy Simple Spool Holder – usability

https://www.myminifactory.com/object/3d-a_sturdyprint-a-sturdy-simple-spool-holder-43701

Up until now there wasn’t any support for the filament’s holder and it was let to the user to improvise and create a spool holder himself! This piece may provide the ability to easily manage filament cylinders and may give some elegance to the setup!

this is a: slow print – is not to be replaced

8. X Belt tensioner for Tevo Tarantula0d5b1c4c7f720f698946c7f6ab08f687_preview_featured

https://www.thingiverse.com/thing:1730521

Similarly with the Y belt tensioner usage, this part tensions the X axis. The first two parts did their work up until now and its time for them to be stored for fail-safe!

this is a: slow print – is not to be replaced

9. Enclosure for TEVO tarantula display – usability/protection

https://www.thingiverse.com/thing:1878931 eb272b9b4f7fe9b3fd1624e46c04a9f2_preview_featured

So far, the LCD’s transparent case may not be best suited to isolate and protect the LCD case. This model may just satisfy this need and allow the user to properly interact with the controller.

this is a: slow print – is not to be replaced

10. Wooden surface with shock absorbers and handles – precision/protection/usability

One wooden surface may be used in order to mount the 3d printer over it, and thus, to make it become more shock resistant as well as to easily be carried around. The surface can be 64x64cm with a thickness which should be between 1 and 1.5cm, 1.2 might be a good value as a thick surface may significantly increase the total weight while a thin one might easily break! In addition, metal handles may be placed left and right of the surface to lift the platform while 8-12 rubber bumper feet may be placed below the surface to absorb shock.

Secure the 3D Printer on the surface by using the following parts

XY Squareness corner for Tevo Tarantula 3D Printer74ce812a49e40a2ab8d750493b142e2f_preview_featured

https://www.thingiverse.com/thing:1748591

this is a: fast print – is not to be replaced

Corner Brackets For System20 2020 / 2040 Extrusion

https://www.thingiverse.com/thing:2841415

this is a: fast print – is not to be replaced

Tevo Tarantula bottom-left brackets

https://www.thingiverse.com/thing:2611549

this is a: fast print – is not to be replaced

The above models may be used to secure the 3d printer on the surface. This step might seem a bit troublesome but may significantly increase the precision as well.

11. Tevo Tarantula Power Supply Covers – protection/usability

https://www.thingiverse.com/thing:2365003 20180225_130144

The last piece would be to secure the power supply to the wooden surface. The produced outcome will both satisfy the need for protection against an electric shock and make the 3d printer totally portable. After this step, the user will be able to conveniently move the printer around!

By this step, Tarantula will be much more precise, portable and usable. This was the list hope you liked it!

12. A second detachable surface on top of the heating bed

Sometimes to remove a single finished object may require a significant effort. To have one detachable surface may be more practical while it may protect the bed from accidents while removing it. When choosing a second surface it must be kept in mind that it should be heat conductive, as aluminum, which is a good choice while a surface from wood of plastic, as seen frequently on the web, may not be the best alternative!

Reaching this step you may find your Tarantula to be much more precise, portable and usable. This was the list hope you liked it!

This is my TEVO Tarantula so far where most of the above parts were used!

20180505_142256_min

 

Lessons learned from TEVO Tarantula

At this point I believe this 3D Printer model has reached the highest of its potential. In other words, further upgrading it means to actually change it to something entirely different. For this reason, the final weak spots may serve as an advise for other 3d printer models to be aware of!

The first lesson is about bars with a single mount point, when a bar is hooked only form one side like the corners on the base of the Tarantula, similarly with other models as the CR-10 and Black Widow, no matter how strong a corner is, the bar may demonstrate angle deviation on its other edge!tarantula_angles.jpg

To effectively solve this problem the best design for a 3D printer, by my point of view, is a cubic grid where all the moving parts are inside as the following setup shows.

cube.jpg

 

 

 

In addition, if uniform temperature is needed for a 3d print, a cube may serve as a grid where surfaces may be attached to cover the inner space in order to trap heating, if it’s taken into account that all the parts are inside the cubic setup and it’s allowed to close.

pulleys_over_extrusion

 

The next observation is about the problems related with the X and Y axis movement. The concept of bearings which guide the moving parts over extrusion profiles has some serious negatives. The first one is that the setup may be easily loosen by the passage of time which creates wobbling, decreases performance and requires tuning once now and then. In addition, this kind of setup requires a lot of space and many pieces: 4 bearing cylinders, one bracket to hold them and one bar to guide the movement. A far better alternative to move a surface would be to have two linear rails with cylinder rods.

linear_rail_cylinder

By using these type of rails, the movement is totally guided while friction is significantly reduced!

Regarding the extruder, there are many solutions available on the web which present over-weighted extruders with lots of fans over them, for me having all this setup was not essential. Having one fan was enough to cool the parts from heat, on the other end, cooling the filament on its exit point might result into better 3d prints with no support but may also prevent the filament from properly sticking together with the already printed surface, as well as, prevent the smoothing effect when the nozzle touches an uneven printed ‘hilt’ on the surface!

 

 

 

Maintain and repair your TEVO Tarantula 3D printer for the next 200 years!

Hello, I’ve decided to make this page in order to give the advantage to individual makers who have bought a TEVO Tarantula 3D printer to be able to maintain, repair and restore it in the future in cases of broken or burnt parts by giving   insight both in software and on hardware specifications.

Why have I selected the TEVO Tarantula?

The killing argument here is that Tarantula is an assemble-it-yourself printer which can be bought in a fairly lower price compared to other 3d printers on the market in combination with that it can be scaled-up in precision/performance by improving its setup with new parts! In other words you have a good starting basis to learn 3d printing and you may gradually improve your setup as you go on!

The next argument is indirectly related with the 3d printer and it has to do with the taxes applied by the post offices. In some countries, an extra importing fee is applied when importing goods from other countries relative to the imported product’s price when they pass a limit ex. 100, therefore buying a printer worth of 200 may result in paying 300 on the post office! On the other hand, buying individual parts to upgrade your printer may result into reducing post-office taxes as they may require a lower price. Buying a good 3d printer basis and then upgrading it may be better suited rather than buying a ready-assembled and far more expensive 3d printer.

Which are the negatives concerning Tarantula’s service?

Tarantula’s company, TEVO, may often sometimes refrain from providing full support on user manuals or provide detailed specifications for its parts while it may demonstrate ambiguity in some spots like for example giving a full list of parts or maintaining its firmware source code on github. Everything is ok as long as everything is working but what happens when something is broken? Exactly! since its self assembled you don’t want to throw away the whole setup, all that it’s needed is to replace the broken part.

Which are the positives concerning Tarantula’s service?

Since it’s an assembled 3d printer everything can be replaced when it’s needed when a part’s exact specifications are known!

How we will be doing this?

Regarding service, there is one major rule, there are parts which may last longer than others for example an aluminium extrusion vs a stepper motor! In other words there are parts which are very resistant and hardly affected from their environment and parts which tolerate more electrical or mechanical friction and are subjective to greater damage over time. For this reason, the parts where sorted based on the above thinking by keeping in mind ‘rainy-day’ scenarios of what could go wrong with the overall setup. Finally, not all the printer’s parts may be listed on this article but the ones with a greater risk.

Can your 3d printer be maintained for the next 200 years?

Typically, this is three times the lifespan of a person! You may not be living but your printer might be still maintained by your grandchildren! So, as an advice make sure to include 2 parts of each in the list for your printer’s personal repair kit!

 

List of parts with high friction

Brackets / Acrylic Parts / Surfaces

The Tarantula model comes with acrylic surfaces or commonly known as brackets which are used to connect the printer’s functional parts together. Although they may not easily be broken if they are not broken by mistake, some parts do break easily such as the z-axis-bracket especially if there is an endstop problem. Because of that it is suggested to have one extra z-bracket ready and if it is assumed that your printer is still working, you could print some backups for the other parts as well! Better safe than sorry 😀

This list offers the basic brackets to support your setup, (remember this is not a upgrade guide so no improvements may be listed here)

https://www.thingiverse.com/thing:2362103

https://www.thingiverse.com/thing:2031660

https://www.thingiverse.com/thing:2249021

https://www.thingiverse.com/thing:1614204

https://www.thingiverse.com/thing:1963910

One extra tip here is that if the z-bracket is broken, it might be replaced with the Y-axis bracket opposite of the motor as the holes are nearly identical 😉

 

Timing Belt

s-l500.jpgType: GT2

Pitch or Transmission distance: 2mm

Width: 6mm

Length: As long as you need, typically sold in lenghtsof 5m

Codename: GT2 2mm Pitch 6mm Wide Timing Belt for 3D Printer CNC Dedicated I7T6

Breaks-on: the timing belt might typically break from over stretching it or from non-responding stepper motor.

 

Filament tube

Material: PTFE

Outside diameter: 4mm

Inner diameter (hole): 2mm

Length: As long as you need, typically sold in lengths of 2m

Allows 1.75mm filament to pass through

Codename: 2M PTFE Teflon Tube 2mm ID 4mm OD For 1.75mm Filament 3D Printer RepRap HM

Breaks-on: when it gets close to the extruder it may melt, it may stuck to hot-ends and may need to be pulled off

 

Power supply

s-l1600.jpg

AC Input Voltage: 110-220V
(There is typically a switch to select the voltage which applies to your country’s AC current)
DC Output Power: 300W
DC Output Voltage: 12V
DC Output Current: 25A
You may use any altenative, which can strictly match the above specifications, as a power brick or an ATX power supply as long as you know what you are doing.

Codename: Universal 12V 25A 300W Switching Power Supply Driver may be found as Lighting Transformer or 3d printer power supply

Breaks-on: Might burn from an electric shock coming from the power network. Might burn over time from electric friction.

Take care, this is a very dangerous part to replace, always take safety measures first and never be alone while replacing it.

 

Mainboard

s-l500_4.jpg

Model: MKS BASE V1.4

Codename: MKS BASE V1.4 Control Mainboard Circuit Main Board PCB for 3D Printer

 

 

 

Breaks-on: Might burn from electric shock, might burn over time from electric friction. Replacing the board won’t be enough to fix the problem, you need to upload firmware to the board tailored for tevo tarantula’s setup and set the voltage properly to the embedded stepper drivers.

Alternatives:

may also be replaced with:

mks_gen_l

Model: MKS GEN L

Codename: MKS Gen-L 3D Printer Control Board Replace Ramps 1.4 & Mega 256

 

 

 

 

which requires 5: A4988 Stepper Motor Driver Modules

stepper_modules

Codename: 5PCS A4988 Stepper Motor Driver Module 3D Printer Polulu StepStick RAMPS RepRap

The benefits of this setup is that if a motor driver is burnt it may be easily replaced

 

 

 

When you have collected the parts:

1. Tuning the stepper motor modules and 2. Installing the firmware is needed

Typically in Tarantula the A4988 modules should be placed around 830mV

 

LCD Controller

lcd.jpg

Codename:

LCD display 2004 Smart Controller RepRap Ramps V1.4 3D Printer

or RepRap Discount Smart Controller

View more at: http://reprap.org/wiki/RepRapDiscount_Smart_Controller

LCD Display details:  4 rows, 20 characters per row

Includes on board: an SD card slot, a speaker, a reset button and a controller

Breaks-on: might burn if improperly connected, the lcd screen is very sensitive and may easily break if it’s moved from its position

 

Stepper Motors

nema_17.jpg

Model: Nema 17

Starting serial code in my tarantula: 17HD4…

Height: 41mm (or 40mm)

Step angle: 1.8 ° 

Type: Stepper motor,
2 Phase (or bipolar),
with 4 Leads (or 4 wires)
Allowed rotation direction: forward and reverse
Rated current: from 1.3 to 1.7A
Typical A4988 calibration voltage: 830 mV (Needed when setting the A4988 driver modules)

View more at: http://reprap.org/wiki/NEMA_17_Stepper_motor

Learn more about stepper motors at: https://learn.adafruit.com/all-about-stepper-motors/types-of-steppers

Codename: CNC 1.8 Degree NEMA17 1.7A 40mm 2 Phase 4Lead Stepper Motor For 3D Printer New

Breaks-on: Incorrect voltage, mechanical/electrical friction over time

 

Fans

fan.jpg

Type: 12v Brushless cooling fan

Voltage: 12V

Dimensions: 30x30x10mm

Codename: 30x30x10mm 3cm 30mm Small 12v Brushless Dc Cooling Fan

Breaks-on: over time from electrical/mechanical friction

 

Thermistor

thermistor.jpg

Resistance: 100KΩ

Operating temperature range: should be greater than 260 ℃

Codename: 100K NTC Thermistors Sensor w/ 2 Pin Female Connector for Reprap 3D Printers

Breaks-on: may melt from electricity/heat

 

Heater Pipe Heating Tube

heat_pipe.jpg

DC Input: 12V

Power: 40 to 60W

Tube Diameter: 5mm

Codename: 12V 40W Heater Pipe Heating Tube Wire Length 1 Meter for 3D Printer

Breaks-on: friction from electricity/heat

 

 

 

Heatbed springs

spring

Type: Compression spring

Length: 30cm

Outside diameter: 7.5mm

Total number of circles: 13

Coil thickness ~= 1mm

Codename: 2x 3D Printer – Bed – Extruder – Compression Springs Spring

Breaks-on: permanent distortion over time

 

Coupling

coupling.jpgInner/Shaft/Axis diameter: 5mm to 8mm (may get tightened from the screws)

Outside diameter: 19mm

Height: 25mm

Codename: Flexible Couplings 5mm to 8mm NEMA 17 Shaft for RepRap 3D Printer or CNC Machine

(typically sold in pairs of two)

Breaks-on: the part’s flexible middle may face permanent distortion over time

I hope you enjoyed the article, have lots of fun repairing your 3D printer!

 

BSc Thesis: Unity Network, resilient virtual networking platform built for direct host-to-host data exchange with user identification and security properties

Hello! in this article I would like to present my BSc thesis, Unity Network, conducted in Technological Educational Institute of Crete at summer 2014.

Abstract

Unity network is a virtual networking platform, capable to be deployed in any kind of IP network as a Local Area Network or over the Internet. The network is centered around three pillar key-principles: Attributing a unique network identity to each connected host: The ability for a user to have many personal host-devices connected to the same network where each one is identified by a unique IP address. Feature which enhances host-to-host connections and lets the users keep contacts of other friendly hosts in their contact list. Non-restraining host-to-host connections: the ability for a user’s host to non-restrictively and conveniently exchange data of any type of network service he wishes with any other host. Secure and private host-to-host connections: the ability for each host to exchange encrypted information with any other by default and non-encrypted by selection by making use of RSA certificates and public key distribution features in order to provide authentication and confidentiality between the connected nodes. From a technical aspect, the network is built for enhanced resilience as, from the one hand, it is based on a divide and conquer logic demonstrating distributed node roles and decupled network traffic from network logic, features which allow the platform to resist death and dynamically expand to serve many host-systems. From the other, it is based solemnly on software written in Java without the need of any dedicated device or hardware which allows its applications to be hosted under many different devices and Operating Systems. For the clients behind a NAT/firewall, the network offers NAT traversal techniques to let them pass their network limitations and connect to the virtual network without compromising their ability to exchange any kind of data. To conclude, the network’s higher intention is to act as a live and tangible example of a better version of today’s Internet.

Report

The thesis report is available in greek from the following url:

https://apothesis.lib.teicrete.gr/handle/11713/3241

The report is being translated in english by its author. Currently chapters 1, 2 and 3 are complete while 4, 5 and 6 are under translation. To view the translated report please visit the following url:

Unity_Network_report_12_2_2017

Source Code

Unity Network is composed by three software applications written in Java. The source code for them is published on github and can be accessed from the following urls:

https://github.com/kostiskag/unitynetwork-tracker

https://github.com/kostiskag/unitynetwork-bluenode

https://github.com/kostiskag/unitynetwork-rednode

How-to deploy and use the network guide

The following pdf guide is compiled in order to aid admins setup and run the virtual network in their environment for either local or Internet usage.

Unity Network, how-to-setup-guide

Looking for developers in order to deploy the platform for real use on the Internet

In order for the platform to be fully operational it needs the following todo list to be done:

  • improve the control flow algorithm
  • fix minor bugs
  • deploy and test on the Internet

If you are interested in joining the project or to provide professional advice and guidance please send me an email.

PiWall, how to build a game-changing, flexible, low-level network firewall

firewall-29940_640You may be surprised with how frequently, modern Internet devices such as mobiles, laptops or computers continuously send and receive data on our behalf that were we are not aware of their existence. When a person decides to know the content of the information that is being shared or limit and profile some data he may come across the idea of installing a firewall in his computer. So, is installing software firewalls in computers enough to counter the situation? When a software firewall is used it is probably aiming to control the higher network level and therefore it may be good at limiting other software applications exchanging data. On the other hand, have you considered the possibility that your own device might send the information which needs to be monitored? In this point, a software firewall on top of the device is not the best case scenario as the software might never be in a position to detect the exchanged low-lever system data or may not be legally allowed from the Operating System’s manufacturer and other factors to tamper with them. Finally, as the saying goes, one system is based on another, so if an attacker could use another vulnerability in your system to tamper with its firewall, since its software, you might never knew it was affected. On the other hand, as compared to software firewalls, someone could use a hardware standalone network firewall as these devices may control the network traffic from more than one hosts and they are dedicated to a single task wich makes them harder to be penetrated. The solution of using standalone network devices as firewalls makes more sence in the security field, however, their negative aspects lie in other factors as: that they are difficult to be found in the consumer market, they may cost something extra and may not be tailored according to a user’s needs.

For quite some time I was occupied to solve this situation wondering whether a person could use a firewall solution within reach to define his network policies, be 100% confident for their effect in play, eliminate the possibility of breach through software, and be informed as well, in real-time, for the exchanged network data. To fit in the above requirements, the solution had to be an independent network device for the afore mentioned benefits, not cost a fortune and to have enough processing speed to control the exchanging data. In order to match these expectations, the raspberry pi B was ideal as it is built for low-power consumption and may run Linux and Python over a quad-core ARM cpu. The next question in hand, was how to monitor the exchanging traffic. The solution, was given to me by the network itself as at the end it’s all about data in a cable that come and go. I had to let the hosts be and focus my attention on the medium, the cable where everyone is connected! What if you could control which kind of data arrive and which kind of data leave from the medium towards the Internet? There is no other way for the data to go right? and that would be something really game-changing as with one device you could control multiple hosts! In order to achieve this, I had to somehow split the network wire between the internal hosts that were in need to be defended and the Internet and to install the device in between them to act as the firewall.

In order to approach the solution, I had to ask how does someone split a network wire in two?! For this task, a bridge was in need to be formed as it is called in networks. A bridge is simply a device with two network cards which may exchange data from/to another and therefore the hosts from the one or the other side of the cable are not aware of the device’s existence since it does not have a network presence. Furthermore, in order to be informed for the network traffic from the device and change its rules you would need to use a third network interface to access the device, this time as a network host. These make up to three network interfaces, however, as you may have noticed a raspberry pi has only one. The other two interfaces would be usb to ethernet adapters since the pi has 4 USB ports available. In the project,  Apple’s ethernet to usb adapters were used as they demonstrate good performance, low power consumption and the raspbian os has the necessary drivers to support them. If you decide to make a device of your own, watch out for the adapters from the ebay and other online stores as the pi might not support their drivers. Finally in order to understand the device you may observe the following diagram.

firewall

Introducing the device

This is PiWall, a game-changing, flexible, low-level network firewall!

Do it yourself!

in order to replicate the device you are going to need:

  • one Raspberry Pi model B (2 or 3) url1, url2
  • one micro sd card 8gb or more
  • two Apple USB Ethernet Adapter
  • one power cable for the raspberry pi
  • a case for the raspberry pi (optional)
  • heat sinks for the pi (optional)
  • two new ethernet cables

Setting up the device

Write the latest linux/raspbian to the sd card as described in the official raspberry pi guide:

https://www.raspberrypi.org/documentation/installation/installing-images/

Insert the sd card and connect your device to a monitor, keyboard and power. As soon as you have a command prompt set up a new user password with:

passwd

edit the system’s settings with:

sudo raspi-config

select to:

expand filesystem
Internationalization options:
change time locale, timezone and keyboard layout
Advanced Options:
Hostname: change hostname to PiWall
SSH: enable sshd

Source code

The source code for the project is written in Python (3.4) as from the one hand, it is really easy and fun to control low-level traffic with a high-level programming language and from the other, Python is easy to write and thus to set your firewall, monitor and modify rules the way you need them.

The source code may:

  • Monitor your traffic on the fly
  • Firewall your traffic on the fly
  • Modify your traffic on the fly
  • Provide live information for all the above

Keeps internal and external host whitelist and has the necessary policies to handle ARP, IPv4, IPv6, ICMP, DHCP network protocols. You may view the project’s source code from here and learn how to install and run it:

https://github.com/kostiskag/PiWall

Last but not least, if something is not in the code the main idea is to define it yourself. Moreover the overall project, the programming language and the source code demonstrate a good background to apply various other algorithms for AI or big data. You may start by collecting frequencies from the various send and received protocols, you may modify your internal hosts mac addresses to keep them private, monitor DNS traffic, monitor peak hours and much more.

Final thoughts

You may know that these kind of solutions could be used for malicious acts like collecting network traffic, however, as a scientist, I believe in knowledge sharing and decided to publish this article as its development was meant to help individuals apply one extra measure of security in their home or work networks and thus try to reach a state of equilibrium towards the extensive network trafficking and profiling which is done on their behalf. On the other hand, this article and device were meant to let individuals be introduced into network traffic and control as network trafficking has become a part of our digital lives. Finally, the overall installation is not very expensive as the hardware costs around 110€£$ and may be used for research purposes, home or work environments.

As a room of after-thought, It may be a good practice to avoid connecting to unknown WiFis in airports, hotels or cafes as a similar and not so friendly Man-In-The-Middle (MITM) solution may be installed there. If you still need to connect from public places and can not avoid it you may use an encrypted VPN solution such as openVPN towards a trusted VPN server and thus be defended against a close MITM host.

Finally, have fun with your device and watch out for project updates!

You can view this project along with other three raspberry pi projects developed for 2017 in the following video

 

How to build a highly resilient raspberry pi GPS tracker and visualize your data real time on Google Maps.

gps_avdou_presentHello guys! In this article I am going to present one of my newest projects, a fully functional GPS tracker which may stream its location over 3g and visualize gps data on Google maps in real time.

To begin with, and in order to understand the significance of this project let me explain what a GPS tracker is and why someone might use it for. Normally when we use a car GPS or a mobile GPS app it shows our location on a map and demonstrates the best path related to distance or other factors from our spot to a selected destination. As opposed to a GPS tracker we may not use it to find the best route to our destination but it may be used to track objects or people who carry it. It is noteworthy that, in contrast with a gps we may not need to be physically near to it in order to receive data as it may stream those over the internet. As an example case, someone like me may not remember where he parked his car last night, with a tracker in his car he may receive its last known location. Similarly, the use of tracking moving objects is handy in other cases as when we need to know the location of other important stuff, or  even to track pets!

Another cool use trackers may have is to let you record your walks. Similarly with how you record video with a camera you might just do the same with GPS co-ordinates. This feature comes to be really useful for mountain climbing, daily walks or exploration as when you return to your place you may study/observe your followed track or, you know, collect and share your tracks like you take pictures or videos! In my implementation, in order to enhance this feature I have made the routes to be stored as independent html files and open in your browser with a double click.

In the remainder of this article, the device and its uses may be observed at first glance. Afterwards,  the device, its source code and scripts are going to be analyzed in order for you to learn more stuff and, if you decide, to be able to replicate the device!

Introducing the device!

In more detail, the parts which were used are:

PI: 1x raspberry pi model B url1, url2 One micro sd card 8gb or more. One micro USB to USB cable for the power. One USB power charger of (5V 1A), one usb keyboard, one monitor with hdmi input and an HDMI cable.

GPS: 1x adafruit hat for raspberry pi similarly with my implementation. You may also use the gps breakout without the hat were you should have some jumper wires in order to attach it. If you decide, you may use another USB gps. The other two gps components which were used were: an SMA to UFL adapter url1 , url2 and a SMA gps antenna url1, url2

Networks: 1x 3G usb adapter: url1 . For the case that you may wish to stream  the tracker’s location to a selected server. Otherwise, if you do not wish to stream the tracker’s location you may “record” your routes and view the results when you reach to your computer. Make sure that the adapter’s specifications are compatible with your region. In order to use your adapter you will require a SIM card and a mobile plan to send and receive internet data.

1x WiFi adapter: url1  Makes things easier when on a LAN environment to access the pi’s content, services and for setting up and debugging purposes. In the case that you may not wish to buy a wifi adapter you may use the pi’s ethernet socket.

Some USB extension cables or USB mounts. To connect those to the pi in order to be able to conveniently plug in/out the USB WiFi and 3G adapters.

Power: 1x witty pi 2 hat A very good implementation in order to manage your pi’s energy. It stabilizes the power input, there is a power on button and more importantly it may power on/off you pi based on a scheduled time plan. The main idea is to, let’s say, open tracker every day for 30 min or similarly with another plan in order to save the battery’s energy and use our tracker for a bigger time duration.

One powerbank most preferably with a large capacity and a USB output of 1A.

Case: A case capable to contain all the above equipment and to be able to withstand some real world shocks.

Do it yourself!

Assembling the device

The device’s assembly is not so hard to achieve. To begin with, the first task to do is to solder the adafruit gps hat. In the witty pi you should move Halt by GP4 to custom as the gps hat uses that port to send the PPS pulse. In addition, you should move the jumper to the right to Dummy Load On in order to not let the external powerbank switch off when it is left alone. Afterwards, you may create a stack with the gps hat and the witti pi 2. It does not matter which HAT is on top, however, witty pi comes by default with a stacked header and you may need to move the gps antenna sometimes so it is much more convenient for the witty pi to go first in the stack and the gps to go on top of it. You may power the device on from the button on the witty pi.

Configuring the device

For the first part of the device’s configuration we may wish to set up the raspberry pi for the first time, the I2C interface, the wifi and network, the ssh service and time in order to be let the devices work, to be able to control our device from a remote shell and to display the proper system time when sending email events. This process is already explained in another one of my articles about the tampering device which you may view from here. From this article you should follow “Phase 1 – pi configuration”.

Setting up the GPS

In order to set up your gps hat you should study adafruit’s given setup guide found here: https://learn.adafruit.com/adafruit-ultimate-gps-hat-for-raspberry-pi/. What I did was slightly different from the default setup as I provided gpsd’s settings in a different way and used the service command to stop and start gpsd. What I did was:

sudo apt-get update
sudo apt-get install gpsd gpsd-clients

GPSD is sometimes buggy and if you decided its time to reinstall it you should do that with the purge option:

sudo apt-get purge gpsd

In my case where I used Raspbian Jessie and as described in adafruit’s blog I had to run the following commands:

sudo systemctl stop gpsd.socket
sudo systemctl disable gpsd.socket

When all of this is done, restart your pi, there is a fix led on top of the gps hat which may indicate a fix when it blinks with large time gaps. Your next task to do is to power it on, leave it outside with the gps antenna facing the sky and run either from there or from ssh:

sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
gpsmon

With those commands you may observe if you gps operated similarly with the pictures shown below. You may need to let it for some time in order to receive a gps FIX.

In order to close gpsd:

sudo service gpsd stop
#or
sudo killall gpsd

GPSD permission error FIX

If you can not open gpsmon or other gpsd clients as in my case, the gpsd may have changed the permissions of the gps device it is using. From what I have seen on the Internet posts the gpsd and the raspberry pi have some co-operation issues as this happens frequently. In order to overcome it you may use the following fix:

sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
( while : ; do sudo chmod 777 /dev/ttyAMA0; sleep 20; done ) &
gpsmon

When you have decided that everything is alright it is time you registered gpsd on system’s start. In order to learn about startup scripts you may study this guide: https://www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/.

The following script is a startup one, the bulky header is being used for letting the os know in which order to start the startup scripts. The “while” code is a bit dirty however, as mentioned, the gpsd changes the permissions on the gps device and does not allow the pi user to open any gpsd clients. The while code lets the user to be able to open any gps clients. Finally, the last line executes a bundle of services for the gps from the pi’s home directory. You should keep that in mind as we may return later to that.

sudo nano /etc/init.d/init_gps

#!/bin/bash
### BEGIN INIT INFO
# Provides: init_gps
# Required-Start: $all
# Required-Stop:
# Default-Start: 4
# Default-Stop:
# Short-Description: Initialises gpsd and python services.
# Description: This file initts all gps related stuff.
### END INIT INFO
(
sudo gpsd /dev/ttyAMA0 -F /var/run/gpsd.sock
(
while : ; do
chmod 777 /dev/ttyAMA0
sleep 20
done
) &
# this file may open our source code services and  is explained in detail later in the article in the project’s git
sudo -u pi /home/pi/gps_bundle_services start
) > /home/pi/gpsout

sudo chmod +x /etc/init.d/init_gps
sudo update-rc.d init_gps defaults

Should you ever wish to remove the script from start you may do with:

sudo update-rc.d init_gps remove

Setting up 3G

In order to setup the 3g please consider the guide shown here as well: https://www.thefanclub.co.za/how-to/how-setup-usb-3g-modem-raspberry-pi-using-usbmodeswitch-and-wvdial

For the 3g what you have to do is:

Plug in the 3g usb but do not remove wifi or etherner as you may use ssh.

sudo apt-get update
sudo apt-get install ppp wvdial usb-modeswitch

First, as the above article suggests you should make sure that the usb 3g modem is on modem mode and not storage mode every time and before wvdial attempts to connect. When you have your setup ready you may proceed with setting wvdial.

Wvdial needs a config file in order to properly work and connect to network. If you did not have your 3g usb plugged in, the config file may not be auto generated but you may still want to auto generate it by running sudo wvdialconf. The auto-generated config file is halfway to connect and you are going to need more attributes as shown below. It might be a good strategy to save the auto generated file’s differences like the Init2 or Modem lines, copy the file from here and then replace these lines.

sudo nano /etc/wvdial.conf

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 +FCLASS=0
Init3 = AT+CGDCONT=1,”IP”,”internet”
Modem Type = Analog Modem
Baud = 9600
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
Phone = *99#
Password = { }
Username = { }

In my case I had to connect to a cosmote 3g network in Greece and gave the above settings which did the trick. In your case you may have to variate a bit and search for your APN name or login credentials to match your carrier’s settings and save the file. Finally, shutdown the system and remove any LAN wifi usb or ethernet cable. We are going to need a keyboard and monitor for this one as we can’t use the ssh.  restart the system, then, use Ctrl + Alt + [F1 – F12] in order to switch between different terminals. Then in one terminal run:

sudo usb_modeswitch -c /etc/usb_modeswitch.conf
sudo wvdial 3gconnect

When wvdial connects, switch to another terminal to test your connection. You may also include an ampersand to the command and use the same terminal, however, you may have a lot of verbose in order to easily understand the messages. As soon as you observe the adapter’s led blinking vividly you are probably connected and you may run ifconfig to collect your public IP address from the ppp0 interface. To test your network run something like:

wget –spider http://www.google.com

Once your implementation is working make the 3G to connect at startup. I have developed this script to drop when there is an already active network interface like a wifi. Finally the session’s information is stored on /home/pi/3gout

sudo nano /etc/init.d/init_3g

#!/bin/bash
### BEGIN INIT INFO
# Provides: init_3g
# Required-Start: $all
# Required-Stop:
# Default-Start: 4
# Default-Stop:
# Short-Description: Initialises 3g
# Description: This file initts 3g
### END INIT INFO
(
sleep 60
#Allow this block when you have installed the project’s source code
#python3 /home/pi/gps_tracker/is_there_internet.py
#if [ $? = “1” ]; then
#echo “Script drops for this one.”
#exit
#fi
usb_modeswitch -c /etc/usb_modeswitch.conf
while : ; do
echo “3g connect”
date
wvdial 3gconnect
echo “3g hangup”
date
sleep 10
done
) > /home/pi/3gout &

sudo chmod +x /etc/init.d/init_3g
sudo update-rc.d init_3g defaults

Witty Pi 2

Witty pi’s setup can be studied from the given project guides:

http://www.uugear.com/product/wittypi2/
http://www.uugear.com/doc/WittyPi2_UserManual.pdf

Since everything is starting on system’s power on, our task with this hat is to set up a script for the pi to open every 4 hours for 40 min in order to collect GPS data,stream them back to us and thus extend the battery’s power for longer.

In order to install witty pi’s source code please run:

wget http://www.uugear.com/repo/WittyPi2/installWittyPi.sh
sudo sh installWittyPi.sh

Compatibility towards the gps hat

Remember that we had to put halt on GPIO4 to custom in order to not interfere with the gps hat since it is using the same port? It looks like we have to do the same thing in witty pi’s scripts or otherwise the device may switch off unexpectedly by misinterpreting the PPS pulse for a halt signal. In order to fix that go ahead and edit /home/pi/wittyPi/daemon.sh .

nano /home/pi/wittyPi/daemon.sh

Change the below variable from 7 to 10 in order to solve it.


# halt by GPIO-4 (wiringPi pin 7)
halt_pin=7 #should go to anything except 7(gps) and 1(the led) let’s say 10

You may find more information about this setup from here: http://www.uugear.com/portfolio/change-the-pin-that-used-by-witty-pi/ . When you are done save the file and restart your pi. Next, you may start making the schedule file in order to switch on and off automatically your device:

cd /home/pi/wittyPi/schedules
nano 40min_every_3hours.wpi

BEGIN   2016-02-24 00:00:00
END     2020-02-24 23:59:59
ON      M40   # keep ON state for 40 minutes
OFF     H3     # keep OFF state for 3 hours

Save the file and move on to synchronize time and activate the script.

cd /home/pi/wittyPi
sudo ./wittyPi.sh
Select:
Option 3 – To synchronize time
Option 6 – To activate a startup script
And select the script’s number from the given list
Option 8 – To exit

In case you need to reset the script:

sudo ./wittyPi.sh
Select:
Option 7 – to reset
Option 3 – to remove script
Option 8 – To exit

The project’s Source Code

Finally we have an assembled and configured device! The only thing we are still in need is the necessary logic in source code in order to fulfill more sophisticated tasks with our setup. For this reason, the project has a git repository with all the necessary source code for it written in python3 and all the above init scripts ready. The repository can be accessed from here:

https://github.com/kostiskag/gps_tracker

Now, this would be the proper time to switch over to the git’s readme in order to learn how to download, install and use the project’s source code and therefore to reach the device’s full potential. From this point, the setup is complete and after you have everything working it may be a good practice to take a backup from your sd card with all of the setup.

Final thoughts

After all of the code is packed together, the device becomes really reliable, useful and you do not need to make new tweaks or write source code anymore. You just open it, wait for it to connect and establish a FIX. After each event you receive your device ok emails through your mobile email client. By this point you know the device works, everything if fine so you start walking! Furthermore, you may let one of your friends sit in your computer and track you in real time with the auto-generated maps! From my part, I hope I have explained everything but if there is still something missing please let me know by sending me an email in order to update the article. You should keep in mind that this article and the articles I am making were meant to be of help so if you think that you were helped in one of your projects please attribute the article in it. If you do not have a particular project to work on but this article gave you insight or new knowledge, you might suggest this article to your friends or colleagues.  Finally, watch out for project updates and happy tracking!

You can view this project together with other three raspberry pi projects developed for 2017 in the following video

 

Monitor your stuff when you are away with a raspberry pi based tampering device

bagAll of us have some stuff we want to keep private, maybe something personal, or important ideas and concepts that we may not want to fall into the wrong hands. So how should we keep them safe in a house or work environment? One answer would be to lock them up! Obviously, but it is not so convenient and timely to lock stuff all the time and it’s not possible to know whether someone has passed the lock to begin with. This is why this device was made! To keep track of your personal stuff by sending real time email events about their state!

The Tampering device is a raspberry pi based device which is able to detect physical movement and motion, object rotation as well as the ability to detect whether a physical lock is being opened or closed. When an event is detected it sends an email to the user stating the event along with its detailed data and a timestamp so that he may know about it in real-time. Which are the good news? I have made this device in a way to be replicable so that fellow enthusiasts, scientists and engineers may re-assemble the device! In the remaining of this article the device is presented and there is a guide, resources and source code in order to replicate it.

Introducing the device

This is the tampering device! The user has to simply plug the pi into the powerbank to get it started. After power-up the user may take the device and place it in his bag as shown below or in another kind of space like a drawer. When the device is placed, the user has to attach the the lock sensors to the bag’s zip heads and connect those to the device.

As soon as the zip is closed the device is going to send the first email stating that the bag is now locked. From this point and on the device may send an event emal for every motion or rotation which was detected in the bag and whether the zip was opened or closed.

Do it yourself

In order for someone to replicate the device he should have some basic experience with the linux command line, python, computer networks and a basic knowledge of soldering.

Hardware:

You are going to need:

Phase 1 – pi configuration:

Write the latest version of rasbian to your sd card as described in the official raspberry guide here:

https://www.raspberrypi.org/documentation/installation/installing-images/

Insert the sd card into your pi, plug in a usb keyboard and the wifi usb antenna into your pi. After that, connect the pi’s HDMI output to your monitor’s or TV’s HDMI input. Finally, give to your pi some power either by plugging it to a mobile phone charger, a powerbank or into your computer.

The first thing we should do is to setup the wifi and enable the sshd on the pi in order to be able to directly access it through the computer and get rid of the keyboard and monitor interface.

WiFi setup: To setup your wifi follow the guide as shown here: https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md

In addition you may setup multiple wifi networks with priorities as demonstrated below in order to allow it to be operational under multiple areas:

to do this:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

and define multiple wifi networks as shown below:

network={
ssid=”xyz-net1″
psk=”a_password”
priority=1
}
network={
ssid=”xyz-net2″
psk=”a_psw”
priority=2
}

finally save it and restart the interface…

sudo ifdown wlan0
sudo ifup wlan0

wait for it… and…

ifconfig wlan0

to collect your ip address and write it down. Make sure the ip address stays the same (it’s static) each time when the pi connects into your wifi. If not, then you should make it static through your router’s DHCP known hosts – interface or by defining it into /etc/network/interfaces as static. You should keep in mind that if the pi connects on a different wifi it may get a new ip address. Moreover make sure that in the interfaces file there are the lines which allow your wifi to accept the above configurations and start when the device starts. By default these lines are already there.

allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

After you have set up your wifi it is time to set up your pi’s behaviour. For that run:

sudo raspi-config

select from the menu:

Expand Filesystem

Advanced options:

Enable SSHD

Enable I2C

Internationalization Options:

Change the timezone to your local timezone. You are going to need that later in order for the device to send proper timestamps with the correct time for the events.

Change your keyboard layout in order to be able to type what you see over your buttons as by default pi has a GB keyboard layout.

You can also view the tutorials below to get you going:

https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-gpio

https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c

Now you should shutdown your pi and take a break! As soon as you are done, remove the usb keyboard and monitor, power it up, wait for the wifi. You can now start using the ssh client from your computer so that you may not need to keep a monitor and a keyboard plugged into your pi in order to use it and let it take a more compact form. If you are using windows as an OS you may use putty.

login with username: pi

and password: raspberry

Since the device is going to be monitoring your stuff it is a good practice to change the default password. In order to do that run:

passwd

and follow the on-screen guide

Phase 2 – hardware assembly:

Now it is time to install all the essential packages, From your ssh client run:

sudo apt-get update
sudo apt-get install i2c-tools python-pip python-smbus python-numpy python-dev python-rpi.gpio git

sudo pip install adafruit-lsm303

and wait for the packages to be installed. After the install process is finished you should shutdown the pi and assemble the hardware as shown in the diagram below:

schematic

You may solder the cables directly on the sensor boards or you may use a breadboard similar to my implementation in order to be able to separate the sensors and use them in other future projects. Even if you decided to solder them it may be a good practice to test them out in a breadboard in the beginning. Take care to power the sensors from the 3Volt output as shown in the diagram and do not use the 5Volt or you may burn them. Do not mix the SDA signals with the SCL signals. The two green pinouts in the diagram are used for the lock sensor and may be extended to any kind of conductive wires and materials like jumpers that may trigger an event when connected/disconnected and the circuit is closed/opened accordingly. Finally for the assembly part, this is the proper time to find a nice box for your project to protect your hardware and include a powerbank in order to make it portable.

To test your hardware power up your pi and run:

sudo i2cdetect -y 1

Normally if all the sensors were installed correctly you should be able to view a response similar to this:

i2c

(where there are not dashes everywhere in all the lines)

Phase 3 – source code:

Are you tired? Now it’s time for some source code!!!! In order to stop this endless torture I have prepared a git repository with all the necessary source code written in python in order to use both of the sensors under the same script. You may view the project’s repository on github from here: https://github.com/kostiskag/tamper_dev

In order to download the project’s source code run:

cd ~
git clone https://github.com/kostiskag/tamper_dev.git
cd tamper_dev
ls

Once you have downloaded the code you should test whether your sensors and the device are working properly. There is a set of standalone scripts in order to let you test your setup. The only thing that you may need is nano or python “a script” in the directory to either edit or run it. Remember python is already installed in phase 2 so we are clear from that. Finally, you may use the commands below:

python L3GD20test.py
-> to test your gyroscope
python LSM303test.py
-> to test your accelerometer and magnetometer
python LSMdiff.py
-> to test whether the device is moved
python GPIOTriggertest.py
-> to test whether your GPIO lock properly works

Phase 4 – configuring your email

Next, you should register your email in order to let your device send email events. The scripts are already configured for SMTP over SSL for a gmail email account. The only thing you should do is to allow less secure applications to send emails from your account as described here:

https://support.google.com/accounts/answer/6010255

http://stackoverflow.com/questions/10147455/how-to-send-an-email-with-gmail-as-provider-using-python

In my case I have created a separate email account responsible for the event notification that may send email events to my original email address. Once you have either made a new account or have an already existing and in both cases you have allowed less safe applications to be used, then you may send a hello world email to test your setup. Run the below commands to provide your email credentials and to test whether you may receive a Hello World email on your email box from the tampering device.

nano GMAILtest.py
python GMAILtest.py

As soon as you have a Hello World in your mailbox, provide your credentials to tamper_dev.py as well and move on to the next and final phase.

nano tamper_dev.py
python tamper_dev.py

Phase 5 – Finalise your device and deploy for use

Last but not least, you should register tamper_dev.py to be executed on system’s start so that the only thing that you may have to do is to power up the device. In order to do that:

sudo nano /etc/init.d/tamper_dev_init

let the os know about your python script by writing the commands below in the opened file:

#!/bin/bash
cd /home/pi/tamper_dev
python tamper_dev.py

save the file, and with the commands shown below, give it execution permissions and notify rc.d which is responsible to start your script at the os start.

sudo chmod +x /etc/init.d/tamper_dev_init
sudo update-rc.d tamper_dev_init defaults
sudo shutdown -h now

if you decide to remove the init script you may use the command shown below:

sudo update-rc.d tamper_dev_init remove

For a more detailed description of startup scripts you may study this guide: https://www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/

Your device is ready! Now every time it is powered up it starts functioning automatically and once you close that zip it keeps you notified by sending email events over your mailbox!

Future work

The device described here may fail to respond properly under some specific cases as described below. There may be the case where someone might switch off your wifi router. If you think that this might happen and if you are not in control of your wifi’s state, you may choose to use a 3G usb adapter instead. In order to set the 3g adapter you may view the gps_tracker article under the section Setting up 3G. Moreover, there is the case that the device may shut down from a drained battery and there is no way to detect whether the device is off. In that case you may keep track of your battery’s life by measuring the battery’s life duration in order to be notified with an email fro low battery.

Finally watch out for project updates and stay safe, you and your projects!

You can view this project together with other three raspberry pi projects developed for 2017 in the following video

Drawing from MATLAB to Minecraft

A couple of years back, when I was studying digital image processing as a university’s course, I had many creative ideas about its possible applications. One of these ideas was to use what I had learned from the course in order to draw one 2D image into Minecraft. In more detail, in Minecraft a player can place blocks together and in such a way he can crate many different structures: buildings, statues, surfaces, etc. In this case, the idea was to treat one Minecrraft block as an image pixel and therefore be able to draw one image in-game.

In Matlab

trollThe image which was made in-game was a trollface! In matlab, the task was to minimize the original image into a 100×100 pixel image because the in-game blocks are half of the players’ size so they take a lot of space. Before making the resize all 3 RGB layers of the image had to be merged and then one black or white threshold was applied for each pixel in order to classify each either as “255” for white or “0” for black.

modtroll = double((trollface(:,:,1) + trollface(:,:,2) + trollface(:,:,3))/3);

for i = 1:357
for j= 1:391
if modtroll(i,j)>84
modtroll (i,j)=255;
else
modtroll (i,j)=0;
end
end
end

figure4_noerode

After these steps and before making the resize another problem was faced. Because the image had small lines, if the resizing  took place all these lines would be lost! In order to solve this problem image erosion was applied with a 5×5 kernel.

modtroll = imerode(modtroll,ones(5,5));

This move easily dealt with the case by making all the lines bolder before the resize.

After the resize step, there was the need to separate each pixel from its next in order to efficiently draw them in-game. For this reason the 100×100 image was separated by 99 horizontal straight lines between each row and 99 between each vertical in order to see the pixels separated.

for i = 1:100
hold on;
x = i + 0.5;
y = 1.5:1:100;
plot(x, y, ‘r+’);
end

In Minecraft

Next, the in-game building took place! The drawing was made by my brother Nikos and me!

Finally, after 3 days I think, this was the final image!

2013-04-13_23.48.26

2013-04-18_22.21.42

Final thoughts

It is usual for professionals to think that progress comes from being highly professional in a specialized narrowed field. However, an already introduced filed will have a medium or small room for improvement and a big competition. On the other hand, in many cases innovation means to be in a position to effectively combine different fields together in order to create something new. In such a way, a person may find himself eventually in the doorstep of new ideas. My advice here is to look where none has looked before and to think like none has thought before this is the way that a person reaches new ideas and possibilities!

Home Portal, a social network of peers

The Home Portal Project is a peer based social network. It is designed with the intention to let its users experience a peer-to-peer social network service instead of one centralized server based system ex. as Facebook, Twitter, etc.. More specifically each user hosts from his computer a bundle of services which are responsible to provide his personal social page and his personal chat room. With the usage of a tracker each user can find another’s web page easily, comment, instant chat and upload or download files to/from him in real time. Finally, the Home Portal page is intended to be the first page a user views upon connecting to the Internet which aims to ease the user’s browsing experience by providing a personalized and customable web interface based on his needs. This is a project that was implemented when I was in the second year of my IT studies around 2012. The project is currently under Creative Commons Attribution 4.0 International License. For more info about the license please view the blog’s about page.

Project site on Sourceforge: http://sourceforge.net/projects/homepo/

The Home Portal project will be moved from Sourceforge to GitHub for the reason that it is very demanding to keep an executable installer up to date as operating systems evolve and the project has many build in executables in windows such as modifying registry for the install, uninstall and applying plug and play. The project will be hosted on GitHub where the user will have to read the installation guide. You may find the project’s new location in the following url:

Future project site on GitHub: https://github.com/kostiskag/home-portal

Motivation for a Peer Social Network

The project’s motivation came from four main goals:

  • Unconditional Communication
  • Convenience
  • Privacy
  • Security

In detail:

Real Communication, when a user is in control of a personal hosted web page he can have any kind of preferred web service or communication protocol that fits his needs.

To Have a Personalized First Web Page when accessing the Internet.
Users are different and so are their needs. By this thinking, a user should be in a position to change his first page behavior and appearance by keeping his bookmarks, choose search engines, change page styling, maybe have a background and so on.

No data mining, without centralized systems each one user is responsible for keeping his personal data safe in his environment. In such a way he is in full control of them and no third party can mine his behavior or his preferences.

No Legal Binding, When one user joins the one or the other social group he has to accept Legal Terms. Facebook has gone so socially accepted that its holders can literally post anything in their terms and users can not refuse to accept those because there is no major alternative. My question is: since the user is already a member of the Internet why does he have to accept even further Legal Terms to reach Internet’s full potential in communication? The fact that someone is a member of the Internet should be good enough to let him communicate with other users whithout further legal agreements!

Home Portal in action!

Below we can view screenshots of Home Portal’s usage! The first is the page which a guest user will view upon requesting a user’s site. The second is the same page by the owner’s perspective where he is allowed to edit it. The third image shows a personalized search page which is intended to aid the user when browsing. In the fourth page, the webpage settings can be accessed.

Hosting a page such as this has a low cost!

The hardware side of the problem in order to host a personal page such as this in the present is solved as it is not an expensive task. One user can easily use a Raspberry Pi as a dedicated server that has enough processing power to support a task such as this. A pi can be bought for under 40$ serve the user’s page and be active 24/7!

https://www.raspberrypi.org/

Why peer social networking is not in common?

There are three main reasons why the internet is yet not ready to welcome these kind of solutions. The first one is that hosting is a complex task for the average user where he is not familiar with. The second is that users learn to use internet only one way as clients. The final reason is that users can not be identified from their IP address as it is dynamic meaning that is constantly changing.

A possible future for the Internet

A good future for the internet would be communication without boundaries where people will not be binned by Legal Laws or be monitored by third parties and be able to freely exchange information with each other! In this kind of Internet we should invest.

This project

This project is made to demonstrate that there is an alternative possibility! It shows that communication does not need to meet certain boundaries and that there are other kinds of solutions which can be applied!

Future work

In its current state, the project does not make use of encryption of any kind and a user may easily be impersonated by a non authorized attacker. In order to solve this matter the overall peer network has to make use of an RSA key distribution channel and each user has to maintain a keyring with his accepted friend’s public keys. The friendly public keys have to be signed with the respective user’s private in order to be considered as valid. When this system is in play one user may hash and sign his comments on another’s page with his private key and thus establish the senders identity and the message’s integrity.

Apollo, a solar powered computer

In this article, I would like to present Apollo, a prototype solar powered computer based on Raspberry Pi and parts found from online stores and e-bay! For those who do not know what a Raspberry Pi is: it is a full functional credit sized computer board with an ARM CPU, HDMI, USB ports and Ethernet. For more details please view:

Motivation

Making computers or other kinds of devices energy independent may be really useful on some open field applications like for farmers: to monitor humidity, temperature and to provide video stream from remote areas. As a weather station analysing the weather, in urban areas as a routing point and in many more cases.

This project’s goal was from the one hand to create a solar-powered and low-consumption computer which can sustain itself without the need to be charged from the power network and from the other, to operate outdoors, use either wifi or 3g for remote communication and solve demanding tasks.

Architecture

The parts which were used for this project were:

  • a raspberry pi A, as it maintains a good balance of CPU performance and energy consumption
  • a Li-ion battery of 30.000 mAh with a built-in solar panel
  • a 7″ display with HDMI input
  • a WiFi USB adapter
  • an SD card of 8gb for the OS which is Linux Raspbian
  • a small USB keyboard
  • the external skeleton which was made up from Lego Technic parts.
  • a USB to dc cable to conect the battery and the monitor
  • a USB to micro usb cable to connect the battery and the pi

How it works

The battery has two USB outputs one for 2A and 1A where the monitor and the pi are connected accordingly. In order for the computer to be powered on/off there is a button on the side of the battery. After power, the pi loads the OS from the sd card and the wifi adaptor connects to a local predefined wifi. The device is designed in a compact way in order to capture less space and save energy from the monitor when left alone to collect data or do a process, however, if a user decides to use the computer he may take out the keyboard from the back of the device, open the monitor and type in a command shell. If it is operating in a sunny place its battery life is postponed whereas, if it runs out of energy it simply needs to be left in the sun to charge. The external skeleton keeps smart locks that let the parts be easily inserted, removed, replaced so that new sensors may be inserted regarding the task or broken parts to be easily replaced. Finally, the skeleton with small modifications, allows the computer to be easily pinned on the ground.

20151224_131153

Making the skeleton

When prototyping computers or robotics I discovered that Lego Technic parts are a very good solution as they can be reordered while a project evolves. There are pages like brickowl where you may specifically choose the parts that your project may require (bars and joints make a good start) in order to start forming your project’s shape.

20151224_131806

Energy consumption

In general, making technology devices work independendly by using renewable energy sources is a way to reduce the need for electricity demand which results in less co2 emissions and in a cleaner environment! Furthermore, when a person decides to invest into being energy independent he is liberated from a legal cotract towards a power company. Finally, my hope is that in the future, more technological solutions should invest into similar technologies in order to not only help the environment but to also keep our lives with open and free technology!