StromTrooper banner

Stromputer is alive

189K views 770 replies 89 participants last post by  p38arover 
#1 ·
I started another thread months ago ("MK 1B") but it got long and very technical, so I decided to create a new one.

Basically I invented a digital solution that shows the current ambient temperature, current gear position and current battery level in an LCD display, gears showing also as LEDs. The solution is based on Arduino (AVR) microcontroller and can (and will be) expanded to have more advanced features - MPG (Miles Per Gallon) display is high on my list. If a GSA has it, so will the Wee! :) I also think of adding connectivity to smartphone via Bluetooth (e.g. show incoming SMS messages). The Arduino is a very capable and extensible platform.

I got some help from good Stromtroopers along the way (you know who you are.. :hurray:), had some bugs and fixed them, and did many experiments until everything got to work, but it really works now! The prototype is mounted on my bike and works great.



The core costs of the initial prototype were a bit high - about $110, not taking into account the mounting (RAM in my case) and other R&D costs (extra parts, wrong parts..). That been said, it is still cheaper than getting a 3rd Party Gear Position Indicator that does just that function.

The project is also open source: stromputer - Display enhancement for Suzuki V-Strom motorcycles (and others) based on Arduino - Google Project Hosting

I think the project is now ready to move to the next phase, which is more optimal and also much cheaper. I have clear ideas on how to make it cheaper - in particular consolidating all electronics into one box instead of two as it is today.

BTW: There is another project by Voltar, which is more of a DIY gear position indicator.
 
See less See more
  • Like
Reactions: sicano
#48 ·
#50 · (Edited)
Prices have gone down.
The main components in Version 2.0, which cost the majority are:
1. Arduino Nano - ~$13
2. I2C LCD - ~$9
3. Enclosure - $8
4. Power supply - ~$5
5. Mil. Spec Resistors - ~$5
6. Radio shack PCB - ~$2
7. EDIT: Temp Sensor: ~$3

So around ~$45
Add other cheap components (wires, leds, etc.) and you might make $50, worst case $60.

Take into account that this needs to be mounted some how - if you go my way, using the expensive RAM components add $30. but I'm sure it can be mounted for much cheaper using non-RAM components.
 
#54 · (Edited)
Hi Bigman,

Thought I might give this a crack over Christmas break.

Is the above the list for V2? If not, did you get around to making a parts list to make it really easy for a noob like me? I can't seem to find the parts list?

So far I have ordered.

Display you suggested - http://www.ebay.com.au/itm/18093412...X:IT&_trksid=p3984.m1439.l2649#ht_4955wt_1397

Nano you suggested - http://www.ebay.com.au/itm/25117749...NX:IT&_trksid=p3984.m1439.l2649#ht_3975wt_906

