Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
akio123008

What's going on with this arduino

Recommended Posts

Posted · Original PosterOP

I made my own electric bike a while ago, it uses a brushless motor/esc setup, where the esc is controlled by an arduino. The arduino is then hooked up to a potentiometer which I use as the throttle.

 

Now the esc that I use doesn't supply power, so I needed an external power source for my arduino. I decided to use a 2s (8v) LiPo battery I had, connected to the 7-12v dc input on the arduino, and that worked just fine for a long time. However, over time it started getting worse, with the esc not receiving a signal from the arduino every now and then. This problem started getting more frequent, until at some point, the whole thing just wouldn't work anymore. 

 

I then hooked up a laptop to the usb port of the arduino, and reuploaded the code. What I noticed was that the power led on the arduino was brighter than with the arduino connected to the 2s lipo, and that the setup worked! so I concluded that the 8v supplied by that battery must simply be too low (as the arduino dc input goes up to 12v) Still, this is strange, since it had worked just fine for a couple of months on this lipo battery. 

 

I then took an old NiCd battery from a cordless drill, which is rated at 9.6v and 11v when fully charged. That worked really well for about a day or so, when the NiCd battery discharged to about 10,5 volts, the problem returned. So what on earth is going on here? The bloody thing worked fine on 7-8v, then stopped working on even a fully charged 8.5v lipo, then I hooked it up to 11v, it worked again, and now it even refuses to work on 10.5v(!) where it used to work on only 7. 

 

To be clear, the arduino is powered on (the LED is on too), but it doesn't send out the PWM signal on pin 5 to the esc for some reason. Can anybody tell me what is going on here?

 

Edit: when I take a very close look at the power led, it appears as though the intensity changes a little bit periodically, perhaps the device is being turned on and off rapily for some reason, meaning that it doesn't get to the point where it starts executing the code?

Link to post
Share on other sites

Without a schematic or wiring diagram its really hard to pinpoint the problem. Based on your description it seems like a power issue. Without knowing what Arduino board you have, I can only speculate, but I bet your onboard voltage regulator blew. Those linear voltage regulators are super inefficient, especially when they have to drop a lot of voltage 12->5. That voltage drop is also dissipated as heat, super bad if your not using a heat sink. Also I think those onboard v-regs have a supply limit of 400mA? (don't quote me). So if your powering anything 'from' the Arduino board that exceeds that rating, your gonna have a bad time.

 

Depending on the chip set, the Arduino is really only rated for 5vdc or 3.3vdc, the onboard regulator is rated at 12v, not the chip. So don't connect your Arduino IO to any voltage source greater than that without proper level shifting. You might already know this, but I'm just covering all the bases encase you don't.

 

If it is the regulator, you can do one of three things.

1) Swap out your Arduino board with a new one and see if the problem persists.

2) change out the onboard regulator (it's pain if you don't have the tools) and see if the problem persists.

3) Hook a buck/boost regulator up to the 5v supply pin of the Arduino and see if the problem persists.

 

Tag me if you need any help/advice.

Link to post
Share on other sites

Voltage regulator is dead guaranteed. You need an external dc-dc converter as the built in regulators over heat even if you are just a bit over 5V.


Case: Fractal Designs Arc Midi R2  cpu: Intel core i5 4670k at 4.6ghz Motherboard: msi z87-gd65 gpu: EVGA 1070 SC  psu: Seasonic x650 gold Memory: 16gb Corsair vengeance pro 1600mhz ssd: Samsung 840 120gb Hard drive: Western digital wd black 500gb  Build-log: http://linustechtips.com/main/topic/37554-starting-my-first-full-blown-build/                                                                                                 "on the Internet. You can find almost anything on the Internet..." -Linus                                                                                                                                                                              i haz pc

 

 

Link to post
Share on other sites

Yeah get a little buck converter to step your main battery voltage down to 5v for the arduino then wire that to the 5v pad.


I used to have guides here

CPU: 4670k 4.4ghz GPU: GTX 970 G.1 1534mhz

Link to post
Share on other sites
Posted · Original PosterOP
12 hours ago, CodeNova said:

Without a schematic or wiring diagram its really hard to pinpoint the problem. Based on your description it seems like a power issue. Without knowing what Arduino board you have, I can only speculate, but I bet your onboard voltage regulator blew. Those linear voltage regulators are super inefficient, especially when they have to drop a lot of voltage 12->5. That voltage drop is also dissipated as heat, super bad if your not using a heat sink. Also I think those onboard v-regs have a supply limit of 400mA? (don't quote me). So if your powering anything 'from' the Arduino board that exceeds that rating, your gonna have a bad time.

 

Depending on the chip set, the Arduino is really only rated for 5vdc or 3.3vdc, the onboard regulator is rated at 12v, not the chip. So don't connect your Arduino IO to any voltage source greater than that without proper level shifting. You might already know this, but I'm just covering all the bases encase you don't.

 

If it is the regulator, you can do one of three things.

1) Swap out your Arduino board with a new one and see if the problem persists.

2) change out the onboard regulator (it's pain if you don't have the tools) and see if the problem persists.

3) Hook a buck/boost regulator up to the 5v supply pin of the Arduino and see if the problem persists.

 

Tag me if you need any help/advice.

Right, that makes sense, but I don't think the regulator was blown, as I've never even used it on 12v, only on 7-8 for a couple of months, and then on 11 volts for a day or so. There also doesn't appear to be any kind of visible damage. Of course I can just power it directly to the arduino's 5v rail using some external regulator, but it still puzzles me how it just refuses to work on the built-in regulator, especially since the arduino still gets power. Here's a wiring diagram btw:schema.png.47cf289bbbd7aa2d5ca62ddc1debd08f.png

I don't think there's anything wrong with that, it's a pretty simple setup.

Link to post
Share on other sites

I would start by measuring the current consumed by the arduino board.

If you have genuine Arduino Uno Rev3 , the schematic is here: https://content.arduino.cc/assets/UNO-TH_Rev3e_sch.pdf

As you can see, there's a LP2985 linear regulator used to create 3.3v at up to 150mA, the datasheet is here: http://www.ti.com/lit/ds/symlink/lp2985.pdf

 

If you look at the electrical specs, you can see it can handle maximum 16v but it has a poor junction to  ambient thermal resistance of 206c/w and recommended maximum junction temperature of 125 degrees celsius.

 

So let's say your input in 9v and your arduino board consumes 20mA. This means the regulator will dissipate (9v - 3.3v ) x 0.020A = 0.114 watts ... so in the worst case scenario, the regulator should heat by 206 degrees * 0.114 = 24 degrees celsius above ambient - the chip should be around 50c hot.

In real world, the temperature will be a bit less, because the circuit board and the traces will dissipate some of the heat, the heat will spread in the board.

 

Your problem is when your Arduino board consumes 50-100mA ... the regulator could become hot enough to temporarily shut itself down and restart when the temperature drops down by let's say 10-20 degrees (there's some hysteresis involved)

 

Your can reduce this overheating problem by reducing the input voltage... I would say for you it would be best to simply get a battery holder and use 3 or 4 AA or AAA batteries in series... rechargeable batteries will have 1.1v - 1.35v, so with 4 batteries you're gonna have 4v+ ... and alkaline batteries have 2000-2800mAh capacity so they'll last days at low currents. 3 non-rechargeable AA or AAA batteries will have 4.5v-5v (as voltage is 1.4v...1.65v)

 

If your board doesn't consume a lot of power, then ... not sure what to say... with Cadmium batteries I would say the batteries may have been depleted... unless I'm wrong, Cadmium batteries are around 1.2v per battery and die at around 1v (no longer provide meaningful current), so your 8-9v Cadmium battery was probably made out of 8 cells in series.

So the battery may say 8v but as soon as something would pull energy from it, the voltage would drop, the batteries simply can't provide the current the regulator asks.

 

There's also a possibility of the ESC being close to the arduino may radiate noise that could affect the arduino, or some crap may be injected into the arduino through the pwm or ground wires. Maybe see if the arduino dies even when you shield it by placing it inside a metal case (or wrapping a plastic case with some aluminum foil as a shield)

Link to post
Share on other sites
Posted · Original PosterOP
3 hours ago, mariushm said:

Your problem is when your Arduino board consumes 50-100mA ... the regulator could become hot enough to temporarily shut itself down and restart when the temperature drops down by let's say 10-20 degrees (there's some hysteresis involved)

That makes sense, but the regulator doesn't seem to heat up at all. 

 

3 hours ago, mariushm said:

Your can reduce this overheating problem by reducing the input voltage... I would say for you it would be best to simply get a battery holder and use 3 or 4 AA or AAA batteries in series... rechargeable batteries will have 1.1v - 1.35v, so with 4 batteries you're gonna have 4v+ ... and alkaline batteries have 2000-2800mAh capacity so they'll last days at low currents. 3 non-rechargeable AA or AAA batteries will have 4.5v-5v (as voltage is 1.4v...1.65v)

That's a possible solution, but it won't work at all on lower voltages, only when I go higher it works. It's almost as if it "gets used" to higher voltages and then refuses to work on lower voltages afterwards.

 

3 hours ago, mariushm said:

f your board doesn't consume a lot of power, then ... not sure what to say... with Cadmium batteries I would say the batteries may have been depleted... unless I'm wrong, Cadmium batteries are around 1.2v per battery and die at around 1v (no longer provide meaningful current), so your 8-9v Cadmium battery was probably made out of 8 cells in series.

So the battery may say 8v but as soon as something would pull energy from it, the voltage would drop, the batteries simply can't provide the current the regulator asks.

 

There's also a possibility of the ESC being close to the arduino may radiate noise that could affect the arduino, or some crap may be injected into the arduino through the pwm or ground wires. Maybe see if the arduino dies even when you shield it by placing it inside a metal case (or wrapping a plastic case with some aluminum foil as a shield)

The Cadmium batteries aren't in a great condition, but I've measured the voltage while connected to the arduino (the reading was 10.3v I believe) so it can't possibly be a voltage drop due to current draw. Also, those batteries can easily supply 10+ A, they should be just fine. The ESC being too close is a good point, but in my setup, the arduino is on the luggage rack at the back of the bicycle, and the ESC is above the front wheel (that's also where the motor is located) so there's a good 1.5 metres in between the arduino and the ESC.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×