Datalog via Serial, want no auto-reset

Problems uploading, serial connections, BUBs, P4, FTDI cables, etc
Post Reply
abhishekshinde
Posts: 3
Joined: Tue Dec 08, 2009 1:34 am

Datalog via Serial, want no auto-reset

Post by abhishekshinde » Tue Dec 08, 2009 1:58 am

Objective : Record data sent over the serial line to a PC via com port with a Serial LCD connected.

I want the Atmel 328p to output stuff to a Serial LCD, and also output a different set of data to a line that can be eventually read by a PC. The best way I've thought of so far is to use NewSoftSerial to send serial data to my serial NewHaven LCD using anything BUT the native tx/rx pins. Then send serial data via the native serial port (UART) which will eventually get passed through FTDI's USB-BUB thing and into my PC as a virtual com port. This part is working just fine. I can read 'Serial.print(data);' via hyperterminal. Perfect... Almost... Everytime I start the connection, the damn thing resets and starts the sketch all over again... WTF!? I didn't ask it to reset, but merely start receiving data on a serial line. Can I disable the DTR or whatever function?

Sorry to be such a n00b, but my background is in Mechanical Engineering and not electrical/computer etc.

The goal of this device is to read various transducers and update an LCD with human readable values. This device must also provide the ability to datalog the readings to a PC. Using the USB interface was the easiest/most compatible way I could think of. But imagine this. You're walking down the street when suddenly someone asks you a question. "So, what did you do yesterday?". And all of a sudden, your brain resets to the way you were when you were an infant and suddenly you have no idea of what's going on. You default to baby-talk!

Oh, the horror!

Anyway, I hope this helped you see my point. Why requesting data over a serial connection should not reset the damn Ardunino... I thought this would've been somewhat of a no-brainer....

But alas, how can I go about achieving this? I would like to retain the auto-reset during code upload but if I can set a jumper or something to disable auto-reset, that would be the best solution. Or maybe there's another way I haven't thought of yet.

Also, I can't believe I'm the first person to ask such a question on this forum. I searched.

floresta
Posts: 93
Joined: Mon Jul 28, 2008 6:52 pm
Location: Western New York, USA
Contact:

Re: Datalog via Serial, want no auto-reset

Post by floresta » Tue Dec 08, 2009 2:36 pm

abhishekshinde:

A jumper in series with the reset capacitor would work, but there's not much room on the board. One solution would be to remove the reset capacitor (next to the reset switch and the programming header) and replace it with two machined header pins cut from a strip like the one shown here - http://www.bgmicro.com/index.asp?PageAc ... odID=13025. You would plug the capacitor into this new two-pin header when you wanted to enable the automatic reset and remove it when you want to disable the automatic reset.

Don

abhishekshinde
Posts: 3
Joined: Tue Dec 08, 2009 1:34 am

Re: Datalog via Serial, want no auto-reset

Post by abhishekshinde » Tue Dec 08, 2009 2:41 pm

Don:

That's fantastic. Thanks!

abhishekshinde
Posts: 3
Joined: Tue Dec 08, 2009 1:34 am

Re: Datalog via Serial, want no auto-reset

Post by abhishekshinde » Wed Dec 09, 2009 8:46 pm

Hmm, I can't edit my last post. Weird. Rather do that then update the timestamp on this thread. Oh well.

I think I'm just going to leave that capacitor out in future builds. Uploading the code to the BBB manually is really not bad. Just keep your trigger finger ready on the reset switch and hit 'Upload' in the IDE as you wait for the message "Binary sketch size: xxxxx bytes (of a 30720 byte maximum)" to appear. As soon as it does, trigger the reset. I was able to upload the code pretty reliably this way. And now my Arduino no longer has Alzheimer! Sweet!

paul
Site Admin
Posts: 735
Joined: Mon May 12, 2008 4:19 pm

Re: Datalog via Serial, want no auto-reset

Post by paul » Fri Dec 11, 2009 7:28 am

One customer suggested a slightly more flexible solution to defeating the pesky serial port reset.

This works only if you are using a BUB to upload. The BUB has a series cap on the DTR line too, so you really don't need the cap on the BBB. Then just put a set of headers in the cap hole and use a shunt when you need to upload.

Paul

dclapp
Posts: 1
Joined: Tue Dec 22, 2009 2:29 pm

Re: Datalog via Serial, want no auto-reset

Post by dclapp » Tue Dec 22, 2009 2:32 pm

To quote Jean-Claude, "Sometimes the simplest things are so obvious that it’s easy to miss them…"

http://news.jeelabs.org/2009/12/05/ftdi ... supressor/

paul
Site Admin
Posts: 735
Joined: Mon May 12, 2008 4:19 pm

Re: Datalog via Serial, want no auto-reset

Post by paul » Sat Dec 26, 2009 1:16 am

Oh yeah - there's Jean-Claude's custom unit too - so tons of choices.

Paul

Post Reply