Go to advanced search

by Paul Moir
Sat Dec 21, 2013 6:54 am
Forum: Troubleshooting
Topic: End of file of /dev/ttyAMA0
Replies: 11
Views: 2261

Re: End of file of /dev/ttyAMA0

Ah, good hack! :)
by Paul Moir
Sat Dec 21, 2013 6:52 am
Forum: Beginners
Topic: Advice - How to tell if an electrical appliance is 'on'
Replies: 13
Views: 3423

Re: Advice - How to tell if an electrical appliance is 'on'

You don't really have much choice. A green filter in front of any LDR or phototransistor would probably be the best.

I would have gone for the current transformer personally I think... But if you have a light, go for it!
by Paul Moir
Sat Dec 21, 2013 6:45 am
Forum: Beginners
Topic: interfacing adc0804 with RPi
Replies: 8
Views: 3697

Re: interfacing adc0804 with RPi

If you look at the datasheet, you'll see you're in the "maybe" region for talking 3.3v to the ADC0804; it really wants 3.5v or higher for a guaranteed signal. The bigger problem is the ADC talks back with 5v (well, 4.5v minimum), which is too loud for the pi's GPIO input pins and will hurt them. You...
by Paul Moir
Thu Dec 19, 2013 5:14 am
Forum: Troubleshooting
Topic: End of file of /dev/ttyAMA0
Replies: 11
Views: 2261

Re: End of file of /dev/ttyAMA0

Sorry, I can't seem to figure out a problem here. It all looks fine to me. I'll have to find some time to try out some stuff myself.
by Paul Moir
Mon Dec 16, 2013 11:24 pm
Forum: Troubleshooting
Topic: End of file of /dev/ttyAMA0
Replies: 11
Views: 2261

Re: End of file of /dev/ttyAMA0

Ok, if it's just spewing data out that's fine. :) Looks like you're turning off "ignore CR" and "translate CR to LF". Since unix sees newlines as LF, you will be getting extraneous CRs in your input that you don't want. I'd personally turn on "ignore CR" so you don't have to deal with them. If you'r...
by Paul Moir
Mon Dec 16, 2013 6:17 pm
Forum: Beginners
Topic: You say this is to encourage child programming???
Replies: 13
Views: 2447

Re: You say this is to encourage child programming???

Personally, I think you're *WAY* better off doing that with a uC rather than a pi. I don't see any advantage to the pi there, and your accuracy is going to suffer from various pi interrupts, bus contentions, cache flushes, etc, etc that you get with a high level system. For my purposes, I've found t...
by Paul Moir
Mon Dec 16, 2013 5:54 pm
Forum: Python
Topic: TTL period measurement?
Replies: 2
Views: 1582

Re: TTL period measurement?

"Real Time Clock" means a battery backed time-of-day type clock. Back in the 'day computer's didn't come with these, like my old VIC-20. Didn't mean it couldn't keep time since there's lots of other accurate clocks in computers. It's just that it forgot it when you unplugged it like an alarm clock, ...
by Paul Moir
Mon Dec 16, 2013 6:46 am
Forum: General discussion
Topic: Rs232 serail to USB(Raspberry)
Replies: 6
Views: 3292

Re: Rs232 serail to USB(Raspberry)

I ran into a weird problem where I got kernel panics with sound and the prolific RS-232 USB converters from a couple different manufacturers. An old, power hungry and buggy converter I have doesn't cause this problem. I've got some of adafruit's fdti converters on the way.
by Paul Moir
Sun Dec 15, 2013 10:24 pm
Forum: Troubleshooting
Topic: End of file of /dev/ttyAMA0
Replies: 11
Views: 2261

Re: End of file of /dev/ttyAMA0

Sorry - not a great answer but a couple comments: In your code above, you are not initializing your new_options structure completely as far as I can tell. The special characters are undefined. My personal preference is to read in the old options (which you are doing) and then modify them with the pa...
by Paul Moir
Sat Dec 14, 2013 5:10 pm
Forum: Beginners
Topic: You say this is to encourage child programming???
Replies: 13
Views: 2447

Re: You say this is to encourage child programming???

