Stromputer is alive - Page 10 - Stromtrooper Forum : Suzuki V-Strom Motorcycle Forums
Stromtrooper Forum : Suzuki V-Strom Motorcycle Forums  

Go Back   Stromtrooper Forum : Suzuki V-Strom Motorcycle Forums > Popular Forums > DL650 - 2004 to 2011 [The Wee Strom!]


DL650 - 2004 to 2011 [The Wee Strom!] DL 650 up to 2011

Reply
 
LinkBack Thread Tools Display Modes
  #91  
Old 12-25-2012, 05:45 PM
ChrisGrind's Avatar
Stromthusiast!
Super Trooper!
 
Join Date: Dec 2011
Location: Lake Macquarie, NSW, Australia
Posts: 236
Default

Quote:
Originally Posted by Voltar View Post
The micro will probably cook before the fuse blows. Just do as Big suggests and try to be more careful.

Where are you seeing the Nano for $9?
Ebay....but they have all just raised prices in the last 2 days...did the finance market crash again? So the cheapest now is $10.50 for me... ended up paying $12 for an Australian seller, so hopefully it will come this week instead of 2 weeks.
__________________
2008 DL650
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiTweet this Post!
Reply With Quote
Sponsored Links
Advertisement
 
  #92  
Old 12-25-2012, 05:48 PM
ChrisGrind's Avatar
Stromthusiast!
Super Trooper!
 
Join Date: Dec 2011
Location: Lake Macquarie, NSW, Australia
Posts: 236
Default

Quote:
Originally Posted by BigMan73 View Post
Always have a plan.

A master fuse will not help solve this issue
ok thanks
__________________
2008 DL650
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiTweet this Post!
Reply With Quote
  #93  
Old 12-26-2012, 09:35 PM
BigMan73's Avatar
Adventurer
 
Join Date: Feb 2011
Location: Fair Lawn, NJ
Posts: 1,926
Default Notes about compass

It is a bit off topic, but since Philip Kuntz asked.
I did some research.
It is easy to calculate a magnetic north using a the X and Y components of a magnetometer. The Z component is not needed (the inclination angle).

But:
1. This solution is very sensitive to tilts. The magnetometer needs to be leveled to be accurate. I don't think it is a good solution for a motorcycle.
2. Magnetic north is not geographic north. There is a discrepancy between these north, and it is varying for each geographical location.

One can buy or build a compass that compensates for the tilt, but an accurate compass needs to know the location as well (via GPS, manual preset or some other method) for the declination angle.

See also:
http://www51.honeywell.com/aero/comm...netometers.pdf
__________________
Stromputer - A V-Strom Computer and display - Now taking orders for V3 PCB
---------------------------------
2013 Northeast V-Strom Rally!
2011 DL650 ABS ( "White Pearl")
--------------------
Stromtrooper Wiki!

Last edited by BigMan73; 12-26-2012 at 09:37 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiTweet this Post!
Reply With Quote
  #94  
Old 12-26-2012, 11:02 PM
ChrisGrind's Avatar
Stromthusiast!
Super Trooper!
 
Join Date: Dec 2011
Location: Lake Macquarie, NSW, Australia
Posts: 236
Default

Today I tried again and I can communicate with the fried Arduino again . It still needs the external power supply, but I can upload code now. So I got my traffic lights working now (and also learnt with C programming, for some reason you need the functions at the start. When I have done VBS, you can have the functions anywhere)



I got my LCD today too "Serial IIC/I2C/TWI 1602 162 16X2 Character LCD Module Display For Arduino Yellow"

Do you know of any links to tutorial sites to learn the basics (example : "Hello World")? I have spent the last hour looking and cannot find any tutorials for the nano.

This is the Nano schematic - http://arduino.cc/en/uploads/Main/Ar...0Schematic.pdf

If not, do you have the knowledge to confirm with the Nano;
1) Which are the I2C pins? Is it Pin A4 & A5 or D0 & D1 (or is there a way I can work it out?)
2) Do I need libraries or is the built in one sufficient?


Cheers
Chris
__________________
2008 DL650
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiTweet this Post!
Reply With Quote
  #95  
Old 12-26-2012, 11:23 PM
BigMan73's Avatar
Adventurer
 
Join Date: Feb 2011
Location: Fair Lawn, NJ
Posts: 1,926
Default

Quote:
Originally Posted by ChrisGrind View Post
Today I tried again and I can communicate with the fried Arduino again . It still needs the external power supply, but I can upload code now. So I got my traffic lights working now (and also learnt with C programming, for some reason you need the functions at the start. When I have done VBS, you can have the functions anywhere)



