miniLOG - Standalone Data Logger - Page 1
Forum section: electronics / projects

author: fenclu
author_rank: Regular Contributor
timestamp: October 31, 2013, 06:41:35 pm
content: I'd like to introduce my latest project. It's a standalone voltage logger that saves the logged data to an SD card. I call it the miniLOG, because it's small and well, it logs stuff...I have just finished the PCB and am about to be ordering prototype PCBs. Hopefully it will be on the market by the end of the year.More details on my blog:http://timecircuits.blogspot.com/2013/10/minilog-precision-standalone-voltage.htmlI'd love to hear your feedback, either good or bad. It's supposed to be a kind of public research to find out if anyone would be actually interested in it.Peace.

author: DavidDLC
author_rank: Frequent Contributor
timestamp: October 31, 2013, 06:51:04 pm
content: If there is no enclosure for it, then mounting holes to put some pcb standoffs would be good.

author: tszaboo
author_rank: Super Contributor
timestamp: October 31, 2013, 07:01:27 pm
content: dont put untented vias under a metal package (Y1). They might make a short.

author: uoficowboy
author_rank: Regular Contributor
timestamp: October 31, 2013, 07:07:41 pm
content: Seems to be very similar in functionality to the logger products that Sparkfun makes... Not saying that makes it any less useful.

author: fenclu
author_rank: Regular Contributor
timestamp: October 31, 2013, 07:25:40 pm
content: Holy crap, I haven't seen those before

author: hagster
author_rank: Frequent Contributor
timestamp: October 31, 2013, 09:57:48 pm
content: What's the fastest logging rate? Have you thought about oversampling to increase the bit depth?

author: Alex
author_rank: Regular Contributor
timestamp: October 31, 2013, 10:26:13 pm
content: Hi fenclu,Interesting project.I am working on a setup for the study of metal deposition rate by sputtering. A logger similar to this would be very useful indeed.The sort of intervals I'm dealing with are longer, say 1 week sampling period for a few years. Do you think miniLOG could be modified for such an application?Another requirement is low noise, low drift, wide dynamic range etc, precision stuff. This is important as it can reduce the experiment time by months. So big plus if you can properly characterise it.In academia multichannel acquisition = National Instruments which = $$$. But, a single, cost-effective, high performance channel is often what is needed!Finally, such experiments are so long that a battery is not practical. Therefore there is a mains supply available, but special procedures are put in place in case of power failure. How will miniLOG handle loss of power? Will it resume sampling?Maybe some of the above will hit a nerve with your design. As a suggestion consider differentiating miniLOG from the generic electronic dust from Sparkfun etc. Continuing the focus on precision would achieve this.Alex

author: fenclu
author_rank: Regular Contributor
timestamp: October 31, 2013, 10:59:31 pm
content: The project will probably be Arduino compatible so you can easily change the interval time to the desired value.I have to note, the software is not ready, I haven't made all the decisions yet. If the board for some reason suddenly loses power all data to that time will be saved on SD card (the AVR should write to SD card in real time). At least I hope it's possible.Quote from: NANDBlog on October 31, 2013, 07:01:27 pmGot it, that via is now tented.Quote from: DavidDLC on October 31, 2013, 06:51:04 pmSure, I'll get around to it tomorrow.

author: Whales
author_rank: Super Contributor
timestamp: October 31, 2013, 11:59:41 pm
content: I have had to setup environments around proprietary data loggers before. Think of automating proprietary GUI java applications in Windows and you will have the right idea.How I wish I knew about things like this back then.

author: Alex
author_rank: Regular Contributor
timestamp: November 01, 2013, 12:20:50 am
content: I forgot to ask, is there any reason why you chose U4 to be THT?Alex.