(esp. as with hardware, everything seems to become harder than it needs to be. Well, that's because there's an OS in your way. When you plan a project, you really have to decide whether or not you want an OS. If you want good, reliable networking, filesystems, multitasking, etc then you'll want an ...
by Paul Moir
Sat Dec 14, 2013 3:52 pm
Forum: Automation, sensing and robotics
Topic: Controlling 12VDC from GPIO
Replies: 25
Views: 13735

Re: Controlling 12VDC from GPIO

How big is the relay? It's not some big honking one is it? With 3ma base current you'll only be able to drive ~300ma. Hook up a multimeter pin and measure the gpio output directly to make sure it's going to 3.3v when you think it is. If you can't, you can test your drive circuit by disconnecting it ...
by Paul Moir
Fri Dec 13, 2013 8:40 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Too many switches, too low voltage?
Replies: 3
Views: 1015

Re: Too many switches, too low voltage?

There you go: see what happens when you read the manual. :) Hook up your multimeter for a quick current check just to verify since you're within an order of magnitude.
by Paul Moir
Fri Dec 13, 2013 7:19 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Too many switches, too low voltage?
Replies: 3
Views: 1015

Re: Too many switches, too low voltage?

I don't think you're going too far, but you should really check to be sure. Googling tells me a SNES gamepad has two 4021 shift registers which have very little power consumption (probably less than 1 ma each depending on how fast you're driving them). Each switch has a 10k pullup, so each switch co...
by Paul Moir
Wed Dec 11, 2013 9:53 pm
Forum: Automation, sensing and robotics
Topic: Connect load cell to Pi
Replies: 32
Views: 33072

Re: Connect load cell to Pi

I did it with an AD7195 evaluation board using SPI (the USB comm on the board isn't documented unfortunately). Even got the IIO kernel drivers going for it. There were a couple tricks. Had to recompile the kernel for the IIO subsystem and AD7195 (ad7192) driver, with a modified board file to setup S...
by Paul Moir
Tue Dec 10, 2013 3:37 pm
Forum: Beginners
Topic: relays and JP4
Replies: 4
Views: 990

Re: relays and JP4

The two relays on the board do have independent freewheeling diodes, at least my board does. Some early ones (perhaps also without JP4) might not. They're D1 and D2 just next to the relays. If you have them, you will not need to add freewheeling diodes if you remove JP4.
by Paul Moir
Tue Dec 10, 2013 4:28 am
Forum: Beginners
Topic: relays and JP4
Replies: 4
Views: 990

Re: relays and JP4

Sorry for the delay. No problem running 9v on the relays. JP4 isolates the freewheeling diodes in the relay driver ULN2801A. You need to remove this in order to use voltages higher than 5v on the output ports (the 9 screw connectors in a row), since JP4 connects the free-wheeling diodes to +5v. If y...
by Paul Moir
Fri Dec 06, 2013 2:33 pm
Forum: Beginners
Topic: relays and JP4
Replies: 4
Views: 990

Re: relays and JP4

Are you talking about a piface?

9v on the relay contact side? The little 3 wire connectors?
by Paul Moir
Thu Dec 05, 2013 11:00 pm
Forum: Beginners
Topic: other languages, analog to digital
Replies: 1
Views: 283

Re: other languages, analog to digital

gcc and most all the development libraries you need are on there already. The editor is a personal choice, a lot of people like "nano" for a terminal based emulator, and apparently it does syntax highlighting. (I use "joe" but that's habitual going back to Coherent, an operating system you've never ...
by Paul Moir
Thu Dec 05, 2013 6:43 pm
Forum: C/C++
Topic: Audio in Qt5
Replies: 2
Views: 3045

Re: Audio in Qt5

My impression was that it wasn't done yet on the Pi for QT5. Fortunately for my app sound wasn't strictly necessary. PS - I ran into another problem where I would get an occasional "QXcbConnection: XCB error 165" at startup. I had to put the option "Xinerama" "true" in the serverlayout section of xo...
by Paul Moir
Thu Dec 05, 2013 6:24 pm
Forum: Beginners
Topic: Incoming connections GPIO
Replies: 8
Views: 795

Re: Incoming connections GPIO

You can easily do it with a matrix keyboard type setup with no need for an expander. What you do is setup the GPIO with say 4 outputs and 5 inputs, and your inputs are weakly pulled down. Activate one output, then read the 5 inputs to determine which switch on the column is closed, then go onto the ...
by Paul Moir
Wed Dec 04, 2013 7:38 pm
Forum: Beginners
Topic: Raspberry Pi with Buffer Pi
Replies: 1
Views: 477

Re: Raspberry Pi with Buffer Pi

Should be no problem. You might want to disable the relays on the PiFace so you can use all 8 on the other board. There are only 8 output drivers and two are used for the relays on the PiFace. Looks like your SainSmart board has optocouplers, so I don't see much point in using a buffer board. At say...

Go to advanced search