Building an Inductive Wire Robot

We are currently building an inductive wire robot, but I'm not able to get the sensor circuitry to work. Looking for any advice from EE/firmware experts (I'm a mech so I've been going off of online resources).

The goal is to use inductors to pick up the magnetic field from a 10khZ wire on the ground, which converts it into a 10khZ sine wave centered around 0VDC. I then process it through a series of opamps and voltage dividers to raise the VDC bias voltage and amplify the amplitude, before I feed it into a DC peak detector to get the peak of the AC sine wave. This DC signal is fed into the A0 ADC port on the Arduino Uno. The LTSPICE diagram is below.

r/arduino - Looking for help with an Inductive Wire Robot

When I connect the circuit to the A0 port, everything works well-I read the correct VDC that I am expecting. But when I connect 2 PWM motors to the Arduino, the circuit breaks and I don't see any voltage.

I'm wondering if I should get an external ADC like the ADS1115 and then connect the sensor to the ADS1115, and then connect the ADS1115 to the I2C Arduino ports.

The problem is caused by the motor/arduino circuit not shown, so please post a schematic of the entire project.

The motors require drivers and a separate power supply, but don't forget to connect all the grounds.

Here's the schematic of the entire project. The Inductive sensor schematic is in my first post.

Some things that stand out as likely to cause problems:

  • You show a 'power distribution breadboard'. Breadboard is a poor choice for anything to do with power, especially for things like motors, which generally need a lot of current, particularly when starting up. Breadboard has unreliable contacts and low current capability.
  • You are converting 12V to 5V then to 15V, why? Convert 12V to 15V.
  • Your grounds are all over the place, which will distribute noise nicely around the circuit. Something like this needs star grounding, a single point where the wires all meet. Do some research.
  • The supply wires are also a mess, the only place the current to and from the motors should meet the current to the more sensitive circuits is at the battery.
  • There are no decoupling or tank capacitors anywhere.
  • What are the 2 wires labelled PWM going to the motor controllers? PWM is 1 wire usually.
  • Although you have not shown any photos I bet if you do they will show a tangled mess of wire loops all over the place, also just what you need to distribute noise every where. Wiring should be neat having care to place the wire carrying current to a device next to the wire carrying it back.

Step-up or Step-down converters create a lot of noise on any line, but the line that gets the most noise, is the GND. This is because they fire rapid PWM pulses and try to cancel the gaps out. The problem is that with every pulse, the coils and capacitors in the circuit will peak in current. Ohm's law say that such situation will result in a voltage loss. And every time the coils are dropped in voltage, they will inject a self-inducting current. All that combined creates the noise on the buses and supply voltage.

A lot of the noise can be canceled with some capacitors. They depend on the wavelengths of the noise sines. So if you have a scope, hook it up and try to catch the most disturbing and frequent noise sines. Then calculate the right capacitors for it. But most of the time, a 22nF capacitor can solve a lot of your problems. I am thinking, maybe you can add capacitors on the coils too. That should improve the resolution and lower any false positives.

Hi, @epicboy75
Welcome to the forum.

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Can you post some images of your project?
So we can see your component layout.

Can you please post links to the specs of your hardware, Inductive sensor, motor diver and motors?

Tom.... :smiley: :+1: :coffee: :australia:

For sure. I posted the current schematic of the entire circuit in an earlier comment. I also posted the schematic of the actual sensor we built in my original post. I'm thinking of changing the circuit to something like this (applying star grounding and isolating the motor circuitry entirely). The below circuit is proposed but not the current setup.


Right now, the system works fine IF I don't turn on the PWM in code. I'm reading the correct DC voltages on the scope when I replace the inductors with a 10khz waveform generator. BUT when I turn on PWM, the sensor signal completely flatlines. I'm not sure why.

For reference, this is the circuit that I am currently using.

Here's an image of the project. It's quite messy so we are planning on cleaning up the wiring and isolating power and signal wires.

We are using FRC CIM Motors and motor controllers.

Thanks for the info. Would something like this possibly work (star grounding plus isolating the motor circuitry)

Thanks for the info and photos.

The star ground should be for everything, including the motors, everything should meet at one point.

You still have the breadboard for powering the motors, it's still no good.

Similarly the 12V > 5V > 15V weirdness.

Your wiring is as I imagined it to be, read my comments again.