Go Down

Topic: Erratic behavior on working project (Read 258 times) previous topic - next topic

HBO88

Hi all,

I am working on a project for making a digital dashboard for a boat.
The project is visualization of the engine RPM, tanklevel, GPS speed and control of the horn, nav. lights and start of the diesel engine.
I used an mega, connected to a PC running processing.

At home everything works fine. System installed on board and works, but there is some erratic behaviour.
Sometimes when the engine is running my program gets strange values and all outputs goes on  for just a second or so.

This is bad, because the startengine is also turn on for a second, but the engine is already running....
I think this must be some kind of electrical noise?   Since i dont have a scoop i cannot check this.

Any ideas how to proceed?  Should it be an option to install a galvanic dc/dc converter between boat supply and arduino/pc to eliminate noise?

Tnx in advance

Robin2

The electrical systems in cars are notoriously rough and I'm sure your boat is much the same. What is quaintly referred to as 12v can vary between 11v and 15v and may have much higher short term spikes and lower dips.

You need to make a pencil drawing showing how everything is connected and post a photo of the drawing.

And also, of course, post your code. And please post your program using the code button </>
Code: [Select]
so it looks like this

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

MarkT

You need to be defensive in your design w.r.t. EMI.  Assume every external cable is
bringing in line-borne interference and protect against it.  Your cables should be screened
if possible, all power wiring is best as twisted pair and keep it well away from sensor and
logic cabling.  Never run power/motor/relay cables alongside sensitive wiring if you can
avoid it.  Analog input cables need say 1 to 10nF to ground to cut out RFI and noise (unless
very high bandwidth is needed).

You'll have to look at the conditioning on the power coming in too if that's derived from
the main battery - some LC filtering and TVS protection would be expected as a minimum -
but that won't protect against the dip on starting the engine (especially a diesel), your 12V
could drop to 6V or less for instance.  A DC-DC converter with wide input voltage range
can be very handy for this.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

HBO88

#3
Aug 31, 2015, 02:15 pm Last Edit: Aug 31, 2015, 02:24 pm by HBO88
The 12V can indeed vary because of the dynamo.

I have incoming 12V from ships battery. From there, I used a step up converter from to power my mini pc (19V), step down converter to have a stable 12V for touch screen and a step down converter for a stable 5V supply for my sensors.
All converters are not galvanic isolated.

I have stable voltages, but everything is connected by the same 0V.

When i turn on the windshield wiper for example, my RPM measurement (hall sensor/ pulses) stops working. Maybe a lot of noise on the 0Vdc?



jremington

#4
Aug 31, 2015, 06:25 pm Last Edit: Aug 31, 2015, 06:26 pm by jremington
Quote
When i turn on the windshield wiper for example, my RPM measurement (hall sensor/ pulses) stops working. Maybe a lot of noise on the 0Vdc?
Voltage drop and noise. Your wiring and noise filtering is inadequate for the current demand.

justone

Why would you need to be able to have the arduino start the engine when the engine only needs to started once? I would think it would be a lot safer (would you need some kind of lockout to work on the engine?) and also friendlier on the starter (trying to start an already running engine makes for some good sound effects).

Robin2

What about powering the Arduino and sensors from a separate battery ?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

HBO88

What about powering the Arduino and sensors from a separate battery ?

This means the complete system is separated from the rest.

If I put a galvanic separated dc/dc converter between incoming ships battery and arduino/sensors, would that give the same effect?
So noise/voltage spikes etc will have no effect after the converter?

MarkT

I have stable voltages, but everything is connected by the same 0V.

When i turn on the windshield wiper for example, my RPM measurement (hall sensor/ pulses) stops working. Maybe a lot of noise on the 0Vdc?

You must never ground a sensitive sensor ground to the chassis at the sensor - all the sensor grounds should be
defined at the Arduino and not connected anywhere else or you'll have a ground-loop going through
the vehicle chassis which is about the noisiest thing you can do(*).  The sensor belongs only to the Arduino
circuit, which should have everything in a star-ground configuration radiating outwards.

If its an existing sensor bolted to the chassis consider using an opto coupler if necessary

(*) partly because of all the high current returning from motors/etc that generate IR voltages across the chassis,
partly because there's usually a rusty connection somewhere, but mainly because you have massive
loops which will pick up oodles of interference from stuff - this is called a magnetic loop antenna when done
deliberately.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

HBO88

I used a hall sensor module. 3 pins: 5V, 0V and signal.
The module is connected with cat 5e cable to arduino, shield of the cable is also connected to 0V.

So sensor 0V is defined at arduino right?  But arduino ground is connected to 0V of the ships batteries.

do I need to galvanic separate the system from the ships battery?

MarkT

The key point is not to create ground loops, but use star grounding.  Don't connect the 0V to the sensor
to anything but the sensor.  Don't assume that the whole chassis is at the same potential, it certainly
isn't.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy