Random Projects and Comments

Home Archive for category "Arduino"

Sanguino for Arduino >1.0 Release

 

Put together a full release of Sanguino that supports version 1.0.1.  Actually ended up not being as difficult as I expected since most of the directory layout has stayed the same.  I was hoping to use the new ‘variants’ to avoid making changes to the core files but ended up needing to do that to get some stuff working.Like I have said before the new method the Arduino team is using to guide the precompiler for different chips by using whether registers exist or not is much better and makes porting it to different hardware much easier.  Unfortunately the few libraries I have has issues with did not follow this lead.

The SDcard lib which is included with the install now has pin assignments hard coded for different processors rather then referencing the core/variant.  It is a quick workaround if you want to use Sanguino (with a atmega1284) with this libary.  Simply change line 120 of ‘arduino-1.0.1/libraries/SD/utility/Sd2PinMap.h’ from

#elif defined(__AVR_ATmega644P__) ||  defined(__AVR_ATmega644__)

to this

#elif defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644__) || defined(__AVR_ATmega1284P__)

I was able to get my DataLogger project up and running with a fresh bootloader burn and recompiled in 1.0.1.  The project uses SPI, I2C, ADC, and both UARTS so I generally use it as a test case since it covers the most common features used.  I did have to modify my GPX, and Producer/Consumer libraries to work with 1.0 which was fairly easy. Mostly just changing WProgram.h to Arduino.h in a few places as well as some string functions which changed.  I’m going to clean those up and post them soon hopefully.

You can grab the new version over on Google Code: http://code.google.com/p/sanguino/downloads/detail?name=Sanguino-0101r1.zip

 

 

Sanguino for Arduino >1.0

Published on July 15, 2012, by in Arduino, Software.

After putting it off long enough I started working on updating Sanguino to work with Arduino 1.0 and higher.   It looks like this could actually be easier then any version since. It looks like the Arduino guys are now doing all core features based on register values.   I first saw this tactic from msproul at http://www.avr-developers.com/ and used the same method whenever possible when I was modifying the core for Sanguino.

I haven’t really done any extensive testing but I was able to get blink, SPI, and UART functions working by just adding a ‘variant’ to the original core.  This brings up an interesting delema, which is how to install Sanguino.  If I stick with it as just a ‘variant’ (which I would really like to do) I need to be able to install into the variant directory which isn’t a big deal, but also append to the board.txt. This is no longer as simple as unzipping an archive into a directory, the boards.txt step would have to be manual or some sort of setup routine run. Not to mention making all of that cross platform.  I need to dig deeper but I’m guessing that using things like extra interrupts or UARTs might require actually modifying the core which will make my decision for me.  The traditional approach of adding a completely new directory under hardware is an option but I want to make that a last resort.

(more…)

 

New Sanquino Version 0023R4

Published on June 23, 2012, by in Arduino, Software.

The last few months has been busy for me, but I’m finally getting time to put back into electronics.  I had found that INT2 was not accessible with the previous Sanquino core I had built so after fixing that as well as a couple other bugs others had pointed out I put together a quick release.  As I say on the Google Code site, this will probably be the last release for Arduino 0023.  I am going to start putting my time into getting the bootloaders/cores working with Arduino 1.0 ( If possible)  I do not want to go the route of a fully forked arduino environment.  There is not necessarily anything wrong with that but I like the idea of a plugin much better and hopefully we can keep that alive.

Download the new version HERE

 

Sanguino Dev Enviroment

Published on March 4, 2012, by in Arduino, Software.

Should have posted about this earlier. I have been updating the Sanguino project over on Google Code with the changes I have made to support the atmega1284P and support up to arduino 0023.  If you have issues with the HEX files I posted here earlier check out the new versions.  If you still have problems open an issue on google code, I try to go through the issues reported ever week or two.

 

GPS Logger Hardware v4.2

DSCN0923

