Maker Pro
Maker Pro

electrical disturbance on my Raspberry-Pico because of to the electrical motor controler

Hello,
I have developed a personal project on my bicycle, as follow :
- I have equipped my bicycle with an electrical motor associated to a programmable controller.
- I am using a µC RaspberryPi-Pico to drive the programmable controller.
The use of the µC helps me driving the engine exactly as expected, based on some data collected from some Hall sensors and other push buttons. Things are working well : I do obtain what I am expecting ...
Note: the electrical signal from Pico to the controller is the following : Pico output per PWM signal => optocoupler PC817 => Low pass filter => controller.
However, things go wrong when I want to visualise the parameters with an LCD. The LCD works well, at least until the engine starts running. At this point, either the LCD freezes, or it displays nothing readable.
I temporary fixed the concern by fully segregating the electrical circuit of the Pico from the electrical engine / battery. I am not an expert in electronics, therefore I failed to use the 36V battery power to properly supply the Pico circuit: some parasite signals makes things wrong.
The only solution I found to fix the concern is the following :
1) the Pico + the Hall sensors + LCD + optocoupler LED are powered by a dedicated 9V battery + LM7805. The 36V battery which powers the engine/controller, also powers the downstream part of the optocoupler (transistor side).
2) the ground from Pico supply and 36V battery are separated.
The question is relative to filtering the 36V reduced to 5V. I failed to filter it properly to avoid any disturbance on my LCD.
Even using the two separate electric powers, but connecting the grounds, generates unacceptable disturbances.
Can anyone help me to solve the problem ?
thank you

PS1 : I tried using a DC-DC (LM2596) to get 5V. Disturbances are present.
PS2 : My LCD is a A2004. I removed the built-in pullup resistor, and replaced it with a specific pullup connected to 3.3V in my circuit.
 

Harald Kapp

Moderator
Moderator
Having the battery for the motor and the battery for the pico separate is probably the best option. Instead of a 9 V battery and 7805 regulator I suggest a 5 V power bank. This offers much higher capacity than the battery and is rechargeable.
If you don't want the separate battery, look up "car audio power supply filter". These filters are made specifically to suppress noise from the car's electrical system. They are usually designed fro 12 V operation,. so you'll have to step down the 36 V from the bike's battery to 12 V (use a step-down module, not a linear regulator to minimize power dissipation), then filter, then regulate down to 5 V as required.
 
Hi bertus, the schematic is really simple, 95% of the job is done by Pico :) ! see attached.
Hi HaraldKapp, the use of a power bank is for sure the best way to do, if I cannot solve this concern !
I remain a bit frustrated because I just need ... less than 0.25W, and I am not able to get it without parasites :(:(!
I will investigate the threads related to "car audio power supply filter", expecting I can get something simple and reliable ...
thanks !
 

Attachments

  • schema Olive.pdf
    62.9 KB · Views: 6
I see there has been some attempt at complete isolation of the grounds by using Gnd and GndRef (I assume separate)
However you come unstuck when you make your 5v common ground.
No idea how you managed to get that part to work at all unless you made it all common ground.
Then you loose the whole reason for using an opto isolator.
 
I see there has been some attempt at complete isolation of the grounds by using Gnd and GndRef (I assume separate)
However you come unstuck when you make your 5v common ground.
No idea how you managed to get that part to work at all unless you made it all common ground.
Then you loose the whole reason for using an opto isolator.
Hi Bluejets,
I have two independent circuits : the one powering Pico&sensors (5V supplied by a little battery + LM7805 ; ground=GND - lets call it 'powerA'), and the other powering the motor/controller powered by a 36V battery ('powerB').
The only links between the two circuits are the optocouplers, powered on one side (upstream = powerA) separately to the other side (downstream = powerB).
thanks
 

bertus

Moderator
Hello,

You posted this schematic:
pico schematic FOlive.png
I have circled a piece in the schematic.
As said I assume it is not used as the schematic shows.
When used it will cause severe problems.

Bertus
 
correct, that's not used anymore. I was my initial wiring, not removed from my sketch, sorry.
note : before using an LCD, I was displaying data through the serial USB port on the screen of my computer. I could use the tension supplied by my 36V battery without any (apparent) concern. Therefore I could also display the tension of that battery !
thanks
 
I have two independent circuits : the one powering Pico&sensors (5V supplied by a little battery + LM7805 ; ground=GND - lets call it 'powerA'), and the other powering the motor/controller powered by a 36V battery ('powerB').

No doubt but there still remains the question surrounding where the 5V feeds a 1k resistor top right and bottom right, and then also feeds 3 x circuits (hall ?) bottom left.
Point being you would need to common ground somewhere for this to work at all.
Therefore optos no point.

I'd say redraw the circuit as you have it now.
 
Top