Hello
I measure movement wuth VM204 Velleman componant and store mesured on SD Card.
For develop, current supply is given by USB.
But if I connect supply on 12 V battery or 9 V battery the sketch appears not start.
Other basic sketch (blinking led) works normally with battery.
I assume the code contains instructions which are not allowed, but what are they ?
Full code is joined
Thanks for help
SenseWriteCtrl.ino (3.69 KB)
frantzgac:
Hello
I measure movement wuth VM204 Velleman componant and store mesured on SD Card.
For develop, current supply is given by USB.
But if I connect supply on 12 V battery or 9 V battery the sketch appears not start.
Other basic sketch (blinking led) works normally with battery.
I assume the code contains instructions which are not allowed, but what are they ?
Full code is joined
Thanks for help
The SD card modules are not famous for low power demand. If your gear works on the USB but not from battery it clearly suggests the power from the latter is inadequate.
This may be due to improper wiring, or a bad choice of battery. God only knows what the 12v battery is but, if the 9v is a PP3, get rid of it immediately, and do that before you investigate any wiring.
Hi
Thanks for help.
I try to use stabilized supply 12 V= 4A.
It doesn't work.
I attempt to put a 25 microfarad condensator between + and -.
It doesn't work.
Is USB connection gives data information that Arduino Micro needs to boot ?
PS : What is problem with PP3 battery (which supply 500 mA enough for 50mA of montage) ?
Hi,
Where are you connecting the 9V , 12V supply.
PP3 batteries are not designed for the currents that your project will require?
What model Arduino are you using?
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Thanks.. Tom.. 
Hi,
What are you measuring movement with, VM204 is an ethernet relay card?
Can you post link to specs/data please?
Thanks.. Tom. 
The only way a 12v 4A stabilised supply cannot work is because it is faulty or you have wired it incorrectly. The capacitor would only be of value with an unstable supply, if at all. While I wouldn't recommend it at the moment, you will probably be better off with a 12>5v regulator for Arduino. I assume you have this supply for peripherals. A 500mA supply is not enough for reliable power to Arduino, and they are probably lying about it anyway.
Thanks for answers.
I use an arduino Micro/Genuine.
VM204 is an acceleration sensor module MM5574.
Shield card is a MicroSD card breakout board+ ADA-254 bought to Kiwi Electronics.
The current drawn (measured) by the circuit is 50 mA. That's for i think 500mA 9V battery seems able to.
Others sketch (led blinking) works fine when arduino card is USB connected nor 9V battery supply, so I don't think there is wiring problem.
Wiring cablage is joined
frantzgac:
Others sketch (led blinking) works fine when arduino card is USB connected nor 9V battery supply, so I don't think there is wiring problem.
This is not clear but if you are saying that your wiring IS self-evidently kosher and your Micro is working OK with USB OR 9v PP3, but NOT 12v 4A supply, then clearly the 12v supply is not delivering 12v at trivial mA when it is asked to.
Hello
Thanks for reply
1 Other sktech as trivial blindind Led works with 9V PP3 battery
2 Other sktech as trivial blindind Led works with 12 Volts stabilized converter
3 Other sktech as trivial blindind Led of course when connected on computer USB
4 The Sensor sketch works when connected on computer USB (read sensor and write on SD Card)
5 The Sensor sketch doesn't works when connected on PP3 Battery
6 The Sensor sketch doesn't works when connected on 12 V stabilized converter
So I think wiring is not the cause of 5) and 6)
3 Other sktech as trivial blindind Led of course works when connected on computer USB
frantzgac:
So I think wiring is not the cause of 5) and 6)
Then, clearly, the 9v supply is not delivering the goods, probably because it is inadequate, and the 12v 4A supply isn't either, probably because it is faulty, and therefore also inadequate.
You really don't have much choice in the matter, eh? There is nothing to suggest the Micro is stuffed.
You might try checking the volts at pin6 +5v, and stick to using the 12v supply - at least for the moment. The Micro may have more efficient regulators than the Uno, Mega etc., but generally, if you insist on using a 9v PP3, you deserve all the grief you will inevitably get.
Thanks for reply
My target is realize mobile and autonomous sensor, gripped to a human body to measure movements. Consequently I need portable supply as light as possible.
Is it possible to get serial.print on computer without supply Arduino card by USB ?
USB pins are +VCC GND and DATA+ DATA-. If I connect only DATA+ DATA- GND, can I hope to receive serial.print messages during arduino card supplied by battery ?
This should allow me to decide what instruction fails.
Hello
I find the problem in code
An infinite loop waiting while "Serial" is TRUE... event never occurs without USB !
I try with 12V alim, 9V battery, it's OK
A test with MN21 12 V battery is running ...
5 minutes after start tension is 8V but measure pursue
Thanks for Help
Well, there you go, we all learn.........