I didn’t change anything with the electronic parts, but did get a new case for the data logger.  I tried long and hard but could not find a way to fit the GPS antenna inside the case.  The Molex connector goes to the  status LED and switch shown earlier.  The switch I changed from being a run/stop switch to just switching power, which allows me to get everything packaged up the night before. The usual status LEDs are inside the case, but are not visible during operation, which seems to be ok.
DSCN0929

The board doesn’t line up with any of the mounting holes, even REV:B which I added mounting holes do not line up, I am pretty sure I can modify the board to fit these mounting holes though.  Over all this case it larger then I would like, hopefully with some other modifications I can get the size down a bit.  Putting it into this case did stabilize the device quite a bit, I had a good run which I will talk about in another post where it did not reset all day and churned out some very nice data.
 

 

No More Flying Wires!

No more flying wires!

Finished board, I don't think the date is correct should be 11/19. Least the rev code is right.

Now on REV: C finally no flying mod wires on my accelerometer / gyro board. Only the accelerometer is populated as I left off the RC filter for gyroscope, so the board is only half working. With the micro, xbee, and accelerometer it draws 57.4ma. Since the xbee claims to take 50mA, 7.4mA for micro and accelerometer seems pretty good.
DSCN0905

 

Skiing Data

FullTrack-121211
The first trip I took the data logger proved that for some reason there is an error that stops it from logging after about an hour and a half. Since I powered it up before leaving home it had stopped before getting to the mountain. Went out again yesterday and this time powered up the logger in the parking lot and actually got some data! It did stop again after about an hour and a half so I only captured the first three runs. I did reset the main processor at lunch, but it did not start back up so I am guessing it is something on the sensor processor which does narrow down the issue at least.
ZoomTrack-121211
The detail was good, especially after the initial run, I’m guessing it locked some additional satellites once I reached the top of the mountain, as the initial chair lift up track has about 20ft error the west. The one of the tracks does show crossing the trail to stop show above. I want to get the timestamps and speed working next, and hopefully figure out why it stops after an hour and a half.

 

GPS Logger Hardware v4.1

DSC_0079
I’m now back to the same functionality I had on the version I built on proto boards though now much smaller. I added a run/stop switch on the side. Each transition from stop to run will result in a new file being started. Two lights on the top, the green one is lit when the uC is in a ‘RUN’ state, the red one flashes after each track point is written to the SD card.
DSC_0071
Since the plan is to use this while skiing I used a LilyPad wearable switch and LED sewn into a glove for status and control. The LED is just a duplication of the SD write led on the case. As long as it is blinking, there should be data being written to the card. Each push of the switch will result in a new track segment started ( and the old one closed ).  I couldn’t find any of my LED LilyPad stuff so I de-soldered one of the switches and mounted a 1206 LED across the pins. The glove is connected back to the main box with a three conductor ribbon.
Hopefully will be trying this setup out tomorrow, interested to see if it actually works.

 

More Data!

DSC_0043
Was able to get everything working enough to record some tracks today. The box I used was a bit larger then I would like but it’s the only thing I could find. The tracks came out pretty good as far as accuracy, and it does not appear that it dropped any points.  Still do not have the timestamps working so I can’t be 100% sure on that last part.   It did create three different files indicating that the main uC reset for some reason, though it did recover.
2011-12-03-161550_1366x768_scrot
There is some issue with my GPX library, I think strings have some additional overhead in the new version of arduino which is causing problems.  I was working on converting things to using pgmprint and char*s anyways so I will keep moving forward with that.  I’m going to add some switches, secure the box some more and try again tomorrow.

 

Dev Environment r2

Just a quick update to the Sanguino enviroment I’m working with.  Fixed an issue in boards.txt where only one of the 1284 boards would show up. Also changed some pin definitions so that hardware SPI works. Full details here.

Sanguino-0023r2.zip

 
credit
© Ryan M Sutton, 2015