Arduino Motorcycle Display - Power Interfacing Questions

Hi all -

Just a Noobe here who’s retired and likes to play with electronics.

I’m prototyping an Aduino Pro-mini 5v motorcycle Auxiliary Info Center (AIC) consisting of:

  1. Gear Position Indicator (using voltages from a gear position switch)

  2. Analog and digital tach display (using pickup from Engine Digital Control ECU thru an opto isolator)

  3. Electrical Voltage Monitoring & Over / Under Warning (use a voltage divider to scale input range from say 0-15vDC to 0-5vDC)

  4. Water coolant temp (voltage from engine coolant switch using another voltage divider if the switch isn’t 5vDC)

  5. Gear Shift Point Indicator (Calculated)

  6. Ambient Air Temp & Calculated Wind chill when temp is below 50 degrees F.

I’m using two types of displays for the info:

a) A two 1" Alphanumeric Blue LEDS’s - one for gear indicator and one to simulate analog tach display

b) A two line back lit LCD for all other info

I have items 1-3 prototyped using bench top voltages and a dual 555 pulse generator circuit but now need help with interfacing the 5v arduino prototype with a real world motorcycle.

I’ve read a lot but would appreciate any help with interfacing my motorcycle’s 12 vDC to the arduino’s 5 vDC input power?

The Motorcycle’s electrical system isn’t as noisy as a car’s and doesn’t have all the current / voltage spikes as in a car.

What should I do?

I). I thought using a series resistor to limit current after an in-line 1amp fuse would be good - what value?

II). Then I read I might need to provide a separate voltage regulator to step down from 12 vDC to a lower voltage to avoid overheating the arduino’s power reg or a clamping zener bdiode or a “transorb” whatever that is?

Space is tight in the double stacked proto board and enclosure so less is best as long at it will work.

Any help would be awesome!!

Greg

The cheapest, easiest way is to use a 3 terminal regulator like the 7805. They come in several packages, I think the TO92 size is limited to 100mA or so, which would be too small if all of the led segments were on. TO220 size for 1.5A. Don’t use one of the newer LDO (low drop out) regulators, they are limited in the input/output difference to 7 volts. A 5V regulator would be limited to 5+7=12.0 volts maximum input, your motorcycle voltage is probably closer to 14V when running. The older style regulators have a much higher ratio (20+ volts) at the expense of needing a higher minimum input.

The dropping resistor is a bad idea for lots of reasons. Mostly, there’s no regulation if the supply voltage changes or if the load current changes. OK, there’s no regulation, ever.

A dropping resistor plus zener gives good regulation but is usually only used for very low current or to provide a reference voltage.

Transorbs are essentially surge protectors, I wouldn’t use one to regulate voltage.

Add a .1 and 10uF cap to input and output leads of the regulator to suppress noise and you should be good to go. And a fuse. You could put all of this in an external box hidden somewhere else and just feed the 5V to the AIC.

Check this out based on the LM317 adjustable regulator. You’ll have to dig up a spec sheet for the surface mount version to check the current rating:

http://www.sparkfun.com/products/9319

A little pricey, but small, is from the SFE homepage: http://www.sparkfun.com/products/10104

Dave - Thanks for the reply.

Some Q’s:

The Arduino Min Pro already has a 5v Linear regulator on it. Would I be duplicating this by adding what you suggest? Should I have an intermediate 9vDc regulator instead? Does the on board Arduino regulator require a certain voltage above the 5vDC output to operate correctly?

Also, I want to monitor my motorcycle’s power as an input to the Arduino so I’ll nett to rescale this with a voltage divder.

Thanks again.

Greg

Greg,

