Category Archives: Feldman Project

Tom 5.3.2012

Start: 10:40

  • Read up on decoupling capacitors and found that I am using them correctly but maybe the traces are too long.
  • After careful consideration of how to solve the problems with the boards, I decided to send the negative signal wire from the amp input to ground instead of the negative lead on the pre-amp.
  • This has solved the problem with the feedback loop and made it so only one speaker plays at a time.  Whatever was wrong before must have something to do with the negative traces.  I am not sure if the sound gets as loud as it did before but there seems to be less distortion.
  • Did a bunch of testing with different sounds and stuff to make sure everything was working properly
  • Added board design changes to changes checklist.
  • I haven’t built the connector for Phil to test the analog input yet but if he wants he can use the ones on the boards that are working while I build that tomorrow.  I probably should help with this to make sure the right wires are used.

End: 6:40

Phil 5.2.12

8:00 – 4:30 FP

  • And somehow, here we are back at communication libraries. At least I have an existence proof that it *can* work. The serial console is perfectly happy. Which means the Arduino code is happy. It looks like I get to blame Windows.
  • Serial looks more solid today. Need to integrate the classes so that ArduinoSerial does a straight passthrough to SerialPort
  • Code is fixed and in Subversion. Back to Monday’s task of integrating with the sim.
  • Building the outgoing JSON object. It turns out that trying to set an int value using cJSON->valueint doesn’t work. Use cJSON->valuedouble. If it’s an int, the printing will be correct.
    • SoundObject is up and running
    • PressureObject is created and waiting to be populated.
    • Tom is building a connector so that I can interact with the pressure sensors tomorrow.

Phil 5.1.12

8:00 – 5:00 FP

  • Generalize JSON parsing in the sketch
  • Integrate serial communication into the demo. Fail gracefully into a GUI-only system
    • Add sound?
    • Adding DataObjects for sound type & volume (inputs) and pressure (outputs). Done
    • And now the serial code is choking again. It seems to be related to the size of the stream that’s sent up. Looking at that after lunch. First test will be to read on the pc without writing, while having the arduino write at faster and faster rates.
    • I got things to work better, but not as well as the serial console. Found a serial library on google code (http://code.google.com/p/mbsutil/). Going to try to use a few pieces from that ad see if it will work better. Got it to compile. Tomorrow, I’ll try to integrate it…

Phil 4.30.12

8:00 – 4:30 FP

  • Seminar. Last one for the year!
  • SF86 follow up
  • Updated resume
  • Talked to Tom a bit about his preamp problems, and worked out a way to proceed.
  • Looked at the Arduino, but did nothing with it. Back to a normal schedule tomorrow.

Tom DeVito 4.30.2012

Start: 11:30

Board Design Improvements:

  • Add a switch for turning the board on/off
  • Move input leads so that the mounting hole doesn’t intersect with one of them.  I don’t think this is the cause of the issue as the one that works well has this same issue.

Potential solutions to the feedback issue:

  • Send the input signals negative lead to group instead of to the negative on the pre-amp
  • Possible need for another voltage regulator on 12 volt side.
  • Need to rebuild board on a breadboard to experiment with possible solutions.
  • Check current on 5 volt branch to make sure its not going over 1 amp.
  • Isolate out pre-amp to see if the problem is with that circuitry.

End : 3:15

Phil 4.28.12

1:00pm – 5:00 FP

  • Brought in some more tools
  • Seeing whether Tom and I can integrate the hardware for the show. Nope – feedback issues in the audio
  • The burn test ran fine for approximately 20 hours at 19.2 kbaud. I’m going to work on creating a separate library and then integrate into the KF hand code.
  • built separate library. Realized that I need to put in the JSON reading code on the PC side. Done.
  • Added string assembly code to arduino JSON library and tested
  • Committed all to Subversion

Phil 4.27.12

8:00 – 6:00 FP

  • Put all my arduino communication work in SVN in my sandbox folder. Pulled down a copy to the laptop to check later
  • PAD lab meeting at 10:00
  • It looks like you really have to be careful with the memory on the UNO. The aJson print() function seems to be sloppy about the strings it creates, even if you re-use the object. I created a function that stitches together the force values inside a JSON compatable string and sends it straight over the wire. That’s been working fine for about an hour now (it’s 5:45). I think I’ll let it burn for the weekend.

Tom 4.26.2012

Start: 10:00

  • Went to get some more wire and smaller bolts
  • Made a bus for to I2c
  • Populated another board
  • 3rd board is mostly populated minus the amp and midi shield
  • The third board only has half the electronics as it only controls one finger instead of two
  • Had some trouble soldering the midi controllers because there was solder stuck in the hole.  The connections don’t look pretty but it trying to get them perfect was breaking the boards.  The midi and reset pins have jumper pads which made them a bit easier to deal with.
  • There are still a few things to do.  I need a ground bus for the shared ground, wires for the midi to arduino, wires for sensors to the arduino, and the amp and mid controller on the third board need to be attached.  I crimped most of the other wires but have not put them in the harness yet, some may need to be redone.  I plan on being in at 7:00 or 7:30 tomorrow to finish this stuff.  It is realistic to expect me to be done with this part by either 10 or 11.

End:  10:00

Phil 4.26.12

9:30 – 4:30 FP

  • Slept as much as possible, hoping to become unsick. I think I feel better today
  • It looks like the serial code is working much better. I was trying to determine the size of character buffer using strlen(). Without a null-terminated string to measure, that just won’t work. Thanks to Tom for pointing this out.
  • Getting the json strings to play nicely with the ajson parser. looks like *no* spaces allowed outside of quotes. This is allowed:
    • {"f1_vol":0.10000,"f2_vol":0.20000,"f3_vol":0.30000,"f4_vol":0.40000,"f5_vol":0.50000,"f1_snd":1,"f2_snd":2,"f3_snd":3,"f4_snd":4,"f5_snd":5},
  • while this is not:
    • { "f1_vol":0.1, "f2_vol":0.2, "f3_vol":0.3, "f4_vol":0.4, "f5_vol":0.5, "f1_snd":1, "f2_snd":2, "f3_snd":3, "f4_snd":4, "f5_snd":5 }
  • Sending and receiving the appropriate json objects. Now let’s try to update and resend. Done and working. A pretty good day.

Phil 4.25.12

8:00 – 4:30 FP

  • Working with my various implementations of JSON
  • Working on the parser for the arduino. It’s a 4 state machine that looks for ‘>>’ to signify a new message and ‘<<‘ to signal the end of a new message. The memory for the string to be processed starts at 128 bytes and gets incremented by 128 bytes each time it runs out of space. Done.
  • Got the parser up on the arduino running, but I seem to have messed up the serial port and made it block. Am able to reset by running the terminal program…
  • Code runs fine on the Arduino when I send the string from the console. Need to figure out what’s wrong with my serial code.

Tom 4.24.2012

Start: 10:00

  • Fixed the problem with the states getting stuck during the echo test
  • Tested large data transfer.  The data looks fine but it doesn’t stop cycling on the last packet
  • Working on changing the states to something a bit more predictable and clear.  there are too many weird problems as it currently is.

End: 6:00

Phil 4.24.12

8:00 – 4:30

  • My lungs have turned into a petri dish. Need to make an appointment to kill these things. Call at 9:00
  • Got an LCD shield for debugging: http://www.diybin.com/products/DFRobot-LCD-Arduino-Shield.html
  • Have a good non-blocking read working
  • Have a block write working
  • Think I’m going to try using JSON for communication – there’s a library for the Arduino
    • Downloaded aJson for Arduino
    • Downloaded cJson which it’s based on for the PC side. Integrating now
    • Had to change the cJSON.c to cJSON.cpp for the compilation to work correctly. This may actually make more sense to make into a static library. Going to play around a bit more before making a decision.

Phil 4.23.12

8:00 – 5:30 FP

Tom 4.23.2012

Start: 10:00

ComMgr testing:

  • Send Data works with one byte both sides
  • receive Data works with one byte both sides
  • It turns out that the receive buffer on the arduino side only accepts 63 bytes now instead of 127

ComUtil

  • Initializes properly
  • Both get to ready state properly with no loaded data
  • Single pass writing from PC to Arduino moves through states properly
  • loaded 504 bytes of data in to test packet counter.  It properly returned 8 packets of 63 bytes each
  • There may be a problem with multi packet send terminating improperly on the last packet
  • Tested transfer from arduino to pc.  This works and printed out correctly.
  • In the echo test the computer can receive and respond but it gets stuck on the arduinos response.  The arduino sends the first time fine.

End: 5:30

Tom 4.20.2012

Start: 10:00

  • The states of the ComUtil now cycle properly.  If data starts on the PC side but the data doesn’t print out properly when transfered back from the arduino
  • When starts on the arduino side, its prints out properly but then gets stuck after the trys to send then goes into a state that it shouldn’t be able to get to.
  • There is something wrong with the receive method on the arduino.
  • The Mega has 4 serial ports.  I can print out variables and stuff on another port without interfering with the data transfer.
  • Noticed that TRUE on the arduino is defined as !FALSE.  On the PC TRUE is 1.  I can’t see why this would cause me to get into odd states but considering the code is identical on both sides and the arduino is being more wacky than the PC maybe this is the problem.

End: 6:00