Showing posts with label udoo. Show all posts
Showing posts with label udoo. Show all posts

Sunday, July 10, 2016

UDOO Neo Weather Station

I have been running my UDOO Neo solar powered in my shed for a while. I have been meaning to attach some bitcoin miners to it, just to support the network, since I am too far behind the curve with hardware to make any money off it. From what I read, the mining farms have taken over a whole hydroelectric dam somewhere in China.
Solar powered UDOO Neo
Anyway I finally got around to attaching the I2C bricks sensors that came with my UDOO Neo kit. There is an LM75 based temperature sensor and an MPL3115 based pressure/temperature sensor which can used an altimeter/barometer. These 2 sensors can be used to get some basic parameters for upload to Weather Underground or simply Thingspeak.

UDOO Neo with Sensor Bricks
The first set is grabbing the data from the sensors. The UDOO comes with modules to map the i2c devices to the linux device tree and fetch data from them by simple file reads, no I2C knowledge needed. I also found Tentacle Pi which is essentially an I2C multiple device driver library for Python. In my solution I ended up using a hybrid approach of direct i2c reads using Tentacle Pi and some /sys/ reads.
Results of i2c scan on channel 1
 The MPL3115 is read using the /sys/ method as shown in the gist below:
The LM75 is read using direct i2c and Tentacle Pi:
There is a few degrees of discrepancy between the 2 temperature readings, however I trust the temperature from the dedicated temperature sensor more. A simple test to show the data on console works fine.
Testing sensor bricks
From there it is a matter of pushing it out to Thingspeak to get a graph. I am looking at adding other sensors from the future bricks line or designing some myself using my I2C knowledge, particularly a wind speed sensor and a light sensor. The wind speed will help me determine if I can install a mini windmill generator and I can use the light data to correlate my solar panel output to solar intensity.

Wednesday, January 6, 2016

The shed solar project - with UDOO Neo

A while ago I was planning to power my external work area from solar power. So I went ahead and orderer a couple of 100W solar panels from China. They cost $100 including the charge controller with another $100 for FedEx shipping. They have served me well so far, should have ordered some more. They have been keeping a 130Ah SLA battery fully topped up for a couple of years now. I never got around to acquiring an inverter, so my soldering stations are not yet solar powered.

After accumulating electronics parts, devboards and recycling TV parts for a year I had enough bit floating around that I had to construct a shed to put them in. At the very far end of the backyard, away from the house. It is a major hassle deploying electricity to the shed. So I decided to take the panels, which were languishing against a pole in the back verandah, and deploy them on the shed roof.


I installed the PID charge controller and massive battery on the inside together with some LED bar lights, suitably coated in clear silcone for weather proofing. Ultimately there are plans to build an MPPT controller and add some monitoring for solar energy generation as well as add some bitcoin miners for network support. The Carinya brackets I used to install the panels cost as much as single panel, next time better order brackets as well.

The LED's are controlled by a small $2 RF remote with a dimming and flashing function. A bit of an overkill but it makes for great raves in the shed. Being basically the large galvanized steel box the shed has very good RF shielding and an external weather proof antenna will be required for any sensor install and wifi connectivity. So I have hooked up a TPlink external antenna and placed a Udoo Neo with mods for an external antenna there, more Udoo + shed related posts to follow.

Saturday, November 30, 2013

Reflashing BFL Jalapeno with UDOO

I funded the UDOO kickstarter a while back and received it a few weeks ago. The bot I was planning to put it on already has a controller, so the UDOO now lives a sad life as a BTC mining hub.
JTAG Port Pinout - Jalapeno has silk screen for 1 and 9

Testing the GPIOs on the UDOO manually
I have a couple of Jalapenos which I overpaid for on eBay and are all sold out due to Black Friday, but the prices are going up on BTC and I figured I could make them slightly more desirable for resale by performing a firmware upgrade. There are guides for performing the upgrade using the AVR-Dragon JTAG and the Raspberry Pi. Since the UDOO claims to be 4-Pi's in one it should be more than capable of running urJTAG using the GPIO cable and reflashing. The compilation took a couple of attempts due to the lack of back-up battery on the UDOO, every time I rebooted the time had an epoch reset and make got stuck in an eternal loop, eventually it settled down. You can also apt-get install urjtag, but that version does not have the GPIO cable.
UDOO GPIO pins used

On the UDOO we have a very large selection of GPIO's to choose from, for convenience I selected 4-near the edge - 88,56,105,89 and 144 for reset. Then used the Pandaboard GPIO toggling guide to get into the /sys/class/gpio file structure and quickly test these pins with an LED. The UDOO GPIO's are at 3.3v so it is safe to use them with the Jalapeno. I also colour coded the cables for future reference. Here is the table of the colours and pins on both the UDOO and the Jalapeno. The reset pin can be toggled using the LED testing method above to reset the board if you get stuck, simply output "low" then "high" to GPIO 144.
Cabling between Jalapeno and UDOO
Function Colour Jalapeno  GPIO
RESET Grey 6 144
TCK Yellow 1 89
TDO Purple 3 104
TMS Orange 5 56
TDI Blue 9 88
GND Black 2 GND
Once everything is connected fire up the Jalapeno and reflash it using the JTAG command chain below. I would really like to gather some statistics on the results of the detect command to see which CPU people have.
urJTAG reflashing of Jalapeno AVR
That's it, a great use for the many UDOO GPIO's go crazy and hook up 10 Jalapenos at once and run a reflashing service or send it to me for a reflash. If you found this useful BTC donations are welcome - 1JGoD1muFP5RiGPUWF12ncYz2WreYk35Rh .