Tom.DeVito 3.1.2011

Finally have the Arduino, capacitors, and the SOMO 14-D.  Still need to figure out what micro-SD memory card to get for the SOMO as not all are compatible.

Computer Controlled Amplifier

  • To reduce number of problems, the oscillator circuit will be used to produce the sound.  Later this will be replaced with the SOMO 14-D.
  • Fried first amplifier because I had the pin numbering wrong.  Pin numbering on ICs is numbered down on the left side then up on the right side.  For some reason I thought it was down on both sides and got the VCC and GND pins reversed causing smoke.
  • The capacitor used to filter the audio signal is not supposed to be polar but a polar capacitor will work as long as, the positive side is on the pin and the negative side goes to the audio source.  This seems strange considering the direction of the current but when I had it the other way no sound came out.  Luckily the audio signal isn’t strong enough to blow the capacitor.
  • Switched piezoelectric speaker with regular speaker to make sure it wasn’t causing problems due t it having a higher resistance
  • Realized that when the amplifier was changing volume the sound light sound would cut off.  I figured this was due to lack of power.  Took the whole circuit off the i2c-usb controller’s power and onto the power supply.
  • Was not able to change the resistance on the the rheostat chip.  Realized that all i2c controlled chips must be grounded to the i2c controller gnd.
  • Test class worked for controlling volume!
  • The amp has to be muted digitally in order to get absolute silence.  The piezoelectric speaker, due to having a higher internal resistance, can be adjusted down to being “muted” without having to control the mode of the amplifier.
  • The piezoelectric speaker seems to work well.  Not sure how good it will be for playing sounds, instead of tones.  Need to find out if I can get samples of those tiny speakers I mentioned in a previous post.

Arduino

  • Considering part of the goal is to reduce the number of usb devices(not a very important goal but still), the mega would have probably been better then the Uno.  That said, the uno should be useful to see if it will work for our application, and should have enough outputs for a two finger prototype.  Another advantage of the mega is it can speak i2c which would eliminate the need for the usb-i2c adapter.  However, if I find its better to control the mute function on the amplifier with the second rheostat on the variable resistor chip, we will need two i2c channels in order to communicate with 5 amplifiers.
  • Before I attempt to get the Arduino to communicate with the SOMO 14-D, I am going to try some basic tutorials to make sure I understand how to program it.

Speakers

  • Spoke to a representative at Murata to see if we could get samples of the VSLBP2115E1200-T0.  He directed me to a local distributor Glen White Associates(434-385-6110).  He also said that the Speakers should be used with a audio amplifier for ceramic speakers.  There is no problem with using a regular amplifier but it may not be loud enough due to the higher impedance.

Dong Shin 03.01.2011

  • PPM
    • reworked Data Request update queries to allow new entries. This will remove non-selected and existing data, update current, add newly selected.
    • working on exporting Financial Data Request to Excel.
      • added project headers
      • added user/contact information
      • added for each project
        • Budgets
          • financial data for selected year from Oct to Sep

Mike 3.1.2011

I figured out how to intercept the property assignments between java objects and when Hibernate places them in the database.  Combining this with the ability to create run-time Hibernate table mappings, I can take pretty much any object or structure of objects and place them in to a database.

Phil 3.1.11

9:30 – 7:00 VISIBILITY

  • Dentist this morning
  • Testing Dong’s code. It looks good as far as it goes. We need some kind of excel export for the financial info.
  • Added a page for PPM req’s (for 2011) : http://www.fgmdev.com/blogs/?page_id=4987
  • Somewhat useful tutorial for RServe: http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Drafts/Urbanek.pdf
  • Here’s another: http://www.stat.auckland.ac.nz/~iase/publications/17/C340.pdf
  • Building a more robust data.frame reader. Done
    • It turns out lists can be recursive. I temporarily have the DataFrameReader calling itself, which kind of works but could be better. Fix tomorrow.
  • Working my way through getting some basic calculations. There are some issues where if a string is assigned it is not considered a factor (whatever that is…). Unlike in the R interpreter, a factor must be explicitly set (i.e. “menuType <- as.factor(menuType)”)
  • Went to the customer site and sat around for two hours.

Dong Shin 02.28.2011

  • PPM
    • reworking Financial Data Request
      • Request spans from earliest FY and latest FY in selected projects
      • Request template creates monthly request status
      • Data Request Panel start in current year and month, removed All and reworked filtering
      • Individual Project Status added
      • added data_request_templates table and reworked _data_requests_projects and data_requests tables

Mike 2.28.2011

More work on the data system

  • issue with reserved column names, dealt with it by appending underscores to the beginning and end of each column name mapping
  • issue with longs strings, first tried clobs for any string > 250 in length but that involved casting back and forth so instead put in some logic to double the available length every time it doesn’t fit starting at 255, then 511, 1023 etc.
  • Successfully saving strings, integers, doubles, and booleans.  Now need to save references to other objects.

I had to share this line of code from a Hibernate java class:


private static class IncrediblySillyJpaMapsIdMappedIdentifierValueMarshaller implements MappedIdentifierValueMarshaller{

Christine 02.28.2011

It’s been a while, but I wanted to compile a bunch of info before posting since my schedule has been so sporadic.

  • Been working with Tomcat/Eclipse/Flash setup on both Mac and Windows.
    • SSL: Although Dong sent me his .keystore file, it was out of date and contained his info. Created new certificate keystore, then modified settings.xml file.
    • Took a few steps back to try and get a test project working. Combining Phils steps with additional documentation, I was able to successfully get a Flex/Java project working on both mac and windows… with one snag. Question: Why does Tomcat’s settings.xml file reset itself when using Tomcat through Eclipse? (side note: my Mac and Win eclipse are set to “use Tomcat Installation”) Here’s what I found – after modifying the settings.xml file to use SSL, when I use Tomcat through Eclipse SSL is no longer enabled. When I check the settings.xml file I find that it’s been reverted back to its original state (with the SSL connector info commented out and the keystoreFile info removed). Is there a way around this?
    • As for getting a test project to work, I ended up downloading BlazeDS.
      • In Eclipse I start a new project by going File < Import and selecting Java/War file. Name my project and click "finish".
      • Right-click on the project and select “Add/Change Project Type” < "Add Flex Project". I configure the server type to be BlazeDS and click 'Next'.
      • The following screen should be configured as such: Root Folder-Point to the WebContent directory of your project, or if you changed the name point to the folder with the WEB-INF and META-INF directories in it; Root URL-end with project name; Context URL-is the last part of the URL minus the ‘/’. Validate the server location and click “Finish”. (You may see a “Recreate HTML Templates” error in the ‘Problems’ view. Right-click and fix)
    • After this was set up, I moved over the xml files from a working project (see Phil’s post, step 9). Because I created the project as an import using BlazeDS war file, the (basic) jars needed were already imported and a web.xml file was already created. So then I refreshed, rebuilt and tested by going to “http://localhost://messagebroker/amf&#8221; and it worked. yippee.
    • But my celebration ended abruptly when I tried to test the secure messagebroker only to discover that the settings.xml file was reverted back to it’s original state. Need to find out why.
  • Thanks to Phil for helping me deal with Window administrative issues that was making it impossible to run Tomcat. Windows and I have been through a few counseling sessions and we’re starting to get along

Phil 2.28.11

7:30 – 4:30 VISIBILITY

  • It’s starting to feel more Spring-like than wintry. Got 107 miles in on the bike this weekend. My legs are very, very tired.
  • Going to try to do some compound actions with RServe, including running a query and generating a plot into a particular directory. If that works, I’m going to put that code in a remote object and try to trigger it from Flex.
    • Making progress, but getting data out of Rserve data frames is very goofy
  • Cloud-based IDE? – http://www.cloud9ide.com/. Some more stuff here: http://query7.com/cloud9-ide-review
  • Worked with Dong on getting the PPM requests organized in a by-month fashion.

Mike 2.25.2011

  • Helped Alan out with some blog difficulties
  • Made it so you must log in to the SCT blog in order to see anything
  • Added a better log in screen to the SCT blog
  • More work on the data service
  • Able to load object made on the server just fine
  • Had some difficulty creating objects on the client then saving them, the issue was conflicting ids
  • There is now a Flex client ID if the object is made on the client side
  • otherwise the database id is used on both sides

Dong Shin 02.25.2011

  • PPM
    • created DBUpdateSQLs02252011.sql for adding data request tables
    • working on Project export
      • Get all budget centers and amounts query
        SELECT
        c.center_name as `Budget Center`,
        c.center_number as Number,
        GROUP_CONCAT(if(a.year=1,a.amount,NULL)) as FY1Amount,
        GROUP_CONCAT(if(a.year=2,a.amount,NULL)) as FY2Amount,
        GROUP_CONCAT(if(a.year=3,a.amount,NULL)) as FY3Amount,
        c.appropriation as Remarks
        FROM projects p, budget_centers c, budget_amounts a
        WHERE p.uid = c.project_id
        AND c.uid = a.budget_center_id
        AND p.uid = 96
        GROUP BY a.budget_center_id

        SELECT c.center_name as `Budget Center`,c.center_number as Number,
        GROUP_CONCAT(if(a.year=1,a.amount,NULL)) as FY1Amount,GROUP_CONCAT(if(a.year=2,a.amount,NULL)) as FY2Amount,GROUP_CONCAT(if(a.year=3,a.amount,NULL)) as FY3Amount,
        c.appropriation as Remarks
        FROM projects p, budget_centers c, budget_amounts aWHERE p.uid = c.project_idAND c.uid = a.budget_center_idAND p.uid = 96GROUP BY a.budget_center_id

    • Array Collection not returning data in ordered manner? May have to write own parser…

Phil 2.25.11

7:30 – 4:30 VISIBILITY

  • Looking for the mythical java client for Rserve. It does not appear to be in the distro or the svn trunk repo
  • Found it. It was in the snapshots here: http://www.rforge.net/Rserve/files/.
  • compiled the Rserve jar (using make!). Put it up on the maven repo as net.rforge.rserve ver 0.6.3
  • Added R.dll to my path
  • Started the server and connected to it with Putty. The connection was successful, and then the server crashed. That may be because PuTTY sent some bad characters.
  • Talking to the server in java without killing it. Wheee!
  • Writing up a description of our data migration plan – done.
  • Actually able to run an ANOVA and understand what I was doing. I think I can even generate plots and have them put in a particular server folder so that they can be downloaded and displayed in flex.

Tom.DeVito 2-24-2011

Arduino research:

  • Found many links regarding the Arduino electronics platform:
  1. Explanation of different version:    http://www.ladyada.net/library/arduino/unofaq.html
  2. Tutorials: http://arduino.cc/en/Tutorial/HomePage
  3. 414 Arduino projects and counting: http://hackaday.com/category/arduino-hacks/
  4. Search engine for chips: http://www.findchips.com/
  5. Ada’s Store: http://www.adafruit.com/
  6. Sparkfun Store:  http://www.sparkfun.com/
  • I determined that the version we want is the Arduino Uno.  I believe that all latest versions have similar specs, but this one is probably the best for our stage of prototyping.  A smaller one, which mounts onto a board may be better once the electronics are finalized.
  • Due to the recession, DIP chips are getting hard to find because many producers are cutting costs by only make SMTs, which have higher demand.  This is making it so the arduino’s main chip is becoming increasingly rare.  There is a SMT version now to help keep up with demand.  I figured we should stick with the DIP chip while we still can.
  • The Arduino cannot directly control our amplifiers.  This can possibly be done using a gate to route the current through a volatage spliter maintaining a Float, open or close the gate with a second pin to bypass the voltage splitter to make a High and turn off the main pin to make a Low.  This may be easier to program then the current method because you just have to control 2 pins.  That said the Arduino can communicate with i2c devices like the rheostats
  • The Arduino is very easy to program.  Basically you just initialize and loop.  Communication to the device works very similarly to communication with the usb-i2c master chip.  Just set the arduino loop to listen to the com port and do various things depending on what it is sent.  On the PC side its identical to the i2c program, since the Arduino has more memory, I believe the commands can be in the form of char arrays as opposed to hex only.
  • When we were looking at ladyada.net you asked where do people get the time to do all this stuff?  The answer is MIT.  All the students are required to have a website.

Other Electronics

  • I’m going to call the murata company and see if we can get some samples of http://www.murata.com/products/catalog/pdf/p82e.pdf.   They are finger tip sized full-ranged peizoelectric speakers.  Currently I can only find them in quantities of 2000….  They really look perfect for our application but don’t think we will need 2000 til we start production.  (not to mention its still $5 each at this quantity)
  • There are some other options for speakers but I haven’ sen any that look as good as those.  Most speakers this size have a far more limited range of sound.

Amplifier Circuit:

  • Waiting on a few capacitors that were not at the electronics store.
  • Found a small portable break-out board to play audio with. http://www.sparkfun.com/products/9534.  Its has somewhat of an amplifier but only 7 volume settings so our amp chips will still be needed.
  • Needed a bigger breadboard to prototype this circuit.  Not nearly enough room on the one I have
  • Audio will be driven by the aurdino.

Dong Shin 02.24.2011

  • PPM
    • added reset filters on Requests Data
    • joining projects, budget_centers, appropriations doesn’t return projects with 0 budget because those might not have budget centers data – fixed by adding OR p.total_budget = 0 in the query
    • removed colors for projects and added status – incomplete gets red
    • rearranged project filter buttons
    • reworked Active Year filters
    • added tooltips to projects datagrid

Phil 2.24.11

8:00 – 5:00 VISIBILITY

  • Now that I’ve got rJava/RMI working, I’m going to try building a few composite commands and parsing the results.
  • And now I’m wondering if rServe makes more sense. It appears to create a separate workspace for each connection. That would work much better for a webapp. The only thing to watch out for is that the server goes down now and then, so it will have to be restarted under control of the Remote Object.
  • Spent the afternoon with the customer drawing diagrams of how our data will be packaged and migrated between platforms.

Mike 2.23.2011

  • Finally resolved the deletion issue
  • Now working on a basic Flex app for browsing and managing the data base
  • It currently:
    • Displays a list of all existing object types
    • Can retrieve and display all dynamic objects of a selected type
    • Displays meta information about each object type (property names and primitive types)
  • It will:
    • Allow new object types to be created
    • Allow modification of existing types
    • Allow deletion of object types (including removing of every dynamic object of that type)