I would like to measure current that flows through a wire. And have an analog input on an Arduino tell me what the current value is. I would like a "no touch" approach to avoid warranty issues, I'm thinking about something similar to a current clamp on a modern Multimeter. But connected to an arduino. I know that current clamps in the old days could measure AC only and today they can measure DC as well. The project is: Add a brake light to a all-terrain wheelchair to early warn the person behind it (on a mountain bike) that the wheelchair is braking. If the all-terrain wheelchair is braking, it sends back energy to the batteries, so that should be possible to detect. I'd like to understand how to do this without cutting the wire and soldering a resistor in it. My naive idea would be to wind a few revolutions of wire around the battery wire and detect "charging" and illuminate the brake light based on current flowing towards the battery. But I fail to understand the DC/AC aspects of doing this. Thanks for your insight.
A linear Hall Effect sensor can be used to measure the steady state magnitude of the magnetic field inside a solenoid, which is directly proportional to the current flow in the solenoid.
Cost and linearity may be issues.
An acceleration/deceleration sensor could also detect a braking wheelchair.
Leo..
You could put a light detector on a brake light and work from that signal.
@GoForSmoke has a good suggestion, I would use a Hall Sensor that has a digital output and use that to directly drive a MOSFET for your light. No Arduino needed. Here is a representative circuit:
Connect the digital output to the PWM input in the circuit.
A light sensor on the brake light, cheaper than even a Hall switch.
Ummm... the wheelchair has no brake light:
However, it may be feasible to put a sensor on the brake controller (e.g., a camera on the joystick) to detect brake inputs by the driver.
Given that I live in a senior's building, I should know that.
Maybe that's where my keys are....
How are the wires connected to the battery?
I tried that.
I tried/used an Arduino WIO - it has got a basic 3-axis accelerometer inside. Given that this is an all-terrain wheelchair it goes up and down slopes and that makes things difficult to debug and test. Isolating acceleration on a changing slope (e.g. going over the top of a hill without braking and without software detecting braking) is a serious challenge. I might be able to get it right in 50 debug-and-test attempts but I want to complete the project faster than that.
The connection is :
Battery - Controller - motor
The connection between Battery and Controller is wires and a XT60 connector on the controller.
My idea was to install a 10cm long male-female 2-wire extension between battery and controller [and hall effect sensor on that]
Would be best if you showed a schematic of this part of your wheel chair. If in fact the braking is dynamic and sends energy back to the battery, then the current MUST REVERSE direction and that means the voltage reverses. Try sensing the reversed current/voltage for the project.
That is only true of a resistive load, which a battery is not.
Ah, thank you, you are correct! So, whenever the motor voltage is above the battery nominal voltage, the battery is being charged. That should give the OP an idea of how to program for a warning light to be turned on.
I'm afraid that this voltage difference will be negligible, unless the leads are long/thin, or the current is high.
Then the charging of the battery by the slowing motor is not worth the bother.
Why two. Current is usually only measured in one wire.
You could use a 50mV shunt with the required current rating.
Or a DC current clamp.
Try it out first with a DC clamp meter.
Leo..
How do you figure?
I guess charging the wheelcair battery is a lot more current than regenerative braking.
Leo..


