Show Posts
Pages: [1]
1  Using Arduino / Project Guidance / Re: pls help with automotive project on: November 17, 2011, 12:30:35 pm
Hi Alex.

You'll need an accelerometer at the front and probably another at the back of your "vehicle" to sense impact. A search of industrial accelerometers puts the cost well out of reach, so i checked instructables.com for a DIY version. Low and behold, high on the search list is a project using the Arduino and, what i hope would be, an inexpensive gyroscope (accelerometer) chip. It includes a downloadable sketch file too. smiley

Here's the url for the project:
http://www.instructables.com/id/ArduinoGyroscopeProcessing/
and the gyroscope (accelerometer) datasheet:
http://www.alldatasheet.com/datasheet-pdf/pdf/272733/EPSONTOYOCOM/XV-8100CB.html

Looks like fun. Good luck
Jeff

EDIT: Found this site which describes accelerometer chips in some detail:
http://www.sparkfun.com/tutorials/167
2  Development / Other Software Development / "Virtual" Timer Template Sketch on: November 17, 2011, 08:50:12 am
Hi.
I'm an industrial control systems integrator. Have been since Noah was playing with toy boats, it seems, and i program PLC's for my bread and butter. Back in the day, i spent many hours programming PC's in C. Other languages too, but C was always my favorite.

One of my clients keeps bending my ear about converting one of his mills to CNC, cheaply of course. I happened on the Arduino with the 3 axis stepper shield and the grbl library, which is about as cheap as it gets. I cut my teeth on CNC systems and that combination simply blew me away.

Anyway, thinking to get up to speed with the Arduino, i thought i'd code a template sketch using a timed interrupt to drive any number of "virtual" timers. I call virtual timers those that are software driven. I used to do this on PC's - taking control of the system timer, and reprogramming it to "tick" every millisecond, instead of 18.2 times per second.

I've attached the sketch. It doesn't do much, in fact it's not connected to the outside world in any way, but it may be useful as a starting point for sketches requiring more timers than the hardware provides. It does count the number of loop() scans per second, which is always useful info, and i have two timers set up for lamp flashing.

Jeff
Pages: [1]