I got my LCD today too "Serial IIC/I2C/TWI 1602 162 16X2 Character LCD Module Display For Arduino Yellow"

Do you know of any links to tutorial sites to learn the basics (example : "Hello World")? I have spent the last hour looking and cannot find any tutorials for the nano.

This is the Nano schematic - http://arduino.cc/en/uploads/Main/Ar...0Schematic.pdf

If not, do you have the knowledge to confirm with the Nano;
1) Which are the I2C pins? Is it Pin A4 & A5 or D0 & D1 (or is there a way I can work it out?)
2) Do I need libraries or is the built in one sufficient?
This probably means that the onboard power regulator (7805) is toasted due to the short, makes sense. But the Arudino is still functioning with the 5V bypass. Good!
If you build the LM2940 12V->5V converter it work with your 'toasted' board since you will be bypassing the on board regulator. No need to throw it away.

I don't know what LCD you have. Can you post the exact ebay site you bought it from?
Mine is NHD.
This is the most important question.

Arduino is using SDA (data line) and SCL (clock line) for I2C communications.
On the Nano:
I2C: 4 (SDA) and 5 (SCL). Support I2C (TWI) communication using the Wire library (documentation on the Wiring website).
Arduino - ArduinoBoardNano (RTFM, Dude..)

I'm using LCDi2cNHD library, but for some reason I can't get to its page.. Author may have stopped support for it. You can find the source code under Stromputer SVN repository (IF you have NHD)

Liquid_Crystal I2C Library might be good for your LCD:
Arduino LiquidCrystal_I2C library V2.0

Your code should be similar to this example: https://bitbucket.org/fmalpartida/ne...stal/wiki/Home
PHP Code:
#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x38);  // Set the LCD I2C address

#define BACKLIGHT_PIN     13

void setup()
{
  
// Switch on the backlight
  
pinMode BACKLIGHT_PINOUTPUT );
  
digitalWrite BACKLIGHT_PINHIGH );
  
  
lcd.begin(16,2);               // initialize the lcd 

  
lcd.home ();                   // go home
  
lcd.print("Hello, ARDUINO ");  
  
lcd.setCursor 0);        // go to the next line
  
lcd.print (" WORLD!  ");      
}

void loop()
{


Or LiquidTWI2 library:
Lincomatic's DIY Blog | electronics, 3d printing, hacking, etc

Or look here: (some broken links)
http://playground.arduino.cc/Code/LCDi2c

Once again, find out what LCD you have, the ebay pages typically post an example code
__________________
Stromputer - A V-Strom Computer and display - Now taking orders for V3 PCB
---------------------------------
2013 Northeast V-Strom Rally!
2011 DL650 ABS ( "White Pearl")
--------------------
Stromtrooper Wiki!

Last edited by BigMan73; 12-26-2012 at 11:27 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiTweet this Post!
Reply With Quote
  #96  
Old 12-27-2012, 12:20 AM
ChrisGrind's Avatar
Stromthusiast!
Super Trooper!
 
Join Date: Dec 2011
Location: Lake Macquarie, NSW, Australia
Posts: 236
Default

thanks Bigman. Not sure how I missed that bit on the page you linked to for pin 4 and 5. I had that page open earlier :s

Is NHD the type of board you have or the brand?

The LCD I got is a YwRobot LCM1602 IIC V1;

eBay Australia: Buy new & used fashion, electronics & home d

and as per your suggestion, it did have sample code, which started with LCDi2cNHD . So I am guessing the LCDi2cNHD library you linked to will work.


#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2); //set the LCD address to 0x27 for a 16 chars and 2 line display
void setup()
{
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("www.b2cqshop.com");
lcd.setCursor(0, 1);
lcd.print("Voltage: ");
lcd.setCursor(13, 1);
lcd.print("V");
}
void loop()
{
int val;
float temp;
val=analogRead(0);
temp=val/4.092;
val=(int)temp;//
lcd.setCursor(9, 1);
lcd.print(0x30+val/100,BYTE);
lcd.print(0x30+(val%100)/10,BYTE);
lcd.print('.');
lcd.print(0x30+val%10,BYTE);
delay(100);
}
__________________
2008 DL650
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiTweet this Post!
Reply With Quote
  #97  
Old 12-27-2012, 07:52 AM
ChrisGrind's Avatar
Stromthusiast!
Super Trooper!
 
Join Date: Dec 2011
Location: Lake Macquarie, NSW, Australia
Posts: 236
Default

I spent about 5 hours stuffing around and have still not got the display working.
It powers on, backlight on, and shows blocks of squares.

it seems quite a few people have had issues with this particular model (YwRobot LCM1602 IIC V1)

This person claims to have it working, but I did it all as he said (both trying the code on his website and the one in the video).

µCI – Arduino Serial LCD | µ Control It

I have now tried the following libraries using both the built in "Hello World" for each library, and trying various code from the net.

1) LiquidCrystal - the one standard with Arduino 1.03

