SUNDAR project

In the interest of trying to determine my heading for the AVC robot competition, I have been working on a celestial solution. I am calling this device a SUNDAR as a hybrid of SUN and RADAR. In essence I am making a rotating platform with an optical sensor that will find the sun and therefore be able to report an azimuth. Continue reading

Posted in AVC, SUNDAR | Comments Off on SUNDAR project

Lightning detector update (AS3935)

In a previous comment, I was informed that I had a bug in the software I posted on GitHub. Seems that I forgot to implement the 2 millisecond delay before reading the interrupt service register. Not sure what happened as I know at one time I had it implemented. In aanycase the bug was real and I fixed it. Along with the fix the code now supports both SPI and I2C. This allows users of the Embedded Adventures or the Tautic break out boards to get up and running.

Unfortunately, mother nature did not cooperate by providing me with a storm to test against. More news later.

Posted in AS3935, Lightning detector | 5 Comments

Azimuth

Determine ones heading in an autonomous vehicle is very important.  Without it, it is very hard to navigate a race course like the one for AVC. I have been very involved with FIRST LEGO League (FLL). The experiments that I did with my team conclusively demonstrate that controlling heading accurately is paramount. Make a turn and not have it be exact then drive some further distance and you pretty much have no idea where you are. In the case of FLL, you need to zero out your error by registering against objects. Continue reading

Posted in AVC | Comments Off on Azimuth

Not feeling the love

It is 12:30 at night and I was woken up by a thunderstorm raging outside. Heard the rain, saw the flashes, and heard the thunder. Went downstairs to look at the output of the AS3935 based lighting detector.  Dang thing is just listing most of the lightning strikes as “disturbers”. Only rarely is it calling them strikes. Just now the house shook from strike less than a mile away the device did not pick it up.

Either I have something wrong with the support circuit or software, or this chip is not worth the silicon is was made from.  I would love to hear from other users if they have had good luck picking up storms.

Posted in Arduino, AS3935, Components, Lightning detector, Processors, Projects | 4 Comments

Roving Networks RN-42

Over the weekend I took a side trip with my AVC processor to include a wireless BlueTooth transceiver. This will allow me to communicate with the robot as I run various experiments. It turned out to be fairly easy. Continue reading

Posted in Arduino, AVC, Processors, Projects, Uncategorized | Comments Off on Roving Networks RN-42

Magnetic flux

I have been playing with the magnetometer in the Pololu 9DOF IMU. I recorded the data into a CSV file and plotted it in Excel. At the time I did not think much about it, but one evening as i was drifting off to sleep, I suddenly wondered why the Z axis (vertical) reading were so much larger than the x or y. Z was about twice the the maximum of X or Y.

After downloading the World Magnetic Model software, I now have an answer. In my neck of the woods (New Hampshire N42, W78) the magnetic flux lines are not even remotely parallel to the surface of the Earth. In fact they dive down at a 68 degree angle towards the North pole!

This accounts for the large values of Z flux and the tiny weight on marine compasses that allow you to balance the compass dial. If you did not adjust the weight as you move north the needle would dive down to the North and not be level. This also explains why when you buy a top of the line marine mechanical compass you are often asked where you sail so they can set it up for you.

 

 

Posted in AVC, Pololu 9DOF IMU | Comments Off on Magnetic flux

I have a full year till AVC 2014!

A few months ago I came to the realization that I would have to abandon my bid for AVC this year. A whole bunch of issues came up in my work and private life that made it impossible to work on the project. I had half considered flying out just to watch the competition, but the expense of it just did not seem to be appropriate. But that does mean I have a full year to get get ready for the next AVC!

And along those lines, I have gotten some time to get back working with my entry. Over the last few days I have been characterizing the magnetometer in the Pololu 9Dof IMU. I built a 2 foot diameter non motorized turntable with a one degree accurate scale. I put the IMU on the turntable and recorded 20 data points at every 10 degrees. Plotting the X and Y data gave a very nice sinusoidal 90 degree out of phase plot. Interestingly the sensitivity of each axis seems a little different and not centered on zero.

The next test was to to the same data collection, but this time with the electronics board on the RC car. Again the data was nicely sinusoidal, but this time with a significant offset in the X axis. The X axis is aligned with the motor and I suspect the permanent magnet in the motor is causing the shift. It is also possible the battery or other ferrous metals are to blame.

The next test will be to collect data with the motor powered up. My guess is that all hell will break lose. Part of it from pure electrical noise, but mostly from all the magnetic flux kicked up by the motor. After this test will be one to determine how far away the IMU needs to be from the motor and will a MuMetal shield have any effect.

I also managed to get down to Boston last weekend and stopped in at You Do It Electronics in Needham. Fun store and I spend two hours browsing and came away $80 poorer. Amazing how a small bag of doodads added up that fast.

 

Posted in AVC | 2 Comments

AS3935 code is on GitHub

I took my first jump into GitHub as a contributor. I put my current AS3935 based application called “Striker” into the repository. You can find it here:

https://github.com/SkyeSweeney/Striker

This should now get me off the hook for several of you asking for the code!

Please note that I am using full bit-banging I2C interface. It turns out the AS3935 bug is not just on the first read of register 0, but all reads and writes of it. I had considered a hybrid solution of using the Wire library to access the bulk of the registers and a bit bang solution for register 0. But it practice this was painful to implement.

What I hope to do is look at the Wire library and ‘adjust’ it to ignore the incorrect NAK during the address cycle for register 0. But that will have to wait.

You will also notice that the Arduino has a pin to control an LED, a horn, and a silence switch. It also has a pin to control a spark generator to provide self test capability. This is not tested yet as my oscilloscope had to go back for service before I could get the lightning simulator working.

 

 

Posted in Arduino, AS3935, Lightning detector | Comments Off on AS3935 code is on GitHub

Bug on AS3935

After three weeks of banging my head against a brick wall, I confirmed last night that the AS3935 has an issue with the I2C interface. There is an issue with the chip that prevents reading register zero without violating the I2C protocol. Interestingly, once you read it the first time, it works properly for the rest of that power cycle. I have confirmed this on the Embedded Adventures and Tautic Electronics (in I2C mode). Continue reading

Posted in ADE7763, AS3935, Components, Lightning detector | 2 Comments

AS3935 and register zero

The more I bang my head against this chip, the more I am certain there are ‘issues’ with it. I can now read and write every register with amazing repeatability except register zero. This register refuses to be read or written to. I have now crafted an email to the manufacturer asking them for help. Now I have already discovered one thing about this chip that leave me scratching my head how any competent engineer could have made such a stupid mistake. It would not surprise me that they also decided that register zero was off limits and yet claim full read write ability in the manual. So now I sit back and wait for an answer. Meanwhile, I am playing with my TE cooler. I can stabilize the temperature with a PID control loop. My only worry is that I think I am going to need a pretty big heat sink. More on this later.

Posted in AS3935, Lightning detector, Projects | Comments Off on AS3935 and register zero