Go Down

Topic: Arduino powered calorie tracker for a skateboard (Read 531 times) previous topic - next topic

continuum

Feb 02, 2018, 09:07 am Last Edit: Feb 04, 2018, 09:59 am by continuum
Hey there. I recently made a mobile calorie consumption tracker for my non-motorized skateboard. It has an accelerometer (MPU6050), a bluetooth module (HC-05), and a magnetic switch. The magnetic switch is positioned near the wheel and I mounted a magnet on the wheel. So each magnet pass is 1 RPM. Accelerometer is there to measure hill climb which affects the power exerted to climb hills or rocky terrain.

Writing an algorithm to calculate my calorie expenditure while skating. I know its not gonna be very precise, but I wanted to see where the project might head towards.

The problem is however, when everything is put together, the system is acting erratically. The bluetooth turns on and off, and it finally broke after around 2 hours on battery testing. The whole thing is connected to a 7.4V 850 mAh li-po. The li-po died shortly after too!g:

Here are some pictures of the setup. Once I realize what is causing the problem, I will move this project on a PCB for reducing its size.



Grumpy_Mike

Read the how to use this forum for advice on posting images, we don't like going off site for them here.

First you have no decoupling capacitors on that circuit. Second Solderless bread board is crap for what you want to do. The connections are unreliable. Use strip board and header sockets and solder it all up to make something more robust, then make a PCB if you want but their is no need.

TomGeorge

Hi,
Do you have a DMM?
I see you have no way of monitoring the Lipo and shutting OFF before it gets to low that it damages itself.

Have you researched how to treat a Lipo battery underload and charging?

Thanks.. Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

continuum

Read the how to use this forum for advice on posting images, we don't like going off site for them here.

First you have no decoupling capacitors on that circuit. Second Solderless bread board is crap for what you want to do. The connections are unreliable. Use strip board and header sockets and solder it all up to make something more robust, then make a PCB if you want but their is no need.
Well in fact I did provide images in line with the forum entry, but none of them would appear so i edited my post to show the links only.

I already have a perfboard prototype made, but did not want to turn it on again since the bluetooth module fried last time i used it. The breadboard I out together is just to show the forum whats going on more clearly.

The circuit draws around 48 mA by the way.

Where would you place the decoupling capacitors and what capacitors specifically?

TomGeorge

#4
Feb 02, 2018, 11:32 am Last Edit: Feb 02, 2018, 11:35 am by TomGeorge
Hi,
OPs images.


Does the Lipo battery have a charge controller built into it?
Tom.. :) (attach them first)
Everything runs on smoke, let the smoke out, it stops running....

Grumpy_Mike

Quote
Where would you place the decoupling capacitors and what capacitors specifically?
The usual place between power and ground on the modules, Usual values 100uF and 0.1uF ceramic.
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

Quote
Well in fact I did provide images in line with the forum entry, but none of them would appear so i edited my post to show the links only.
I don't think you did. This is how to do it image guide

Quote
but did not want to turn it on again since the bluetooth module fried last time i used it.
You seem to be supplying the Bluetooth module with 5V. Check that your module can stand that, some can't. Also check that you actually have 5V on the power pins before you plug it in.

Quote
The breadboard I out together is just to show the forum whats going on more clearly.
Sorry it didn't.

continuum

My bad, I edited the original post to show images. Thank you for telling me about it, I'm quite new in the forum.

continuum

The usual place between power and ground on the modules, Usual values 100uF and 0.1uF ceramic.
On the link you shared there is nothing about 100uF capacitors, did you mean 47uF and 0.1?

Grumpy_Mike

Quote
On the link you shared there is nothing about 100uF capacitors, did you mean 47uF and 0.1?
I know what I mean and no. I also wrote that page.

The large capacitor is known as bulk decoupling and can be any value. I would say the 47uF is minimum, the actual value to use depends on circumstances. Their is no way of calculating this it is a suck it and see value, even for professional engineers. For your problem I recommend a minimum of 100uF.

wvmarle

I already have a perfboard prototype made, but did not want to turn it on again since the bluetooth module fried last time i used it.
That implies an incorrect connection - do check them carefully. Maybe a GND and Vcc wire swapped? Easy to find with your multimeter, just check whether you have (near) zero resistance between the Bluetooth's Vcc and the Arduino's 5V pin, same for the GND, and a resistance between the other pins and GND/Vcc.

I've found that CAD software can help a lot - I'm using KiCAD also to help me lay out my protoboards, and to keep track of where connections go. Makes life a lot easier, especially when you have a dozen or two of small components included.

Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

continuum

I've found that CAD software can help a lot - I'm using KiCAD also to help me lay out my protoboards, and to keep track of where connections go.

I too started using KiCad in order to put the CC2540 Bluetooth, MPU6050 accelero and the Arduino pro mini together. I'm switching to a 3.3V Arduino since all components should be 3.3V compatible. would be saving me a lot of battery space that way.

I will be adding the capacitor to the layout like Grumpy_Mike (oh the irony) suggested. Wish I knew more about electronics fundamentals since every step right now is more likely to result in magic blue smoke :)

I did a Udemy course called KiCad like a Pro. Saved me a ton of time learning how to design with CAD.

Is there a simple way to put a perfboard on KiCad, like you do on Fritzing?

wvmarle

No idea about Fritzing. Never seen the use of it.

Perfboard - not the solderless breadboard - is easy: just set the proper footprints of your components in cvpcb, open PCBnew, make sure you set the spacing to 2.54 mm (0.1"), and place the components in a sensible way. Then draw the traces as you solder the connections on your perfboard. KiCAD will show what is to be connected to what, which helps prevent lots of errors (though you can still mess up). You can also save a lot on extra little patch wires by using the leads of the components to link stuff together.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

continuum





Grumpy_Mike would be offended to see the state of these!  :smiley-eek-blue:
Here is what the failing perfboard looks like. I'm not going to continue designing on perfboard anymore. I think surface-mounting all the components on a single printed PCB will help me design better stuff in the future.

Grumpy_Mike

Quote
Grumpy_Mike would be offended to see the state of these!
Not at all. Offence was only taken with solderless bread board.
Although I do prefer strip board to perf board. With strip board it is much simpler to use surface mount components.

Go Up