2) LiquidCrystal_I2C1602V1

3) LiquidCrystal_V1.2.1 - https://bitbucket.org/fmalpartida/ne...stal/downloads

4) LiquidTWI2-v110 - Lincomatic's DIY Blog | electronics, 3d printing, hacking, etc

5) LiquidCrystal_I2C

6) LCDi2cNHD

one of the lines that is confusing me is ;

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
and
LiquidCrystal lcd(0x27,16,2);

The first appears to be for if you dont have I2C, yet it is in many of the "Hello World" examples for use with I2C.

If you have any advice, please let me know. Otherwise I will keep pondering.

Attached is a fritzing schematic I am using. I have tried it with and without the pull-up resistors (10k).

cheers
Chris
Attached Files
File Type: zip Basic_I2C_LCD_Test.zip (26.5 KB, 3 views)
__________________
2008 DL650
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiTweet this Post!
Reply With Quote
  #98  
Old 12-27-2012, 09:53 AM
Voltar's Avatar
Stromthusiast!
Super Trooper!
 
Join Date: Aug 2008
Location: Near enuf to Austin
Posts: 679
Default

Quote:
Originally Posted by ChrisGrind View Post
one of the lines that is confusing me is ;

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
and
LiquidCrystal lcd(0x27,16,2);
If you have any advice, please let me know. Otherwise I will keep pondering.

Attached is a fritzing schematic I am using. I have tried it with and without the pull-up resistors (10k).
Chris: Note that am not familiar with the Arduino, however, I looked through some of the documentation in your #include statements.

The line "LiquidCrystal lcd(12, 11, 5, 4, 3, 2);" sets up the LCD interface pins. Defines what is shared clock and shared data, etc. It appears you have this correct.

The line "LiquidCrystal lcd(0x27,16,2);" defines the display format and the I2C address. You are using a 16x2 display. The I2C address is set at 0x27 (that is decimal 39). You cannot change this. It is set by the factory.

Regarding the resistors.... Until I got to the end of you post I had these ideas 1) bad display (common for the eBay China gear), 2) bad valve or improper placement of the I2C shared data (SD) and shared clock (SC) resistors. 3) Ardiuno is pushing data out too fast for the cheap China display. 4) maybe you cooked a critical part of your Arduino earlier.

There is plenty of demo code that saw and it was basically exactly what you have. I say your code is solid.

The things I would try:
- Verify the 10K values (remove them and use an ohm meter) on the I2C and double check the connections for the SD and SC. For I2C to work the devices on the bus must pull SD and SC low. Remove these and nothing works. Maybe try 20K just for the fun of it.
- Every micro I have worked with allows you to adjust down the system clock. This is usually used in low power applications. I don't know the Arduino command for this, but I would give it a try. The China LCD may be slightly out of spec and just not be able to handle the data/clock as fast.
- Lastly, scrap the Big project and build mine. Actually, that's a joke. You are experiencing two things; the learning process and open source. Hang in there!

On last suggestion, join the Arduino forum. You will get more eyes looking into your problem and they wil be experienced eyes.

Good luck.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiTweet this Post!
Reply With Quote
  #99  
Old 12-27-2012, 05:15 PM
Stromthusiast!
Junior Trooper
 
Join Date: Oct 2010
Location: Portland, OR
Posts: 18
Unhappy Stromputer

I wish you guys would get this thing finished and then make some for the rest of us less electronically abled dirt dweebs.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiTweet this Post!
Reply With Quote
  #100  
Old 12-27-2012, 05:41 PM
sbeadg's Avatar
$tromtrooper
 
Join Date: Oct 2012
Location: western Mass.
Posts: 131
Default

Hey Big Man! I love your idea and would buy one if you got them to the point to where they were fairly plug and play. Please keep me posted!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiTweet this Post!
Reply With Quote
Sponsored Links
Advertisement
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 01:35 AM.



Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.2