Jump to content

Any of you guys good with arduino?


deerhurst
 Share

Recommended Posts

Im looking into grabbing some arduino stuff and making a inclinometer, altimeter and vac/boost gauge for my truck since I cannot find a OEM inclinometer. Just dont really know what boards to get. I think after that I can make some progress. It will need to run off 12v.

 

Any of you guys have any ideas?

Link to comment
Share on other sites

I received an Arduino as a gift a while back, haven't gotten around to doing much with it yet though. I've got some ideas, but most of what I think of, I realize it could be done more simply without a microcontroller. I'm kind of seeing the same thing here. What benefit would the digital system have over one of the analog universal-fit units available online?

 

I'm not saying it wouldn't be a fun project, just that you'd be reinventing the wheel with more parts.

 

It could be an interesting way to tie other things into that box, though. Compass, outside temp, maybe tap into the OBD port for codes?

Link to comment
Share on other sites

Benefit to me is expandability. A $30 ebay setup will give me pitch, roll and compass. I want to also impliment altimeter, outside temp, and boost/vac. Plan was to put it next to the pillar on the dash much like a mini programmer display.

 

Im cool with not having to code for a microcontroller. Any suggestions on that?

 

I have an 86.5 so the ECU hardly knows its an ECU. Id be lucky if I can get the diagnostic light signals out of the disgnostic port.

Link to comment
Share on other sites

Most arduino boards will run on 12v and if it wants 5v you could just rig up a simple switching voltage regulator. I believe input voltage on my atmega 2560 board is 9-14v. Definitely double check on the spec sheet though!

 

The sensors to do what you want are very cheap on ebay. I bought a 9 axis accellerometer, tiltometer, gyrometer etc for like 5$. For the board itself I would suggest an atmega 2560 if you want to be able to expand on it later (as long as the 2560 will fit where you want it as its a little bigger than the other boards). I believe it has 52 points of i/o and can do analog, digital, as well as PWM depending on the points used.

 

The hardest part of the whole thing will be coding as the physical wiring and sensors are actually quite simple. Generally, power, signal and ground. The hard part will be to integrate a display to the arduino and to code the sensors in. Im not the greatest at programming C++ (basically what arduino uses) but im sure you could find some sample code bits online and work with those to get going.

 

I got my atmega 2560 board for 17 dollars on ebay listed as "Funduino" fyi.

Link to comment
Share on other sites

I was looking at the Arduino Uno R3. It has 6 analog inputs. That would be fine for me though I would use them all. I believe that the accelerometer, altimeter, temp and vac should all be analog. Thinking about getting a $10 MAP sensor off ebay and using that. I never even thought about e-bay for boards. My C++ is rusty. The extent of it is using classes. Last complex C++ program I wrote would take in a list of airports and a start and end point then tell you what route would be best.

 

12v is perfect. Planned to run it off the truck. One with the key and off with the key.

 

Ill look into the atmega board. Sounds promising.

Link to comment
Share on other sites

I bought a starter pack after seeing the awesome things that mighty mods did with their gramps setup. Don't know much about it. Just following along with the book.

 

Learning alot, and starting to see the potential these little things have.

 

Keep this updated. What your planning sounds really awesome!

 

-Kyle

Link to comment
Share on other sites

Ill keep you guys posted. Ordered some stuff last night. Should be here in a week or so. I liked that ATMega board. Found it for some $13 online. Its about $50 from sparkfun. I have a ATMega 2560 on the way, a 2x16 LCD display with buttons, barometer and temp sensor, 3axis accelerometer and 3axis gyro board and a MAP sensor for some random dodge that I found for $7 on the way. Hoping to use the MAP sensor for manifold vacuum off of a vacuum line. I want to mount the temp sensor so I can get outside temp. Would be useful to tell me if the roads might be icing up in the winter. No need for compass. Have a fairly good sense of direction. When it works then just have to fab up an enclosure. Would like to match the lines of the dash. When done it will be completely standalone. Wire it in, mount it and go.

 

I might be adding stuff in the future. I would love to do exhaust temp (EGT) for the hell of it. Would just need a high temp thermocouple. And figure out where to mount it on headers. Thought about a small touch screen in the future. Didnt want to work with the complexities of that right now without knowing if the libraries were available.

 

My C programming is pretty rusty. I also an a few years out of date as to where to find source code and libraries for this stuff. Where is the best place to look for libraries and code for various stuff? What programming software are people using for the ATMega boards?

Edited by deerhurst
Link to comment
Share on other sites

  • 2 weeks later...

Not yet. Have the final exam for my last class in college due this week so it is on hold until that is done. Then I'll take a video. The inclinometer is far more sensitive than I want to to be so that will be a continuing project. The back light control doesn't work yet and I have no idea why.

 

This is my thread over on Infamous for it.

 

http://www.infamousnissan.com/forum/showthread.php?t=33338

Edited by deerhurst
Link to comment
Share on other sites

For the inclinometer being more sensitive than you'd like, you could always try some Fourier data filtering.

Sounds intense. Im not good with Fourier math. Right now it is a 1:1 read and update. I could slow down the update and sacrifice some visual smoothness. I am also hoping that someday Ill understand the chip enough to remove any bounce when doing something like hitting a bump. For wheeling it will probably work fine. Has the same characteristics with bump handling as the OEM one, just more sensitive.

 

My C++ is also super rusty and useless. When I get it mounted I plan to make it easy for me to pull it out and work with it more. At that point Ill look more into ways of filtering and using the gyros to help compensate for bouncing. Right now the back light hates me and I have no idea why. My code is 100% correct but something with how it all is together makes it not work properly.

Link to comment
Share on other sites

If you'd like, I can try to do the data filtering for you. My last final is next Wednesday, so I could probably have it done by Wednesday afternoon

That would be pretty cool! Would you just make a function that takes the raw and filters it or can I even feed it the converted data?
Link to comment
Share on other sites

Haha! It's easy enough for either. All I have my code asking for is a X and a Y from the accelerometer. I could probably calibrate it after or I can feed in the calibrated data. 2 ints I believe.

Link to comment
Share on other sites

Sorry for the delay. I installed it in the truck, was not happy with how it looked and some wiring issues so it did not work at all. Got pissed and ripped it out. Playing with some other stuff too with it. Need to step back and re-design the housing and see why I was getting really weird results with the MAP sensor. It would just bounce 10PSI, say 14SPI to 4PSI or 13PSI to 3PSI and back.

 

Here is the code as of right now:

 

http://pastebin.com/uTzxaBqK

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...