Upload
globalcode
View
1.571
Download
5
Embed Size (px)
DESCRIPTION
A palestra "Automatizando sua casa usando Java, JAVAME, JAVAFX e Open Source Hardware" foi apresentada pelo Vinicius Senger e Neto Marin no JavaOne 2010 em São Paulo / Brasil e também em São Francisco/USA. também em
Citation preview
Globalcode – Open4education
Automatizing your house with open source hardware and Java
Globalcode – Open4education
Our team...
Vinicius Senger – team leader and architect
Benedicto Franco Junior – Senior engineer
Paulo Carlos dos Santos – Electronic engineer
Jose Luiz Sanchez Lorenzo – Electronic engineer
Neto Marin – Mobile & Wireless engineer
Globalcode – Open4education
This talk...
Is not a product, solution or standard
It´s about putting accessible technologies together literally inside your house;
It’s about community and open source experiences
Globalcode – Open4education
Agenda
Introduction
Open source hardware
Hands-on automation circuits
Integration with Java & JavaFX
Complete architecture demo
Globalcode – Open4education
Introduction
Electricity and electronics in our houses:
Past I: making electricity accessible and cheap
Past II: making it smaller and faster
Past III: digitalizing and integrating everything
Past IV: saving energy and improving intelligence
NOW: making it simple and open source!
Future: making automation accessible and cheap(all around the world)
Globalcode – Open4education
Introduction
Computers Vs. People*:
Past I: one computer for many people
Past II: one computer per person
Today: many computers per person (rich person)
Tomorrow: many computersa per person (including poor people)
*from @alegomes
Globalcode – Open4education
Your house tomorrow...(or Today)
Advanced memory
Semantic illumination
Bluetooth and wifi communication
Futuristic and gesture control
Imagine recognition
Interactive wall
Open source technologies (HW + SW)
D.I.Y
Globalcode – Open4education
What do you need to automate your house?
Main Board Controller
Relay circuit
Dimmer circuit
Wired and wireless communication
LED illumination
Sensors: presence, temperature, light, reed, etc.
Globalcode – Open4education
How much it cost?
Main Board Controller
Each wall socket
Dimmer
Communication
LED illumination
Globalcode – Open4education
Automated house architecture…
Globalcode – Open4education
Agenda
Introduction
Open source hardware
Hands-on automation circuits
Integration with Java & JavaFX
Complete architecture demo
Globalcode – Open4education
Open source hardware
You can take, distribute, modify and make money
Taking back the control about what is happening in our computer
D.I.Y consumers
New and exciting market!
Very big community
Globalcode – Open4education
Rep Rap
Globalcode – Open4education
Monome
Globalcode – Open4education
Segway
Globalcode – Open4education
OSHW Controllers
Normally uses microcontroller: single integrated circuit with CPU, memory and I/O.
Low power consumption
Normally bare metal
Many options: Atmega / Arduino, BasicStamp, ARM, Netduino..
Some of then support Java, but most cases you need to write some C code;
Globalcode – Open4education
Sun Spot
Nice and expansive: U$ 750,00
Include 2 Spots and 1 PC station board
Suppose to have different sensor boards
Squawk virtual machine
Small community
Globalcode – Open4education
Sun Spot – mainboard(podemos tirar)
The main board includes:ARM based (AtmelAT91RM9200)
4 megabytes flash memory
Wireless 2.4GH
JVM embedded
3.7V 720maH rechargeable battery
Globalcode – Open4education
Sun Spot – sensor board (podemos tirar)
The default sensor board includes:Accelerometer
Leds
Switch
Light Sensor
Temperature Sensor
High current driver (small DC motor)
3 X Octal Register/Driver (led matrix)
Globalcode – Open4education
Arduino
Famous open source hardware project created by Maximo Banzi, Ivrea University
“Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software.
It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments. “
Globalcode – Open4education
Arduino
Simple board based on Atmega328 MCU
Cheap: U$ 30 – BIG community
Limited resources:16 mhz
32k flash
2k RAM
6 analolg ports
14 digital ports (6 PWM)
Default language is C / C++ using GCC AVR
Globalcode – Open4education
Arduino
Globalcode – Open4education
So simple that you can do your own PCB
You can take out many components for production
Very easy to draw and DIY
Arduino = simple
Globalcode – Open4education
Arduino
Arduino can run Java?
NO, not the legal Java.
But YES, www.kaffe.org – not officially Java.
Globalcode – Open4education
Program-ME
Brazilian development board based on Arduino
Arduino + inboard resources:
LEDs
4 high current transistors
Light sensor
Servo and analog simplified inputs
Globalcode – Open4education
Beagle Board
Very nice board for U$ 149,00, good candidate to be the central controller
Globalcode – Open4education
Which one?
Price Good for Not good for
Sun Spot 750,00 prototyping with wireless and Java
production
Arduino 30,00 smaller dedicated controller
Medium / high process, like video
Beagle Board 149,00 medium / high process smaller controllers
Raw Atmega < U$ 10,00 production for small dedicated controller
prototyping
Globalcode – Open4education
Agenda
Introduction
Open source hardware
Hands-on automation circuits
Integration with Java & JavaFX
Complete architecture demo
Globalcode – Open4education
Controlling Relay
Very simple and useful with different applications:Wall socket
Electronic Lock
Electronic garage door
Basic circuit components:Resistor, transistor, diode, connectors
Just use 1 digital port for each relay
Globalcode – Open4education
Relay PCB
Globalcode – Open4education
void setup() { pinMode(2, OUTPUT); pinMode(3, OUTPUT);}
void loop() { digitalWrite(3, LOW); digitalWrite(2, HIGH); delay(1000); digitalWrite(2, LOW); digitalWrite(3, HIGH); delay(1000);}
Arduino Code
Globalcode – Open4education
Demo #1
Introduce the central board controller
Introduce JavaFX central console
Show relay usage using Bluetooth
Globalcode – Open4education
Digital Dimmer A/C light
More advanced circuit using optical isolator and TRIAC (solid state relay)
Can control A/C power for: Incandescent light
Shower
Fan
Globalcode – Open4education
Demo #2
Digital dimmer in action with bluetooth and JavaFX
Futuristic dimmer
Globalcode – Open4education
RGB Illumination
High power and low consumption;
Can be RGB or one color;
Very simple to drive:Uses three transistor PWM digital ports
Globalcode – Open4education
Going beyond...
Globalcode – Open4education
Wireless in you housePrice Resume
433 mhz U$ 15 Simple but can be hard for many transceivers in the same environment. Good to have into house components.
Bluetooth U$ 60 Very trustable, good for cell phone control
Wifi U$ 100 Large distance, is expansive to have into house components, but perfect for central controller
xBee U$ 30 The best choice, good price and many working mode
X10 >U$ 200 Best choice for AC control
Globalcode – Open4education
Best Wireless Architecture
Globalcode – Open4education
JavaFX
Our choice because:It’s simple and rich
Simple to integrate with wireless communication
Simple to integrate with Sun Spot, Arduino or any other else;
Java RXTX;
DEMO JavaFX code with Arduino
Globalcode – Open4education
Conclusion
Many choices to automate your house by yourself
Open-source hardware and software make it easy and acessible
Do it yourself is a reality!
Cheap & fun!
Globalcode – Open4education
More...
www.eletronlivre.com.br
www.globalcode.com.br
www.arduino.cc
www.sunspotworld.com
Globalcode – Open4education
More...
Twitter:
Vinicius Senger - @vsenger
Jose Luiz Lorenzo - @jllorenzo
Neto Marin - @netomarin
Benedicto Franco - @benefrancojr