In general, you can feed power to an Arduino either through or around its regulator. If you feed “raw” power you do, as you asked, need to provide a couple of volts of “headroom” for the Arduino’s regulator to be able to provide a stable working voltage. 7 V appears to work well for 5 V Arduinos. The power requirements for the Pro Mini are described [here. (The higher the “raw” voltage, the more power the Arduino’s regulator needs to dump to heat. So, you have more thermal leeway if you provide ~7 V then you would at ~12.) Feeding power around the Arduino’s regulator is possible, but you’d need an external mean of creating high-quality 5 V power.

For a vehicle, I think your idea of providing intermediate regulation makes sense. To minimize heating of the Arduino’s on-board regulator, I suggest external regulation to 7 V. To reduce the noise in the power, I agree that you should provide capacitors on the 7 V input lines to the Pro Mini.

A voltage divider is a reasonable approach to monitoring your vehicles voltage. In choosing the ratio, you need to consider how precisely you want to measure and how reliably you want to protect the Arduino from overvoltage. If the vehicle voltage does not ever exceed 15 V, then a 3:1 divider would map the 15 V to the full resolution of the Arduino’s analog to digital converter (ADC), giving you ~15 millivolt resolution. If you want that resolution, though, you’ll need to accept the risk of overvoltage damage or provide a voltage limitter (such as a [zener diode clamp) on the Arduino’s input. If you select a higher ratio, say 6:1, then you get half the resolution (~30 mV), but a lower risk of overvoltage. Another thing you can do that will suppress very brief spikes and smooth your data a bit is to put some capacitance on the Arduino’s analog input.

If you need better resolution than the Arduino’s ADC can provide, you could use an external ADC, such as [this.

Have Fun,

Eric

](Analog to Digital Converter - MCP3002 - COM-08636 - SparkFun Electronics)](Diodes - SparkFun Learn)](http://www.arduino.cc/en/Main/ArduinoBoardProMini)

Greg, in addition to what Eric said, you’ll need to check the specs for the onboard regulator to check the minimum/maximum input voltage. If it’s a LDO type, it will be limited to 12.0V or so and you’ll need an intermediate regulator. For that, the LDO types would work well to go down to 8 or 9V.

However, if you’re going to add another regulator, it would be simplest to just add a 7805 with some bypass caps and feed that power to the Arduino, bypassing it’s internal regulator.

You’ll need to dig up the specs for the Arduino regulator to see if it will handle the current for your add-ons as well as what the maximum input voltage is. The schematic didn’t show the exact part number.

For the divider to monitor battery voltage, 3:1 would give you a good ratio, and here you would put a 5V zener on the ADC input to limit any voltage spikes that go over 15V (5V). You could also put a 15V Zener on the input to the divider, but it would see the full power of the spike. If you put it on the ADC input, the current the Zener sees will be limited by the voltage divider.

Eric & Dave -

Thanks for your suggestions. My next step is to check out the different voltages on my motorcycle. It seems that the gear position sensor is a voltage divider netwrok with values from 0-5vDC and since I have a digital control system on my engine management system, I may already have a 5vDC regulated supply somewhere. The only question is - where and how much current can my bike’s 5vDCsupport for my project.

So far here’s what I’ve calculated as current being draw when I’m hooked up to my laptop’s USB connection during programming.

If I have two 16 seg blue led’s driven thru a sparkfun 16 segment driver board. I can’t tell from the spec sheet but I’m assuming that the led segments are all latched on at once. Assuming each blue led segment uses 20 ma - and I’m I’m only displaying the characters “N”, and “1” thru “5” - say 8 segments for example in one led and a maximum of say another 8 segments for a graphical “*”, that would say the LEDS require 320ma?

I’m also using a backlit LCD display with say 20-30ma draw - mostly for the back light LED. And an Arduino draws around 40 ma. That would total around 390 ma. Plus some other over head could get me to around 450 ma? Does this make sense? I seem to have read somewhere that a laptop’s USB power sourcing ability was around 500 ma?

Does this make sense?

Thanks again,

Greg

Current for LEDs is typically 20-30mA so your calc is probably right.

FWIW, the two LDOs I’m familar with (NCP1117 and L4941, the latter comes in TO220 by the way) have input voltages well above 14V with no specific mention of a maximum rating for Vin-Vout. I don’t see why you couldn’t just use a LM780x or LM317 to drop voltage to a reasonable input voltage for the Arduino board if it has a regulator.

IIWY I wouldn’t use the engine management power supply… no sense in taking a chance there when it’s so easy and cheap to build a simple, small, regulator board.

Check the datasheet or ratings on the regulator of choice. Just because it is TO220 doesn’t guarantee 1.5A capacity. Best choice: use parametric search on newark.com or digikey.com or mouser.com

Whatever you do, make sure you include a decent size Tranzorb / TVS diode on the power supply input. You will get spikes - I can almost guarantee it. Make sure whatever device you use will clamp the voltage below the maximum the regulator can handle under spike conditions.

Per the USB specs, devices can be either low power or high power. I can’t remember what the current levels were for each, but 500mA sounds about right for the upper limit of the high power devices. That’s what the spec says, it doesn’t guarantee that your laptop will be able to provide that much current.

The rest of your last post sounds OK, you’ll need about 1/2 amp of regulated DC, and seems to be reasonably close to what I would expect with the amount of hardware you’ll have. A 7805 in TO220 should fit the bill.

MichaelN:
Whatever you do, make sure you include a decent size Tranzorb / TVS diode on the power supply input. You will get spikes - I can almost guarantee it. Make sure whatever device you use will clamp the voltage below the maximum the regulator can handle under spike conditions.

I second Michael. In all my experiments without Tranzorb/TVS, nothing was working anymore after I started the motor :mrgreen: Filter with TVS and capacitors, even on I/O lines. And choose the right GND connection on the existing loom.

Don’t use the 5V comming out from the ECU. It is used for sensors measurments, mainly TPS and/or MAP. It probably couldn’t supply enough current.

Angelo

Thanks everyone. Based on y’alls suggestions, I’m going to provide an intermediate regulator to step down from 12vDC to say around 7.5 vDC along with a clamping diode in front of the first regulator and caps at the Arduino Vin and signal inputs.

Thanks again!

Greg

@RedRider:

I’m starting the same project basically.

Is there anyway you could share some of the insights and experience you have gained?

In particular I’m interested in the solutions for power supply you’ve found.

Thanks.