author: fenclu
author_rank: Regular Contributor
timestamp: November 01, 2013, 09:14:40 am
content: Quote from: Whales on October 31, 2013, 11:59:41 pmWell, yeah but it's just an SD card logger. It does not have a USB connection (although I have put a serial connector on there if someone wanted to add bluetooth or USB to their board). After logging you will just get an SD card that plug into your computer and it acts as a mass storage. The logged data will be saved to a .txt file which you can then import to Excel or whatever you want.Quote from: Alex on November 01, 2013, 12:20:50 amYes, I'm using LM285 which is available in two packages - TO92 and SO8. TO92 meant smaller footprint and easier routing (+ less temperature drift if I remember correctly). It's a tight board, I'm actually having troubles putting holes on there.

author: fenclu
author_rank: Regular Contributor
timestamp: November 06, 2013, 06:28:12 pm
content: I converted one of the channels into a current logging channel by adding a 1ohm shunt resistor. So now I can't really call it a voltage logger. From now on it's a DATA LOGGER

author: fenclu
author_rank: Regular Contributor
timestamp: November 24, 2013, 12:18:52 pm
content: Here's an update on the miniLOG. I described the schematic on my blog:http://timecircuits.blogspot.com/2013/11/minilog-seires-part-2-circuit.htmlI would be grateful if you could provide an outside opinion or possibly note any mistakes I've made in the schematic.Also, I can't decide whether to use an SD card, or a microSD card, so please give me some advice on that.miniLOG REV2 schematic (.pdf)

author: tszaboo
author_rank: Super Contributor
timestamp: November 24, 2013, 06:21:41 pm
content: Q1, D3 seems to be redundant. Do you need both of them?

author: Maxlor
author_rank: Frequent Contributor
timestamp: November 24, 2013, 11:40:59 pm
content: I suggest that your serial interface should use the same pin layout as the commonly used "FTDI Cables", i.e. GND, CTS, VCC, TXD, RXD, RTS. If you don't have RTS/CTS, just leave those NC.If it doesn't increase the size of the board, I'd pick an SD card slot. Those with MicroSD cards can use a dirt cheap adapter, and that way, both types of card work. Alternatively, just log to an eeprom and output the data over the serial interface?

author: Harvs
author_rank: Super Contributor
timestamp: November 24, 2013, 11:57:06 pm
content: Just a comments on your schematic. There's a lot of redundant stuff put on there, big labels, pretty pictures of random parts, but you haven't labeled some of the stuff that's actually going to be really useful when you're sitting at the bench with this thing and the schematic. Stuff like the reference voltage, you've put a redundant comment below the voltage reference stating it's part number, when the part is already labeled, but you haven't put down what it's output voltage and tolerance is. It means if I were building this, or debugging it, I'd have to go off and get the datasheet just to check if the reference was outputting the right voltage.Many times on this forum people criticize connecting together a schematic with net labels, and yes I'm not a fan either. But if you are going to, don't have vertical labels on connecting nets, they're 10x harder to find. Also where reasonable, put inputs on the left and outputs on the right, it's just how most people read. E.g. the connector for the ADC has no reason to be in a rotated orientation, you've got plenty of room on the page, so move some things around and place it on the left of the block with the net labels facing to the right. Now it will automatically look like an input connector adjoining to those nets. Now, even better, fix up those ADC input filters buy putting the grounds facing down (don't face grounds vertically), and arrange them such that you can connect it directly to the connector without using net labels. This block would be much easier to understand and look a lot more professional.

author: fenclu
author_rank: Regular Contributor
timestamp: November 25, 2013, 02:45:56 pm
content: Like I said, it's still not a finished schematic. Thank though, I will tweak the little mistakes.Quote from: NANDBlog on November 24, 2013, 06:21:41 pmI guess I could get away without the D3, then I wouldn't have to deal with the dropout voltage of the diode.

author: fenclu
author_rank: Regular Contributor
timestamp: February 22, 2014, 08:05:19 pm
content: I got my prototype PCBs. I started talking to my Atmega chip and developing the software. I do however have a problem with the DC-DC converter. As you may know I used an AA battery with MCP1624/MCP1640 converter to boost the voltage to ~3.6V. The efficiency didn't turn out as expected and the entire circuit is drawing about 54mW (according to my shit multimeter), not the expected 10mW. I'm thinking of just ditching the AA battery and using two CR2032s in parallel with some sort of protection diode. That would give me about 500mW in total. But the other problem is the diode dropout voltage, the voltage would be too low for the SD card...Now something like a Li-Po battery would be nice but I think that might be a bit of an overkill. I would appreciate some help and suggestions.Here are some photos of the prototype:

author: sacherjj
author_rank: Frequent Contributor
timestamp: February 22, 2014, 08:22:28 pm
content: Quote from: fenclu on February 22, 2014, 08:05:19 pmLook at using a P-MOS as reverse voltage protection. Can reduce considerably the voltage drop of using a diode.

author: dannyf
author_rank: Super Contributor
timestamp: February 22, 2014, 08:25:20 pm
content: Using a N-ch can do the same, at a lower price.

author: fenclu
author_rank: Regular Contributor
timestamp: February 22, 2014, 09:06:19 pm
content: I am actually using one, as shown on the schematic:Turned out I got my footprint wrong. And even after soldering it correctly the current flows both ways, even without the battery...

author: dannyf
author_rank: Super Contributor
timestamp: February 22, 2014, 09:11:57 pm
content: QuoteQ1? It is not wired right and it wastes considerable energy.QuoteQ1's body diode.IRF has an application on this. Google it.You may also check some of the arduino's circuit to see how they switch between usb power and outside power supply: the issue here is similar.

author: dannyf
author_rank: Super Contributor
timestamp: February 22, 2014, 09:18:43 pm
content: The principle of the IRF appnote is very simple: use the body diode to conduct initially. Once the voltage over the load is sufficient to turn on the mosfet, you are in the linear region.

author: fenclu
author_rank: Regular Contributor
timestamp: February 22, 2014, 09:25:17 pm
content: Ok then, I removed the Q1, shorted out the drain and the source and removed R3. It still uses 15mA...Could be my crappy meter...

author: mariush
author_rank: Super Contributor
timestamp: February 23, 2014, 12:09:40 am
content: QuoteIf you're going to use EEPROM, you might as well use something cooler (but a bit more expensive) like FeRAM.For example, you could use this:http://uk.farnell.com/ramtron/fm33256b-g/fram-mpu-support-256k-14soic/dp/2103831Datasheet here:http://www.cypress.com/?docID=42548It's a 256 kbit feram with real time clock, alarm , event counter, works with 2.7-3.6v, 100 trillion writes, the works. Save money on separate rtc chip, lower power consumption because it uses less power than eeproms and it's fast (almost instant) etc etc.

author: dannyf
author_rank: Super Contributor
timestamp: February 23, 2014, 12:44:04 am
content: QuoteNot sure what "it" is. Posting a schematic / measurement point would be helpful.What were you expecting?

author: fenclu
author_rank: Regular Contributor
timestamp: February 23, 2014, 09:29:36 am
content: Quote from: mariush on February 23, 2014, 12:09:40 amI actually settled for an SD card a long time ago. Thanks though, that's something to consider.QuoteI meant the entire circuit is drawing 15mA from the battery (it's about 23mW). I was expecting something below 10mW. I mean come on, there only an Atmega chip, barely powered MCP3201 (not even talking to the microcontroller) and a 74HC595 shift register for multiplexing LEDs (all LEDs are off). That's even without the SD card.Here's the latest schematichttp://1drv.ms/1mnuZAe

author: dannyf
author_rank: Super Contributor
timestamp: February 23, 2014, 01:38:53 pm
content: The avr, depending on the frequencies it is running at, may consume 10ma all by itself. so 15ma isn't out of this world.For low current consumption, think about putting the mcu to sleep in between sampling or to run at different speeds.Power consumption is more of a software thing than a hardware thing.

