I am looking for a tablet that I can hack for some home control applications. In particular this device looks like a good candidate as it is about the same cost as a WiFi thermostat and far more capable.
So 2 basic questions... 1: Are there any underutilized GPIO pins that were broken out of the CPU BGA that I can access with a fine tipped solering iron? This is commonly done so that in circuit board tests can validate that there are no solder bridges.
2. Does anyone have a I2C map to know which addresses are utilized, and as an extension to this, know how to make requests on that I2C buss.
I am sorry I know these are very broad questions. I am looking to turn this into a total home control panel including thermostat. So basically for this task I am trying to get GPIO (Preferably 3.3 or 5V) that I can use for some fets to control HVAC, and some I2C lines that I can use to dead-bug in humidity, temp, pressure, ambient light sensors, and IR motion sensor.
I will post a writeup complete with wiring and code if this works out.
P,
neat question, how do i go about getting i2c map? are you working with t53x t33x or t23x ?
hardware hacking would probably be a better section for this, or stack exchange though.
can that be found in kernel source? drivers/i2c/busses/i2c-qup.c or the like?
m
Related
I am looking for something specific, but don't know what … maybe you guys can help me out.
Let me provide some background first. There are special controllers for espresso machines available which act as a PID controller for temperature regulation. To simplify things: They read the temperature of the water and regulate the heating element to a specific temperature with much greater precision than the integrated "mechanical" thermostat is able to.
Today there are kits for various espresso machines available, but they are rather expensive. So I was thinking: Well, what about some homebrew stuff (no pun intended)? I could fit more functionality in there and – here comes the interesting part for the XDA community – connect the controller to my Galaxy Nexus!
My first idea was grabbing some development platform (e.g. Arduino or IOIO), but I'm not sure if this is the right approach. Let me explain what the perfect board can do:
- read two or three temperature probes
- read a water level sensor
- read and control four switches
- provide some kind of CPU for acting as a controller
- provide a clock to "wake" the machine in the morning
- provide a USB connection for controlling from Android and programming/flashing from OS X
- optional: Bluetooth functionality for wireless Android control
I can figure out how to wire the stuff together and how to write some PID software. But the most interesting part will be the Android connectivity, but I have no idea what platform I can use …
It would be awesome to plug a USB cable in (or connect via Bluetooth) and read the live temperature data, start/stop the brewing process and so on. The PID has to regulate the machine without the phone – depending on the switch state (i.e. "pull a shot" or "make steam") the heating element would be regulated.
Of course there are even more interesting applications, like sending a tweet ("I just brewed a coffee!") or a pressure readout …
As far as I understand, I just have to look for a single-board microcontroller with some analogue and digital inputs, some digital outputs and a USB connection. Is this possible with something like an Arduino? Or do I need something more complex?
Hey! Nice to see another homebrewer! They sell chips like that already. People have converted freezers to kegerators, and the chip manages the temp, turning on the freezer around 55 degrees F.
Sent from my SCH-I535 using xda premium
I would suggest you toying with Android ADK
This is a board you could use is: arduino.cc/en/Main/ArduinoBoardADK it's a bit pain in the ass to set it up for the first time but once you get used to it it's pretty simple
Freezer? 55 degrees? I'm talking about brewing espresso … The problem there is temperature stability within 1° Celsius.
I already learned more about the Arduino platform and I think it is the right idea for my small project.
As far as I know a bluetooth connection via Android can be established, too.
You should definitely check out a book called;
"Programming Your Home: Automate with Arduino, Android and Your Computer"
Author is Mike Riley.
Publisher is The Pragmatic Bookshelf, Dallas Texas - Raleigh, North Carolina.
I'm pretty sure it's available as an e-book and is full of projects combining these technologies.
The first project has a ball float incorporated in it so I think it's perfect for your idea.
I'm working on a sous-vide immersion circulator at the moment, but it isn't too complex.
A PID controller does all the hard work.
PS
No barista in their right mind would let a machine steam milk!
---------- Post added at 05:48 PM ---------- Previous post was at 05:41 PM ----------
...almost forgot - ISBN-13: 978-1-93435-690-6
You can pretty much do everything including put the PID into the Arduino. You though will need to create the shield board with the extra sensors you need. Once that is available talking to the Arduino from Nexus is a cake walk. The USB Host and well as USB Accessory mode API is pretty straight forward and you can use either depending on how you want to interface the two. If you use some other microcontroller board other than Arduino then you will probably not be able to use Accessory mode but will have to use the USB Host with the microcontroller board exposed as a CDC class device using the USB as virtual serial port (Atmel, MicroChip controllers provide this interface). Also you will need to hack your Nexus to provide additional power supply (probably using Pogo pins) as USB port will be powering your controller board.
Best of luck!
pankaj013 said:
You can pretty much do everything including put the PID into the Arduino. You though will need to create the shield board with the extra sensors you need. Once that is available talking to the Arduino from Nexus is a cake walk. The USB Host and well as USB Accessory mode API is pretty straight forward and you can use either depending on how you want to interface the two. If you use some other microcontroller board other than Arduino then you will probably not be able to use Accessory mode but will have to use the USB Host with the microcontroller board exposed as a CDC class device using the USB as virtual serial port (Atmel, MicroChip controllers provide this interface). Also you will need to hack your Nexus to provide additional power supply (probably using Pogo pins) as USB port will be powering your controller board.
Best of luck!
Click to expand...
Click to collapse
If you have a device that supports OTG/USB Host, a USB-enabled microcontroller is MUCH cheaper than ADK (which requires the accessory to act as a host).
ADK should be described as "DDK" - Dock Development Kit. The requirement for the "accessory" to act as a host and to provide power makes it limited to dock-style devices. True accessories should be powerable from the device.
Adafruit's ATMega32U4 board is a great one to work with - https://www.adafruit.com/products/296
Another option, much more expensive but allows your device to be network-enabled easily (built-in Ethernet) is the BeagleBone. Lots of GPIOs on 0.1" headers and Ethernet.
I would tend to lean towards arduino. It is certainly powerful enough. All the research I have done makes conecting bluetooth really easy. Although serial to android seems a bit more difficult. For the task you are trying to do I would expect a standard arduino (or clone) and a bluetooth module off of ebay (make sure you choose one that can handle 5v) should be a good starting point.
I have only every made diy arduino buy purchasing the usbisp cable and pl-2303 style usb>serial ttl adaptors. If you search on ebay some of them have the dtr line on one of the pins making auto reset easy. They are a bit more rare, but are worth searching for and paying a few dollars more.
I have never done brewing, but fiddle with arduino (atmega8 atmega168 atmega328 atmega644p atmega1284p). Feel free to ask questions.
arjag said:
I would tend to lean towards arduino. It is certainly powerful enough. All the research I have done makes conecting bluetooth really easy. Although serial to android seems a bit more difficult. For the task you are trying to do I would expect a standard arduino (or clone) and a bluetooth module off of ebay (make sure you choose one that can handle 5v) should be a good starting point.
I have only every made diy arduino buy purchasing the usbisp cable and pl-2303 style usb>serial ttl adaptors. If you search on ebay some of them have the dtr line on one of the pins making auto reset easy. They are a bit more rare, but are worth searching for and paying a few dollars more.
I have never done brewing, but fiddle with arduino (atmega8 atmega168 atmega328 atmega644p atmega1284p). Feel free to ask questions.
Click to expand...
Click to collapse
I will have to agree on that one, but only by experience.
those chips are a pleasure to deal with.
I even got my tablet talking to mine before I screwed it up!
Hit me up here or on #arduino on freenode (or anyone else there for that matter) if you want any hints or help if you decide to go that route, I'd be happy to help!
DW
You should try Arduino board, it's not that difficult to use and they're plenty of resources on the Internets.
Also, you could develop an Android app for controlling it. My team had successfully developed an Android controlled RC-car via Bluetooth.
You could find the source code of the Android app here on Github!
Another approach might be to get an ethernet shield for arduino and hook it up to your homw network. Then you could use a browser to control it, so you are not just limited to your Android device.
Ethernet setup is really simple, start with the demo code and modify to your needs.
Sent from my SAMSUNG-SGH-I747 using xda app-developers app
check out the andropod
Not 100% what you described, but this is absolutely rad nonetheless...
i just saw this the other day: http://www.ftdichip.com/Android.htm
with a standard UART to android usb host in one cable, you can do regular old RS232 or TTL-voltage RS232 comms with practically any of the simplest of the simple mcu's out there.
UART interfacing hardware with your phone? it'd be super easy to write java or shell interface wrappers to do tons of cool automation stuff, plus if you have an old beater phone lying around, it's a super robust DAQ unit in the making...
booooiiinnnniiiiiinnnnnggggg I want...
http://code.google.com/p/tc4-shield/
It's already got a four-channel ADC intended for thermocouple use, as well as GPIOs to drive the SSRs. People have already worked out zero-crossing detectors if you want finer control.
The water probe is a little problematic; I'd stick with the existing Gicar or equivalent.
I'm in the process of using it for thermocouple and power-relay interface to a Raspberry Pi to run a La Marzocco GS I'm restoring.
The Arduino is disappointing in its computational power. Its enough to run a PID, but can't really deal with a TCP stack and a webserver too.
Please note that Arduino can use Bluetooth connectivity to Android. It is easy on Arduino and very convenient.
Arduino can be battery powered for a long time if you program its sleep mode correctly.
http://tvwbb.com/showthread.php?35674-HeaterMeter-v4-0-for-RaspberyPi-Standalone
Shouldn't be a far leap from a fan/heating element to a water heating element. Plus: "HeaterMeter is also reportedly suitable for connecting to a solid state relay and controlling a sous vide heater if you prefer your food float around in fancy water instead of smoke and fire."
Arduino (or Msp430 Launchpad, or Microchip Pic or whatever) + a cheap, 6 dollar Bluetooth Serial adapter, + coding an app for android is all you need. Don't mess with usb or ethernet/wifi. Bluetooth Serial is all you need.
also use Android Suit
Could this be done with a nook? More info
http://www.icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry_Pi_Into_an_FM_Transmitter
The code that handles interacting with the GPIO pins in the link you provide is specific to the Raspberry PI. From the link: "It uses the hardware on the raspberry pi that is actually meant to generate spread-spectrum clock signals on the GPIO pins to output FM Radio energy."
If the GPIO hardware on the NST can do something similar, a knowledgeable person could potentially port the code. Unfortunately, as far as I know, the only GPIO pins on the NST are the power and nook "n" buttons. This means that to get it to work, you'd probably have to open up your NST case and solder a couple wirers, disabling the power and "n" buttons. Not ideal.
Basically, no. That's not really possible on the NST, as described in the article. It might be possible with some other approach though (such as with USB host)
Ok, the questions is, is there PLL in the nook that can be used in the same way its being used in the Raspberry pi?
That kind of hack requires something that you can deterministically control,
like a microprocessor without an OS.
There are probably more GPIOs that you can snarf if you can connect to them.
The other four hard keys work off the matrix scanner.
That could undoubtedly be expanded.
There are also a few UARTs that are unused.
I'm not sure how many (at least one does) of them appear on (non-existent) connector J163.
(I just soldered in connector J163 on my Nook).
Hello,
I would like to hear some opinions about my personal want-sth-to-do project. I want to use NFC to open my house doors, including the front door, garage and bedrooms door. In addition, I want to be able to control my air-conditioning system, TV and audio system. I want to integrate some sort of IP/CCTV cameras into my personal system. Just to improve the system, I will develop a Android App to control it via an API.
So, to make this project possible, come to my mind three ways:
1. [Arduino]
- Using the Arduino and its shields to develop the entire system. It will take a while and be hard in some points such as IPCAM recording.
2. [RaspberryPi + Arduino]
- Using the RaspberryPi connected to some Arduino shields using the GertDuino (GPIO expansion boards that make RaspberryPi compatible with Arduino Shields).
- This options seems to be the best option for now, but I dont know if RaspberryPi is able to handle the entire system.
3. [IOIO-OTG]
- IOIO-OTG is a board that make any android device as the heart of the system, making you just program in Java and control the GPIO and UART.
- The benefit is that I can develop it using some Android Stick, however, I need to search about available shields for it.
In addition, I need to think how to separate the core of the system from the sensors such as nfc readers. I do not think that wiring over the entire house is the best way... but I didn't found any wireless sensors...
Someone want to give some opinion? I will update the thread with the sensors I'm looking around and so...
I'd go the arduino (maybe more than one) + raspberry-pi (maybe more than one) way.
the ioio seems to be some µc that runs a firmware that connects to android and provides all i/o pins to android... so nothing you couldn't do yourself with an arduino or something similar.
I'd start with the devices you want to connect. Air conditioning might be controlled using Infrared emitters - would that work?
NFC Readers can be built from an arduino AFAIK, but you'll need some sort of field bus or wireless connection between all the parts...
SkzBR said:
Hello,
I would like to hear some opinions about my personal want-sth-to-do project. I want to use NFC to open my house doors, including the front door, garage and bedrooms door. In addition, I want to be able to control my air-conditioning system, TV and audio system. I want to integrate some sort of IP/CCTV cameras into my personal system. Just to improve the system, I will develop a Android App to control it via an API.
So, to make this project possible, come to my mind three ways:
1. [Arduino]
- Using the Arduino and its shields to develop the entire system. It will take a while and be hard in some points such as IPCAM recording.
2. [RaspberryPi + Arduino]
- Using the RaspberryPi connected to some Arduino shields using the GertDuino (GPIO expansion boards that make RaspberryPi compatible with Arduino Shields).
- This options seems to be the best option for now, but I dont know if RaspberryPi is able to handle the entire system.
3. [IOIO-OTG]
- IOIO-OTG is a board that make any android device as the heart of the system, making you just program in Java and control the GPIO and UART.
- The benefit is that I can develop it using some Android Stick, however, I need to search about available shields for it.
In addition, I need to think how to separate the core of the system from the sensors such as nfc readers. I do not think that wiring over the entire house is the best way... but I didn't found any wireless sensors...
Someone want to give some opinion? I will update the thread with the sensors I'm looking around and so...
Click to expand...
Click to collapse
I find your ambition high. But as someone running an Insteon Smart Home with an ISY994i, I can't help but feel you are trying to make a fairly cost effective and secure option more expensive and less secure. Mobilinc integrates with tasker, so you could set it up to unlock doors and stuff pretty easy with NFC.
Best of luck with your search.
me likes
DThought said:
I'd go the arduino (maybe more than one) + raspberry-pi (maybe more than one) way.
the ioio seems to be some µc that runs a firmware that connects to android and provides all i/o pins to android... so nothing you couldn't do yourself with an arduino or something similar.
I'd start with the devices you want to connect. Air conditioning might be controlled using Infrared emitters - would that work?
NFC Readers can be built from an arduino AFAIK, but you'll need some sort of field bus or wireless connection between all the parts...
Click to expand...
Click to collapse
I agree with DThought. Including a Raspberry Pi would allow some pretty intense processing power.
If you want to limit the amount of wiring you do, you could actually use a USB wifi dongle on the Raspberry Pi. You could then make some simple protoboards/PCBs with an Arduino with a wireless shield for each thing you want to control. This would likely be a more expensive solution than plain wiring but it would allow a lot of flexibility. Especially if you had each of the Arduino clients very similar so that they are interchangeable.
You could also try using Xbee Arduino wireless shields in case you don't want to use regular wifi.
This sounds like a very good project. I hope it works out for you. :laugh:
Okay so on my device I have two serial ports. One port is labeled J2 with 4 pin outs that I think is the UART. The seconded port labeled JPEEK3 has 6 pin outs that I think is the JTAG. Here's the problem, they aren't giving me UART and JTAG readings on my multimeter or logic analyzer.
J2 is reading like this.
3.28VGND3.28V3.28V
No data just straight to idling high.
As for JPEEK3 I'm reading this
GND.04V.04V2.95V2.95VGND
On this I'm getting data on all active pins. I tried hooking my JTAGulator up to the device to read it but every time I do the device it's stuck in reset mode.
Anyone got any idea of what these readings mean?
biomedguy said:
Okay so on my device I have two serial ports. One port is labeled J2 with 4 pin outs that I think is the UART. The seconded port labeled JPEEK3 has 6 pin outs that I think is the JTAG. Here's the problem, they aren't giving me UART and JTAG readings on my multimeter or logic analyzer.
J2 is reading like this.
3.28VGND3.28V3.28V
No data just straight to idling high.
As for JPEEK3 I'm reading this
GND.04V.04V2.95V2.95VGND
On this I'm getting data on all active pins. I tried hooking my JTAGulator up to the device to read it but every time I do the device it's stuck in reset mode.
Anyone got any idea of what these readings mean?
Click to expand...
Click to collapse
The voltage levels for the UART are OK.
UART "J2"
3.28V GND 3.28V 3.28V
It could match the signals:
VCC, GND, TxD, RxD
For UART you need to know the communication baud rate and other connection parameters. You also need to know the communication protocol at the UART layer.
The voltage levels for JTAG are OK.
JTAG "JPEEK3"
GND .04V .04V 2.95V 2.95V GND
It could match the signals:
GND, CLK, DIO, RST, VCC, GND
Which is JTAG in SWD mode.
Maybe "JPEEK3" is SWD?
For full JTAG you have this pins on "JPEEK3":
TDI, TCK, TMS, TDO, RST, VDD, GND
If RST is missing in JTAG, the problem is to get the target into debug mode if the targer has its own power supply.
Appreciate the help, never considered the pinouts for JPEEK3 to be SWD.
The board doesn't technically have it's own supply, the power comes from other boards that it's connected to, in order to power on. Should I figure out a way to power it on with a power bank in that case?
As for the UART, I have a DSLogic Plus, should I just test multiple baud rates and see what happens? I'm not sure what other protocols and communications to look for other then that.
biomedguy said:
Appreciate the help, never considered the pinouts for JPEEK3 to be SWD.
The board doesn't technically have it's own supply, the power comes from other boards that it's connected to, in order to power on. Should I figure out a way to power it on with a power bank in that case?
As for the UART, I have a DSLogic Plus, should I just test multiple baud rates and see what happens? I'm not sure what other protocols and communications to look for other then that.
Click to expand...
Click to collapse
It is a question of whether the board is powered from an external source or only from the JTAG programmer (SWD). For JTAG / SWD, it is better if the target is powered only from the JTAG programmer (SWD), unless it is required to power other peripherals and cover power requirements. For JTAG (SWD), there must be direct JTAG (SWD) programmer support for a specific target (MCU), debug mode, Flash write, and so on. Each MCU has a different protocol and must be directly supported by the JTAG (SWD) programmer or control software. For JTAG (SWD) communication, you can change the communication speed arbitrarily (it is not fixed), if it fails to connect to the target (MCU), you can reduce the communication speed.
For the UART, the communication speed (connection) is precisely determined in advance, you must know it or analyze the output data (timing of given bytes using DSLogic Plus ) if it is sent natively on the UART interface (boot log). The protocol on the UART interface also needs to be known if it is not a shell terminal output.
Well hot dog, that's a lot of solid info. Appreciate it, really.
I just got a flyswatter2 in the mail, hopefully that'll be compatible with the AT91 Atmel MCU on the board, apparently it's using an ARM7 processor. Good to know to not power on the board like I have been with the JTAGulator and DSLogic.
You wouldn't happen to know how to locate the configuration memory for the FPGA, now would you? I'm talking with my cousin whose an EE major, and he was asking for it. I'm not even sure how that'll help with getting into the JTAG.
biomedguy said:
Well hot dog, that's a lot of solid info. Appreciate it, really.
I just got a flyswatter2 in the mail, hopefully that'll be compatible with the AT91 Atmel MCU on the board, apparently it's using an ARM7 processor. Good to know to not power on the board like I have been with the JTAGulator and DSLogic.
You wouldn't happen to know how to locate the configuration memory for the FPGA, now would you? I'm talking with my cousin whose an EE major, and he was asking for it. I'm not even sure how that'll help with getting into the JTAG.
Click to expand...
Click to collapse
Atmel AT91 MCU is supported by OpenOCD. Flyswatter2 works with OpenOCD. From the FT2232H chip used by Flyswatter2, I made a programmer for SPI EEPROM [https://geekdoing.com/threads/unbrick-mi-band-3-with-without-nfc.700/]
I have never used Field Programmable Gate Arrays (FPGA), always only MCUs, I will not advise you in this area. Unfortunately. FPGA arrays have configuration memory as an external memory chip.
The JTAG programming interface is also used for FPGA arrays. FPGA and MCU are completely different technologies. Custom MCUs can also be created using an FPGA array.
We just got into a new house and the heating and cooling are done using an Atlantic R32 duct type unit. Since it is blowing in all the rooms at the same time and the fact that the wired controller with the sensor is right underneath one of the vent, we have a lot of trouble getting the whole house to a satisfying temperature.
It would be a lot of money to get a brand new system with a better room temperature control, so I was thinking I could maybe use a Raspberry Pi or Arduino instead of the wired controller to create a web interface that I could use from my phone and connect multiple sensors in order to have the temperature in each room.
With the documentation that is provided for technicians, we can see that that the wiring is made of three cables, a 12V, a COM and a signal cable. I would have expected a RX and TX cable along the 12V and COM... So I'm a bit at a loss at how to start here. It seems like the communication goes both ways since they mention a discovery phase for the remote control.
I would like to know if someone has experience with hacking this kind of device and what I could do to retrieve data frames or even discover the sampling rate ?