A breadboard for playing with (I didn't know if I need a small one, so for $2 i just got this one) http://www.ebay.com.au/itm/12088979...X:IT&_trksid=p3984.m1439.l2649#ht_3562wt_1163



Cheers
Chris
 
#56 ·
Hi Bigman,

Thought I might give this a crack over Christmas break.

Is the above the list for V2? If not, did you get around to making a parts list to make it really easy for a noob like me? I can't seem to find the parts list?

So far I have ordered.

Display you suggested - eBay Australia: Buy new & used fashion, electronics & home d

Nano you suggested - eBay Australia: Buy new & used fashion, electronics & home d

A breadboard for playing with (I didn't know if I need a small one, so for $2 i just got this one) eBay Australia: Buy new & used fashion, electronics & home d



Cheers
Chris
Hi Bigman,

Thought I might give this a crack over Christmas break.

Is the above the list for V2? If not, did you get around to making a parts list to make it really easy for a noob like me? I can't seem to find the parts list?

So far I have ordered.

Display you suggested - eBay Australia: Buy new & used fashion, electronics & home d

Nano you suggested - eBay Australia: Buy new & used fashion, electronics & home d

A breadboard for playing with (I didn't know if I need a small one, so for $2 i just got this one) eBay Australia: Buy new & used fashion, electronics & home d



Cheers
Chris
Sorry Chris. I am/was busy with work/life..
You are on track - The nano and display you got should get you going.
You need:
1. I2C temperature sensor - Look for DS18B20 on fleabay
2. I2C Pull Up Resistors - 10KOhm, 1/8W
3. PhotoCell (CdS) - DIGIKEY: PDV-P8001-ND
4. PhotoCell Resistor - 10KOhm, 1/8W
5. 2 mil spec resistors for accurate battery voltage divider. You need to divide 20V to 5V. So it is 4:1 ratio. I will look up the exact values, but it is around 1MOhm for the larger one.
6. 6 X Leds - one for each gear (pick your colors)
7. 6 X Led Resistors - 1KOhm, 1/8W
8. Gear voltage divider - Mil Spec, I will look up the exact values, around 1MOhm.
9. Enclosure for LCD/LED display


Optionally and recommended, if don't trust the Arduino's ability to cope with the bike's 14V:
14V Zener Diode DIGIKEY: 1N5244B-TPCT-ND
16Ohm current limiter DIGIKEY: P16W-3BK-ND
LM2940 9V REGULATOR DIGIKEY: LM2940T-9.0-ND
LM2940 5V REGULATOR DIGIKEY: LM2940T-5.0-ND
Cin1 220uF capacitor DIGIKEY: P5541-ND
Cin2 0.47uF ceramic capacitor DIGIKEY: 445-2870-ND
Cout 22uF alum capacitor DIGIKEY: P12927-ND
 
#55 ·
This is an awesome development!:thumbup:

I am really interested in particular in the fuel economy monitoring. What additional bits would be required to get the L/100km reading?

Is it just a matter of tapping into one of the fuel injectors and running it to the input of your circuit?

Then calibrating it later to know km and L consumed?
very interested and would build one if i could do this

thanks!
 
#57 · (Edited)
Hi Bigman,

thanks for your help :)

Mil Spec Resistor
What is a Mil Spec resistor?

Normal Resistors
Are the other resistors mentioned just a normal resistor like this http://www.basicmicro.com/assets/images/100ohm_resistor.jpg do I need to worry about carbon vs film ?? (sorry I have no idea!)

Temp Sensor

Which type should I get? I assume the waterproof one?
High Quality Waterproof Digital Temperature Temp Sensor Thermal Probe DS18B20 | eBay

1pcs DS18B20 Thermometer Temperature Sensor Dalla IC | eBay

LM2940 9V REGULATOR DIGIKEY: LM2940T-9.0-ND

This appears to have a minumum buy at $540!

LM2940T-9.0 Texas Instruments | LM2940T-9.0-ND | DigiKey


Is this the same thing? note the ND is missing
LM2940T-9.0 - NATIONAL SEMICONDUCTOR - IC, V REG LDO +9.0V, 2940, TO | element14 Australia


Thanks for your help. I really appreciate it and am looking forward to it.

extra questions

1) what am I going to wire it all to? i assume I need a PCB or something? Any advice on which one?
2) How do I go about remote mount...you mentioned Ethernet connections...any links/part numbers for that?
 
#58 ·
Military spec resistors are very accurate resistors, that change very little in resistance when the temperature changes. For voltage dividers that is a critical attribute, otherwise the divider ratio changes with temperature, in a non linear way. Then you get bad readings and it is impossible to accurately fix it.
The problem is that they are expensive. As in a $ per one resistor.

For the gear divider I got these:
CMF55499K00BEEB Vishay Dale | CMF499KHBCT-ND | DigiKey

Two of these will make a perfect 2:1 divider ratio. It reduces 5V -> 2.5V yet keeps a very high impedance. You don't want small value resistors, the ECU is affected by the voltage drop (current draw) and complains with a nasty FI Code..

For the battery divider I got these:
332K Ohm
CMF55332K00BEEB Vishay Dale | CMF332KHBCT-ND | DigiKey
and
953K Ohm
CMF55953K00BEEB Vishay Dale | CMF953KHBCT-ND | DigiKey

Which gives a divider ratio of 332 / (332 + 953) = 3.87:1
Which is great the battery divider circuit. (~19V -> ~5V)

Temp Sensor
I got the one similar to the 2nd link (not waterproof). It is inside the waterproof enclosure, so there is really no need to get the waterproof version.
The temperatures inside the enclosure are not that different then outside it. YMMV.

LM2940
You can also get the 5V version, but then don't connect the 5V output of LM2940 to VIN port but directly to the 5V port of Arduino. It will basically bypass Arudino's power converter and rely on a stable 5V from LM2940, which is just fine. I went with the 9V because I was paranoid..
But there are 9V for $1.15, for example:
LM2940T-9.0 - LM2940 9V 1A Low Dropout Regulator