author: fenclu
author_rank: Regular Contributor
timestamp: February 23, 2014, 02:31:35 pm
content: Do you think it might have something to do with the fact that I'm running it with an Arduino bootloader and 16MHz crystal?

author: dannyf
author_rank: Super Contributor
timestamp: February 23, 2014, 02:40:01 pm
content: With 16Mhz crystal, you are likely in the 10ma+ range and 15ma is reasonable.Slow it down: current consumption is almost proportional to speed.

author: fenclu
author_rank: Regular Contributor
timestamp: February 23, 2014, 08:59:48 pm
content: I'll try to underclock the MCU by modyfying the Arduino bootloder. 1MHz oughta do it for SPI controlled ADC and SD card?

author: dannyf
author_rank: Super Contributor
timestamp: February 23, 2014, 09:22:43 pm
content: Depending on your current budget. 1Mhz will get you to about 1ma (on the avr).If your avr idles a lot - typical for a logger, you really should think about putting it to sleep: the current consumption there is in terms of ua / na vs. ma in the run state.

author: fenclu
author_rank: Regular Contributor
timestamp: February 23, 2014, 09:29:26 pm
content: I found this Arduino library:https://code.google.com/p/narcoleptic/I'll try and use it, should my 30kB flash memory allow it.

author: dannyf
author_rank: Super Contributor
timestamp: February 23, 2014, 10:03:04 pm
content: I am partial to the arduino bootloader: I blow it out every time,Arduino boards are great in terms of their availability and low prices (for the clones). I buy them and then program then via icsp.

author: fenclu
author_rank: Regular Contributor
timestamp: February 23, 2014, 10:05:33 pm
content: It's really more about the environment. Yes, I'm lame and can't program in real C...

author: fenclu
author_rank: Regular Contributor
timestamp: March 15, 2014, 04:52:56 pm
content: I published my project at Hackaday Projects as a beta tester:http://projects.hackaday.com/project/194-miniLOG---Standalone-Data-LoggerI probably need to mention why I'm actually doing this project. I'm a high school student and a beginner. This project is supposed to help me pay for a basic lab. I don't have a scope, a logic analyzer or even a decent multimeter, that's why it's a big challenge for me. I need some way to get the money, I was even thinking about a small Indiegogo campaign to get small funds for a basic lab, as some guy did before.

author: linux-works
author_rank: Super Contributor
timestamp: March 15, 2014, 05:33:46 pm
content: I like the idea of data loggers.being a networking person, I would like to have wireless data streaming. sd cards can fail (and fail horribly!). there goes your data.otoh, if you use wireless (of some kind, lots of choices here) then you can upload data from many sensors to one host (a linux host would be my pref, of course) and that can save data to raid disks for reliability. in fact, if you multicast (xbees can do that for free, btw; if they are all tuned to the same channel, one transmits and they all see the same data coming in to them) then you can have nearly free reliability via redundancy. xbees also travel pretty far and they do offer encryption, if that matters.there are cheap digital radio modules, too.there is IR if you have line-of-sight and only need to send data one-way. I would checksum the packets and sequence number them (like tcp) for reliability.having a local cache of data is fine; but I'd want to get the data off the sensors and onto something reliable. for times where the remote upload host is not reachable, you buffer the data locally and keep trying to connect to the upload host and when you do, you flush the buffers.

author: fenclu
author_rank: Regular Contributor
timestamp: March 16, 2014, 10:34:18 am
content: That's partly the reason why I put the UART connector on the board. If only there is some memory left on the microcontroller it should be possible to hack it to use bluetooth or Xbee module. Not really my piece of cake so I'll left it to the user/community.

author: fenclu
author_rank: Regular Contributor
timestamp: April 14, 2014, 08:48:22 pm
content: Crap...I'm now running the board at 4MHz and the power consumption. I'm out of ideas. Obviously I need to put the MCU to sleep, maybe increase the values of LED resistors. I'm just curious, why slowing the processor down 4 times didn't make any difference?