Page 1 of 4 1234 LastLast
Results 1 to 15 of 54

Thread: Arduino

  1. #1
    Super Moderator
    Join Date
    Mar 2011
    Location
    Camden, MI
    Age
    35
    Posts
    3,026

    Arduino

    since we do seem to have a few programmers here, anyone mess with an Arduino before? it seems like it wouldn't be that difficult to learn it's language compared to a 6811.
    1995 Chevrolet Monte Carlo LS 3100 + 4T60E


  2. #2
    Super Moderator Six_Shooter's Avatar
    Join Date
    Feb 2011
    Posts
    2,968
    I have an Arduino Uno sitting on my bench.

    I'm having trouble learning the program language to get it to do what I want, I understand the basics, in that you need to set up everything in the sketch and then have loops and such running, but I just don't seem to understand how to actually write it to get it to work. :(
    The man who says something is impossible, is usually interrupted by the man doing it.

  3. #3
    Super Moderator
    Join Date
    Mar 2011
    Location
    Camden, MI
    Age
    35
    Posts
    3,026
    people don't post examples anywhere?

    it seems pretty simple to me, from taking a look at the instruction set, though i have yet to view any programs. from the looks of it, i may want an Uno for controlling some things in-car that i would have otherwise needed to use an ECM as a BCM for.

    and supposedly, the instruction set is based off of C? i can't understand C at all, i tried making a tunerpro plugin or even trying to understand how a plugin works and got nowhere real quick.



    i can program the hell out of motorola 68xx code, but i can't seem do anything PC based at all beyond simple HTML and it's derivatives.
    1995 Chevrolet Monte Carlo LS 3100 + 4T60E


  4. #4
    Electronic Ignition!
    Join Date
    Feb 2012
    Posts
    11
    The Arduino is a lot of fun. I had been wanting to muck with microcontrollers for a long time, but found it a bit confusing and the easier stuff was very costly. The Arduino makes it easy to get started. The 'reference' hardware (even though it's nothing special) gets everybody on an even playing field that needs nothing additional for programming. The language is pretty easy to pick up on. I'm far from an expert but have been able to do a couple of good projects with some help from google. The best part is the abundance of information out there since it has become so popular.

    I started with the usual blinking LED and hello world on an LCD stuff, and then fought my way through a couple of projects that were a little over my head. The first project was a whole house power monitor (based off this project: thttp://openenergymonitor.org/emon/node/58) that measures voltage and current usage, displays it on an LCD, and sends it to a linux box wirelessly via XBee modules. On the linux box I log the data, generate graphs of usage over time, etc.

    The second bigger project was my own design to monitor the state of battery banks in RVs/Camping Trailers. There's some commercial products that do this, but they are big bucks and every one I played with had some quirks. Here's the circuitry breadboarded up for testing when I first started:



    Once the hardware was working I etched a PC board for it:



    And built the prototype:



    The software is about 75% done. Discharge tracking works, and charge tracking mostly works. I need to finish up the charge portion and the rest of the user interface. Right now it's been back burnered while I get some furniture built. When I get a chance I'll see if I can make a quick video of it working..

    Another thing I thought would be a fun Arduino project would be a little box with LCD to display a mini "dash" from ALDL values.

    - Frank

  5. #5
    Super Moderator
    Join Date
    Mar 2011
    Location
    Camden, MI
    Age
    35
    Posts
    3,026
    Quote Originally Posted by 88ragtop View Post
    Another thing I thought would be a fun Arduino project would be a little box with LCD to display a mini "dash" from ALDL values.
    it does support TTL communications(either natively or via an adapter), from what i've read, which will work with ALDL.

    i've considered a great many uses for it, the most exciting of which is similar, though i am leaning more toward the HUD route and have values projected onto the windshield.
    1995 Chevrolet Monte Carlo LS 3100 + 4T60E


  6. #6
    Electronic Ignition!
    Join Date
    Feb 2012
    Posts
    11
    Quote Originally Posted by RobertISaar View Post
    it does support TTL communications(either natively or via an adapter), from what i've read, which will work with ALDL.

    i've considered a great many uses for it, the most exciting of which is similar, though i am leaning more toward the HUD route and have values projected onto the windshield.
    True Heads Up would be cool. The TTL should be very easy to handle, as that's pretty much the native capability. To go to RS232 they use an interface, just like we do to talk to the ALDL. USB is also handled in a similar manner.

    Does anyone know what the original powertrain engineer HUDs looked like? That could be an interesting thing to try to replicate.

    - Frank

  7. #7
    Quote Originally Posted by 88ragtop View Post
    Another thing I thought would be a fun Arduino project would be a little box with LCD to display a mini "dash" from ALDL values.

    - Frank
    That is EXACTLY why I'd love to have the time to learn Arduino. I worked with the creator of a commercially available product to do something similar and was hoping it would be available by now, but that project has stalled.
    Familiar with 1227747 and 16197427 PCMs

  8. #8
    Fuel Injected! historystamp's Avatar
    Join Date
    Dec 2011
    Location
    USA
    Posts
    169
    and supposedly, the instruction set is based off of C? i can't understand C at all, i tried making a tunerpro plugin or even trying to understand how a plugin works and got nowhere real quick.

    i can program the hell out of motorola 68xx code, but i can't seem do anything PC based at all beyond simple HTML and it's derivatives.
    I agree with you on C and the TurnerPro plugin. I've never been able fathom C that well. I guess I don't agree the philosophy behind C. I've taken a look at the C source to BitHoist & that makes my head spin. Took me several hours to find where the author was parsing the command parameters.

    I assume you could program it in assembler if you want.

    A lot of it will be how well the manufacturer documents the micro. With C, you end up having to learn how the hardware works then having to learn how to access the hardware through C. In assembler, your good to go once you learn the hardware.

    Anyway, programming in C on one of these boards should be easier because you will be writing the code in your own style. From a C coding perspective, I think C is more suited for the micro processor environment. You can avoid a lot of the complexities of C. I think C falls down in the large system programming environment.

    I'm familiar with one or two of the Micorchip pic controllers.

    Robert

  9. #9
    Super Moderator
    Join Date
    Mar 2011
    Location
    Camden, MI
    Age
    35
    Posts
    3,026
    Quote Originally Posted by 88ragtop View Post
    Does anyone know what the original powertrain engineer HUDs looked like? That could be an interesting thing to try to replicate.
    the GM instrumentation module.... that thing will never see the light of day. i can guess what some of it does based on my disassembly of A1, but from the way it's been described before, it was essentially a datalogging/real-time data viewing device, so not that much different than tunerpro RT itself.
    1995 Chevrolet Monte Carlo LS 3100 + 4T60E


  10. #10
    Super Moderator Six_Shooter's Avatar
    Join Date
    Feb 2011
    Posts
    2,968
    Yeah, my main reasoning to start with the Arduino was to build a display for my dash, much like the Tuner View II, since I'm getting ZERO after sale support for the device now, got a couple bugs worked out, and then was told politely to "Go fuck myself"...

    I know the Arduino can do it, it's been matched to the Honda ECMs, and Megasquirt for the same purpose, I just need to learn the language.

    From what I can see, a MAX232 style circuit will be needed to interface with the serial RX and TX lines on the Arduino itself, after that, I'm almost lost. The basic principle I understand, assigning pins, and basic layout of some stuff, but I haven't dove too deep in actually writing the code, since there were some things that didn't make sense to me, and it's been a few months since I have played it with it.

    I did the usual LED flash and Hello World stuff as well, I then went to adding LEDs, flashing together and alternatively, bucket brigades, with and without delays between LED on time, glowing LEDS, etc written by me, by that didn't get me even close to where I need to be.

    I need to get back to working on that sketch.
    The man who says something is impossible, is usually interrupted by the man doing it.

  11. #11
    Super Moderator
    Join Date
    Mar 2011
    Location
    Camden, MI
    Age
    35
    Posts
    3,026
    that doesn't sound like Moates...

    i really need to pick up an Uno and play with it, i mean worst-case scenario, i pay $30 for a board that i could resell if i can't figure it out either.
    1995 Chevrolet Monte Carlo LS 3100 + 4T60E


  12. #12
    Craig Moates is not the creator of TunerView. He is a reseller. HRTuning sells the Tunerview. It looks like a nice setup. If only it were compatible or open source. But it's not. :-(

    I just need to take the time to learn Arduino. And bug a friend of mine who DOES know it.
    Familiar with 1227747 and 16197427 PCMs

  13. #13
    Electronic Ignition!
    Join Date
    Feb 2012
    Posts
    11
    Quote Originally Posted by Six_Shooter View Post
    From what I can see, a MAX232 style circuit will be needed to interface with the serial RX and TX lines on the Arduino itself, after that, I'm almost lost. The basic principle I understand, assigning pins, and basic layout of some stuff, but I haven't dove too deep in actually writing the code, since there were some things that didn't make sense to me, and it's been a few months since I have played it with it.
    Take a peek here at the hardware reference (we'll use the Uno since it's the most current): http://arduino.cc/en/Main/ArduinoBoardUno

    You can see in the docs that digital pins 0 & 1 are RX & TX out of the microcontroller. At this point it is TTL level data. On the Uno, a seperate microcontroller (ATmega8U2) is used to convert that TTL to USB. On the older boards, an FTDI chip did the TTL to USB, and on the older serial stuff, a MAX232 (or similar) was used for the same purpose.

    Anyway, since you have TTL level data at 0 & 1, you should be able to go straight from those points to the ALDL with no real additional circuitry required.

    If someone is familiar with the ALDL datastream and can give us a couple of pointers, a quick overview, or even a link to a doc, we could all give it a shot right here. I'm pretty sure I have a few 7730's laying around somewhere for testing. I'm not familiar with how the ALDL is handled, if there's a "handshake" or something needed, or whatever - I've always been lucky enough to be able to use existing software to get the info. The needed data might be right here on the board, or even available in a tunerpro ADS. I've never looked, but will do so.

    I have an Uno for the rare occasion I want to mess around with one of the sheilds. Most of the time when I'm prototyping my own junk I use either a Bare Bones Board or a Really Bare Bones Board from Modern Device (http://shop.moderndevice.com/collect...ino-freeduino/). I like that they plug directly into a breadboard vs. having to flywire it. Either way the software is the same.

    - Frank

  14. #14
    I haven't looked too deeply, but I suspect that the info is in the TunerPro ADS files. That file would also tell you if you needed to send any commands to the ECM (handshaking) to start the output. But I can't see that as being too difficult. <shrug>

    They also have an Arduino bluetooth module. What would really be awesome is an interface that would output the data right to your smartphone or iPod Touch. Then you'd need Apple's SDK to write a program that would allow you to display the info in whatever manner you wanted. Sort of like a TunerPro dashboard right on your phone. But I digress...

    EDIT: The bluetooth module is no longer available.
    Last edited by FSJ Guy; 03-01-2012 at 06:23 AM.
    Familiar with 1227747 and 16197427 PCMs

  15. #15
    Super Moderator
    Join Date
    Mar 2011
    Location
    Camden, MI
    Age
    35
    Posts
    3,026
    ALDL is just 8192 baud, 8N1 format, the sending procedure is:

    1. send a message to a module

    in this message are a couple of different things, 1st being the module that is being addressed. 2nd is the length of the message. 3rd (since we're dealing with polling for ALDL data) is the specific mode message we want sent back(a mode 1 message). depending on the mask, this can be 1 byte or 2, depending on how many messages there are in the mode 1 message system. assume it's a simpler unit and it's only 1 byte. 4th byte sent is a 2's compliment checksum of the entire message.

    2. the PCM will now dump the requested stream (most do ~63 bytes of data), and then a 2's compliment checksum of all of the information it sent.

    the first byte the PCM sends back is the module identifier, followed by message length, followed by the mode requested, followed by the data, followed by a 2's compliment checksum.



    simple enough explanation?
    1995 Chevrolet Monte Carlo LS 3100 + 4T60E


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •