Tuesday, January 22, 2013

Yes I'm still working on stuff....

Jruby, why you so silly.....

I'll keep this simple. In my attempts to use jruby on my freshly installed windows system to communicate with the msp430 over serial, I ran into an issue. Jruby didn't want to run even though it ran fine on my previous install. This was of course an updated version and from searching and reading, I wasn't the only one.  I didn't seem to find a solution to my problem(at least one that didn't involve dling and installing the jdk which I didn't want to do at the time), and in fact had to find the solution on my own.

The Problem: jruby doesn't want to run my .rb files, instead it complains about the lack of a path in JAVA_HOME.
The full error: "Cannot locate Java installation, specified by JAVA_HOME:"
  • jruby -v seems to work fine...
  • jruby myfile.rb doesn't work(fails in IDE as well). 
  • jruby --help works...hmmm...?
  • jruby -v myfile.rb works....really??
So do I need to pass a param to get it to work? Yup!
I don't want to pass something silly like -v every time I want to run a ruby script so the next best thing is to force the version by using --1.9
So "jruby --1.9 myfile.rb" works.

Annoying, yes, but solves at least one of my problems....next, get serialport gem working on the windows side if possible...
I'm still fairly new to using jruby, so maybe this is something that I'm just not familiar with...

After further investigating changing the following values appears to resolve most of the other issues I was running into.
Remove JAVA_HOME env variable completely
set JAVACMD to use c:\jruby-1.7.2\jre\bin\java.exe

Wednesday, October 31, 2012

Wand Buildout

The assembly of the wand became somewhat tricky with the wiring and the electronics package and the container.

The wand handle base was where all of the wires came out. Im glad I had some extra wire but it became a problem fitting into the pill bottle.
The electronics package itself was a bit tricky to construct with the limited confines of the pill bottle, but in the end, it was able to squeeze inside the bottle. The only thing is that due to the extra wiring, it is pushed out of the back and sticks out. Solution, add a bigger bottle to the end.

 This is the bottom side showing the accelerometer. Everything is hardwired so I'll have to desolder it when I'm done.

The top view showing the transistors and power side of the module. Building this out was well...a test of patience...

And finally, the end product. The hand leaves a bit to be desired....but it works. The paint job needs some work, but hey, this could be used for something else later on.

Monday, October 22, 2012

Magic wand continued

Wand handle

This is where the electronics will be stuffed.  This just consists of(fairly obvious) a wine cork drilled out through the center and a pill bottle. I made sure to get the pipe through the cork and stuff the end into the pill bottle just to give it some extra stability. It feels pretty solid as it is, and all parts are pretty snug. I'll most likely use some silicone glue and some clay mache to give the wand a wooden texture, then paint it as such.

The current parts list is the following:
  • MSP430G2231
  • MCP1702 3.3v vreg
  • MMA7361 3 axis Accelerometer
  • Lipo battery 150mah
  • support parts: resistors, caps, switches and wire.
The tri-color LED will of course be at the tip and if possible, I'll set up the resistors in the plastic pipe.

This is the electronics setup. Im using the button on LP board to test the single button that'll be connected to the chip. The only thing I haven't tested with just yet is the vreg, though I've used them before, so it shouldn't be that much of an issue.  Wiring it all up is my only concern...

Sunday, October 7, 2012

So we have this thing at work....and I decided to participate...Harry Potter theme....and I wanted to make something cool...so I decided to make a wand powered by a MSP430 proc....
...and an accelerometer...
hmmmm...I think it may come out pretty cool.
This is just a mockup of the wand with the center glow rod(in blue). The tip end still needs some work, but this is what the tricolor LED will be used for.  More to come as I work on it...

Saturday, September 8, 2012

Powerboard V1.3

This is the third iteration of the powerboard(1.3) that I've been using for work with solar cells. It was meant to be a smart version using a 2211 to monitor the voltage levels via comparator.  The other part of this project board was to also test 2 things. First, printing of the board to get an idea of the size and test the layout. Second was to test a smt crystal. Both of these objectives were reached, but...

Unfortunately there are several issues with the board, most of which can be worked around, but with the loss of designed functionality. I will admit, this is one one poor design and will need to be resolved. With this, I can actually add some new hw functionality, though I'll be doing a bit more checking next time.

Monday, August 13, 2012

While working on some TimerA related testing I decided to do a weekend run of the datalogger. This is still a single channel run until I get the multichannel code tested a bit more. This graph shows a simple light level set of readings for the weekend starting on a Friday and going through to Sunday night.
as I don't have the exact times, I believe the flat lines around the 25-35 level are from an external lamp or from the monitor. I haven't not confirmed it yet. I should hopefully have 2 channels recording this week and can start looking at light levels and temp readings throughout the days. first a simple 1 day test, then a week long test.

Monday, July 30, 2012

Wired up.

Logger wired up with the addon board. This was a quick setup with a button board, sensor board(cds connected) and just a third wired servo wire connector. I also decided to use jst power leads for the battery adapter harness(was tired of the long leads for the original connector). This is connected to an xbee for transferring the data wirelessly, and of course an LP for the programming.
The space taken by the program is currently just under 3k and I have a bit more to add...This is a bit of a concern and I'm considering using a 2453 for the last board as it'll double the amount of program space I have available. I'd prefer not to do this as I think the 4k limit I initially wanted to keep the prog within is still within reach.

Currently the updated code adds a simple header writer function that I've implemented on the single channel recording and another test mode that is suppose to record to 3 channels, though running into some difficulty.  For some reason A.0 only reads as 1024, even when connected to ground....When I figure this issue out, I'll add a blurb to this post describing the findings.