The advantage with the 5V is that it would work even if the battery is below 10V (Hint: If your battery is there, it is pretty much dead..)
 
#59 · (Edited)
thanks :) and I think just 2 more questions, then I'll double check my items.

1) you mentioned earlier "I2C Pull Up Resistors - 10KOhm, 1/8W" not knowing what I am looking for, I just looked at digikey, they all seem to be in V and mA, not ohm and W ? Can I trouble you again to link me to a product code please? And how many do I need?

2) Is the "PhotoCell Resistor -10KOhm, 1/8W" just a normal resistor? How many?

3) PCB - What do you think I should I get to put this all together with the Nano?

I'll have to try and find an Australian source - Digikey want $34 postage :S

Thanks again :)
 
#60 ·
I2C Pull Up resistors, Photo cell resistor - any cheap/decent/'normal' resistor. Fleabay will do just fine (or Radioshack, etc.)

PCB - I would buy a cheap $2.5 DIY throughhole PCB and solder all the components on it.
Multipurpose PC Board with 417 Holes : PC Boards | RadioShack.com

then just connect the Arduino port to the PCB holes with wires. You can also put the arduino on top/below the PCB if you want, but attaching it to 2-empty holes with screws.

If you want to go wild and spend money you can design your own PCB.

But before you solder anything just use a breadboard to test that everything works. Only then solder.
 
#63 ·
All the source code is here:
Source Checkout - stromputer - Display enhancement for Suzuki V-Strom motorcycles (and others) based on Arduino - Google Project Hosting

Use any SVN client to check out the code (I recommend Tortoise SVN)

The Project BOM (Bill Of Materials) is here: (See view Raw File button on right to download from web, or find this path under the SVN repository in your local drive, after you check out the project)
Stromputer BOM.xlsx - stromputer - Display enhancement for Suzuki V-Strom motorcycles (and others) based on Arduino - Google Project Hosting

I will update it this weekend to reflect the components that you have bought.

And I will also provide a drawing and schematic during this weekend.

@darkjedip: There are many others that also want it. I need help with the enclosure design and manufacturing. If that is solved, I can start fabricating Stromputers for the masses.
 
#64 ·
Use any SVN client to check out the code (I recommend Tortoise SVN)
ohhhh that is why I couldn't make any sense of the file structure. Downloading now using SVN :)

The Project BOM (Bill Of Materials) is here: (See view Raw File button on right to download from web, or find this path under the SVN repository in your local drive, after you check out the project)
Stromputer BOM.xlsx - stromputer - Display enhancement for Suzuki V-Strom motorcycles (and others) based on Arduino - Google Project Hosting

I will update it this weekend to reflect the components that you have bought.
Thanks :) I didn't realise you had it already - that was why I kept asking for clarification on parts. Once I work out my part list, I will let you know Australian part number as well (as mentioned before - the international shops charge too much postage)

And I will also provide a drawing and schematic during this weekend.
Legend! Thanks :)
 
#65 ·
I created a Fritzing schematic.
Here is the schema image, please take a look and be critical (don't assume it has no errors):


I also updated the BOM file (look at V2)

Update your SVN files to get the latest version.
 
#66 ·
Big:

Question... What is the part number of the I2C LCD display? $9 is a pretty great deal!

Something to look at.... For free schematic capture take a look at Diptrace.

The schematic looks fine on my 'quick' (very quicK) check, but is the diode/zener needed for the 5VDC regulator. I know you suggested that P/N to me for my Storm project and I thought I went with it because the protection was built in.
 
#67 · (Edited)
Prices keep dropping, YMMV:
New for Arduino IIC I2C TWI 1602 Serial LCD Module Display Blue | eBay

$8

As for schematic, I used Eagle in the past, gave Fritzing a try.
I don't mind trying diptrace, but I do prefer to use open source when possible (same argument goes to Arduino, and also to Stromputer - I do not like closed source projects)

Regd. Zener: The reverse zener gives a 14V protection. I was being "paranoid" even though LM2940 should take care of voltage peaks just fine, but so far no issue what so ever with power supply.
It might be an overkill, remember I was prototyping and did many experiments with V1.
 
#68 · (Edited)
thanks BigMan! I know very little about electronics, so I'm testing your idea that 'anyone' can do it ;)

Unfortunately I'll have to take your schematic as correct... will let you know in a few weeks when i get all my parts :)

I do have a mate that has done some electronic stuff, so I'll get him to take a look before I power anything on :)

One thing I have noticed - there is a POT on the schematic, but not on the BOM ? What POT do I need, and what does it control? From my limited knowledge it looks like it controls the input voltage from the Gear position? Does that mean once I get the right setting, I need to swap it for a resistor?
 
#69 ·
Chris, that "POT" is just a symbol/placeholder that represents the motorcycle's built in GPS (Gear Position Sensor), because the GPS in fact has a few resistors in it that change every time you shift gears. These resistors are actually fixed and not a POT, but I wanted to show something in the schematic so it makes sense to you. Hence my note there.

As for 'you can do it' - yes. Just do things slowly and safely.
Start with the breadboard and Arduino, connecting the USB to the arduino. It is low voltage and safe.
Try to connect the leds first. That is the easiest and safest task, and the one that will immediately show results.
Then try to connect the temperature sensor.
You can see output using the Arduino serial monitor. I wrote a command line parser in the firmware.
If you write the command "Stat;" it will show you the status of Stromputer, including temperature.
"Test;" will test all the leds (pretty cool to do it).
Then you can start adding the LCD display.

You could test the gear level circuit by temporary connecting the wire to the 3.3V arduino port instead of the bike, and see that it detects the gear properly (should be 4th gear).

The last thing you want to do is handle the battery power - do it with extreme care only after you make sure that everything is connected as it should.
I would suggest doing what I did - get a 12DC power adapter and connect it to the circuit first. The battery is very powerful, be paranoid..

Finally, when everything is working fine on the breadboard, then move it to its final packaging/enclosure.
 
#70 ·
One more important thing: Get a decent multi-meter and use it. Test volts all the time, in particular if you're not sure.
First experiment:
Just connect the Arduino the to the PC using the USB cable.
See that it lights up, then test the volts between 5V and GND ports - it should be 5V.
Same goes for 3.3V and GND ports -> 3.3V

Before you do anything related to Stromputer - load up the example hello world, connect a led with a resistor (e.g. 1K ohm) to one of the ports (see in the example which one) and make sure that led blinks.

Use an iterative approach - many iterations, only moving forward when one iteration is 100% complete and understood. Do not proceed otherwise. You can ask me questions always.
 
#71 ·
thanks :)

I will proceed carefully as you have suggested. I thought I might start with a few Arduino tutorials (hello world/led chaser type thing) on the net to try and learn, rather than just copy and paste.

I understand basic electronics components, but never done more than replace a part on a board, or create a pre-packaged kit with custom PCB.

I also know very basic programming (in terms of I understand the logic), I work with batch scripts and a bit of VBS at work. So looking forward to the Arduino and starting to think what else I can do with one for fun - (Home automation, computer LCD)
 
#72 ·
Yes, I do suggest running most of the Arduino examples.
It will give you tons of confidence, programming and hardware wise.
 
#74 ·
Hey BigMan,

having trouble getting cheap Clear LEDs here in Australia.

I can get diffused ones cheap, but they are very dull and doubt they will be bright enough in the day time, however the clear ones are very bright and may be too bright.

I assume I can just change the resistors if I find them too bright? Or is that what the CDS is for? Does it somehow control the voltage out of the Arduino?
 
#75 ·
Hey there,
I used clear ones, and they were indeed too bright.
That is why I put relatively large resistors in front. You can change the resistor values, but remember that LEDs have a maximum allowed current which is typically 20-25mA. So you can't just put any low value resistor.
Some trial and error and simple calculations using Ohm's law will do the trick.

CdS is a photo/light sensor - the idea is to dim the dynamically display at night time but make it bright at day time (and varying levels in between).
I dimmed the LEDs as well as the LCD, using the CdS output.
 
#76 ·
ok thanks, I'll get the bright ones then and adjust to suit :) I rarely ride at night, so it shouldn't be a huge deal.

I've managed to get half the parts here in Australia, should get the rest next week. and my ebay stuff should arrive next week too.

I might get the LEDs of ebay as well, which will mean waiting another week, as I can get 10 for less than I can get 1 here in Australia.

I've been collecting the Australia 'model' numbers of all the parts, which I'll give to you when I am done to check/add to your BOM for any Australians that ask for help.
 
#77 · (Edited)
Sorry to be a pain... A few more clarifications due to differences in Australia stock when you have time;

1) The 14v Zener Diode...the local shops here done have one..will a 13v or 15v do ? If so, which one?

13V 1N4743 1 Watt Zener Diode - Jaycar Electronics

15V 1N4744 1 Watt Zener Diode - Jaycar Electronics

2) The CDS, they only have a 2.8kohm - 8.4kohm (the one you suggested was 3-11k. Will this matter?

Light Dependent Resistor (LDR) - 8.5 x 10.1mm - Jaycar Electronics

This should conclude my questions about parts....the only parts left is the enclosure (need to buy) and mounting mechanism (I think I have a spare handle bar RAM) :hurray:

EDIT: The Arduino arrived today - 1 day before Christmas, so I can start learning some basics :) score!
 
#81 ·
You don't need the Zener. Just triple check that your voltage in the output is a stable 5V.

As for CdS - it should be just fine. We will have to apply some minor tuning to the voltage divider ratio (in the software), but that is easy.

Get a new Arduino and back to learning/experiments..
 
#78 · (Edited)
well...that was short lived. I fried the Arduino.

I started learning, had LEDs flashing. Decided to try and add a button, and get a traffic light setup, when the button was pressed, it would change from green to yellow to red, then press again, chance to green.

Unfortunately I misread something and didn't think about it, instead of wiring power-button-input pin, I wired power-button-ground.

From a quick search of the net, it seems pretty common for people to do...but doesn't make me feel any better! I was having lots of fun up till then.

I have done 1 of 10....lets hope it stops there! http://ruggedcircuits.com/html/ancp01.html

I can get the LEDs on it to light up if I use an external supply (using a computer PSU @5v), but it won't communicate with the computer anymore, so I can't program it.


So before I order another one, do you think I am better off with;

1) Nano for $9
2) Uno R3 for $16?
3) Mega 2560 for $21


I did read that the Uno had better circuit protection (maybe I would have avoided my mistake?) , but that was a forum post with no backup to prove it.

thanks once again! Merry Christmas :)
 
#80 ·
well...that was short lived. I fried the Arduino.

I started learning, had LEDs flashing. Decided to try and add a button, and get a traffic light setup, when the button was pressed, it would change from green to yellow to red, then press again, chance to green.

Unfortunately I misread something and didn't think about it, instead of wiring power-button-input pin, I wired power-button-ground.

From a quick search of the net, it seems pretty common for people to do...but doesn't make me feel any better! I was having lots of fun up till then.

I have done 1 of 10....lets hope it stops there! 10 Ways to Destroy an Arduino : Application Note ANCP01

I can get the LEDs on it to light up if I use an external supply (using a computer PSU @5v), but it won't communicate with the computer anymore, so I can't program it.


So before I order another one, do you think I am better off with;

1) Nano for $9
2) Uno R3 for $16?
3) Mega 2560 for $21


I did read that the Uno had better circuit protection (maybe I would have avoided my mistake?) , but that was a forum post with no backup to prove it.

thanks once again! Merry Christmas :)
Oh dear..sorry to hear that..

Here's the thing. Microcontrollers are fragile. Some are better protected, but IMO the best protection is to do everything slowly and make sure you fully understand the circuit.
From what you described it sounds like your Arduino is toasted.

Get the cheapest one (e.g. Nano) and try again. That's a small learning price. I'm sure next time you'll be more careful.
But it really critical to make sure you understand the root cause of your error so it doesn't happen again. If you had done the same with the 12V battery (shorting + and -) that could have ended very badly - shorts there can become deadly.
 
#79 · (Edited)
Whoa! Hang on.... I will let Big chime in because he know more about the Ardunio than I do.
I suspect you just fried the output pin on the micro. I think they are socketed and easy to replace.

BTW, everybody destroys a chip once in a while. Congrats! You got yours out of the way early. Hang in there. You are doing fine.
 
#82 ·
Regarding Ruggduino.
These guys have a good product but very costly.
Their marketing page describes every possible way to toast an Arduino, and their product seems to fix everything. Heck, it might even make coffee and bring world peace.. ;)

I did not fry the Arduino with dozens of experiments, not because I'm so smart, but because I'm paranoid. Hence the usage of the Zener, the LM2940 and other design decisions I made.

My advice:
Don't trust others to protect you from making mistakes, just be paranoid..

As for experiments:
For all of you that start learning Arduino, this is the page to follow:
http://arduino.cc/en/Tutorial/HomePage

For using a button, I would follow this tutorial:
http://arduino.cc/en/Tutorial/Button
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top