DIY OSD
I’ve built a DIY OSD based on Dennis Frie hardware and software released on rcgroups forum. I’m fairly happy with the results, the osd actually work. I do have some issues, but nothing serious. I have GPS, voltage sensors working as they should so far and am planning to add a current sensor and possibly rssi as well.
Top side not much to talk about. It’s an arduino pro mini 5v unit.
The GPS in the picture is not the one I’m using so far, but I will move over to it in a few days I hope, if I find the time. Main problem is that the GPS requires 3.3v,I’m running everything on 5v at the moment. I’m currently using a ublox neo7m from banggood. The picture shows how I hope to mount the GPS approximately though, depending on how I plan to mount OSD in comparison to the video link and the camera… GPS and video link should be mounted as far away from each other as possible, but OSD needs to be close to the video cable.
The bottom side. Most of the components have been sandwiched between the PCB’s. Some of the routing is a bit stupid but I’ll see if I can fix it so I can fit the current sensor somewhere on the bottom as well.
Remote DBus continued (using your own program)
Filed under: Communications, Development, Linux
Continuing the previous thought on running DBus remotely using d-feet to check how it looks etc, this time, I wanted to call the DBus from my own program. Just write the DBus code as you would to query the DBus interface locally.
#!/usr/bin/env python import dbus import dbus.service from dbus.mainloop.glib import DBusGMainLoop BUS_NAME="org.freedesktop.DBus" OPATH="/" bus = dbus.SessionBus() obj = bus.get_object(BUS_NAME, OPATH) iface = dbus.Interface(obj, BUS_NAME) lala = iface.GetId() print lala
Then the magic comes in running the application.
DBUS_SESSION_BUS_ADDRESS="tcp:host=192.168.X.Y,port=Z" ./dbus-hello.py
DBus remote connection
Filed under: Communications, Development, General, Linux
In a project I’m working on at the moment we wanted to remotely monitor a DBus session bus. The system in question has several buses available using different users and systemd. d-feet can connect and monitor remotely via TCP. The following code will allow you to connect to a remote DBus on a target development board for example.
First copy the original session.conf to separate configuration files for each user.
cp /etc/dbus-1/session.conf /etc/dbus-1/session.conf.<username> cp /etc/dbus-1/session.conf /etc/dbus-1/session.conf.<username2>
Then for each of the newly created configuration file, add the following configuration but with different port numbers and correct username director in /run/user. The ip address should be the IP of the connecting host, not the server. Edit session.conf.<username> and add:
<listen>tcp:host=<ip>,bind=*,port=<port>,family=ipv4</listen> <listen>unix:path=/run/user/<username>/dbus/user_bus_socket</listen> <listen>unix:tmpdir=/tmp</listen> <auth>ANONYMOUS</auth> <allow_anonymous/>
The systemd script is rewritten to use a specific conf file for the specific user trying to start the DBus.
Edit /lib/systemd/system/dbus-session@.service and rewrite the ExecStart line as follows.
ExecStart=/usr/bin/dbus-daemon --config-file /etc/dbus-1/session.conf.%i --nofork
This allows you to connect using d-feet or other dbus applications (potentially, you should be able to connect for example other services over the network to the new DBus….).
Choose “connect to other bus” and use as bus address:
tcp:host=<targetIp>,port=<port>
Done. Hopefully.
Testing out RasPlex
I decided to try out RasPlex after having run OpenElec and RaspBMC for about half a year, and before that XBMCbuntu for a few years. I’ve been using plex server on my file server for a few months already and plex on the tablets/phones to stream movies, tv shows, etc while in bed. I haven’t had that much time with RasPlex yet, but I’m really impressed so far, especially when you start looking at what type of infrastructure it enables. I’m now using the same chain of applications for my tv, phones, tablets, and laptops, this is something I’ve never been able to before (if you except NFS/SMB solutions with VLC or some such video player, which has proven unstable for the phone/tablet cases in my case, high def videos will stutter a lot among other things).
My main problem with the entire setup is that my fileserver is a bit too weak to transcode 1080p on the fly, it is a D525 Atom CPU however, and I didn’t see this usecase when I bought it, so I’ll have to live with it for now ;).
All that said, I’m still very happy with XBMC, but I feel that RasPlex so far has given a more… mature feeling. It seems to work very well with no big hickups so far, the UI on RaspBMC and OpenElec was really slow, something that still holds true in RasPlex, but it is better.
Gps issues
Filed under: Communications, Development, Linux
Been working for a few days with three different GPS modules (different builds etc) and I’m getting the same problem with all of them. They are pretty much giving out complete garbage at all settings. At 9600 bps 8n1 it gives out patterns at least. Just unreadable. I thought it might be ubx protocol but probably not.
I feel like I’m doing something really stupid but I can’t figure it out. Serial port problem? What else could be wrong?
Saleae16 Logic16 100M 16 Channel Logic Analyzer
Filed under: Development, Hardware, Linux, Robots, Ubuntu
I got a clone of the Saleae16 Logic16 100M 16 Channel Logic Analyzer a few days ago to test some of the arduino stuff I’ve been working on for the last few months.
I was at first really annoyed because the software simply refused to work, I tried it on 4 different computers, ubuntu 13.10 64bit, Windows 7 32bit and 64 bit and same error for all of them, logic too slow for speed, try reducing blah something. My searches came up with very little info.
So in the end I found the sigrok package and compiled myself (old version in Ubuntu lacked saleae support) and was pleasantly surprised! It works and actually seemed to be an OK package! There are a few things to do before that which wasn’t obvious, you need to extract firmware from the Saleae software suite and so on for example. Also there are a few bugs in the graphical interface that I found so far. I’ll try to get them reported ASAP and possibly do some work on them. I’ll get back to this topic a bit later as it wasn’t completely obvious how to get it running at all points, for now however, it works;).
Arduino nano computer controlled Pulse generator
Most projects as of late are kind of stopped indefinitely due to lack of time (who could have thought 2 kids could take so much time…) . I am working on 2-3 things whenever I do get a few minutes in and I feel like it however.
The most interesting I believe is a arduino nano based pulse generator, due to a lack of built in DAC it will only be digital. It will be reconfigurable via a qt library which in turn is driven by a qt gui at the moment, but it should be possible to control via any other application. It currently supports 7 pin modes:
digital in
Digital out
built in pwm
bitbanged pwm
handled interrupts
forwarded interrupts and
analog in.
Raspberry Pi + 2x Arduino Nano V3.0
Filed under: Development, General, Hardware, Linux, Robots
Quick update, during my evenings I’ve been working with one of the Raspberry Pi’s I won on a local contest a few months ago, and it’s generally derailed into some kind of “let’s put as much stuff on it as possible”, meaning that I currently got my Raspberry Pi hooked up with:
- Slice of Pi
- Adafruit PWM driver
- Raspicam on a simple pitch/yaw servo gimbal that me and my 1,5 year old put together in 10 minutes. Controlled via PWM.
- MPU9150 sparkfun breakout board
- 2 Arduino Nano V3.0
The two Arduino Nanos have split functionality, where one will provide me with data that needs to be gathered frequently, and the other is used for slow processes such as reading out 1-wire temp sensors etc.
The first nano will have the following functions hooked up to it:
- 3x HC-SR04 ultrasound distance sensors
- Voltage measurement 0-20V circuit
- Control of 2 relays
- 3x line tracking sensors
- Reed switch
- 2x motor controls via L298P chip
The second nano has the following hooked up to it:
- MPX2200GP pressure sensor (will use something else soon’ish)
- 2x 1-wire DS18B20 temperature sensors.
- Others?
The general idea was to move timing critical stuff off the raspberry to the Nano and let the first one deal with quick sensor readouts, while the second Nano is dropped off with relatively slow sensors (DS18B20 takes very long time to read out for example). The two nanos will talk to the Raspberry via SPI I think, or possibly serial ports, but this is less likely as it would either require me to use one USB serial driver and the raspberry UART or get a 2 port USB hub of some kind and talk via USB UART’s.
I’ve meanwhile also played around with Eagle CAD for the first time in my life, making some electrical drawings of the hookups. I’m considering making a PCB layout of everything when I get there, not sure if there is any interest in this out there except for “the lols”. The image is still very raw and missing a lot of stuff that I know needs to be added at some point.
During christmas I spent some time making opencv haar cascade training on clementine detection and generally fooling around with it. I think I’m leaning towards making a robot (chassi on the way) which will travel around in the room looking for objects… I guess some of the sensors are a little overboard for this, but it’s all fun and games while it’s not work… 😉
Small project (continuous rotation servo)
For a very long time I’ve been a little bit obsessed with continuously rotating servos and searched quite a bit for them online, but never finding any cheap servos available.
Probably just me being a lousy google user, but anyways, I started looking up some mods the other day and today I finally spent 2 hours to modify some old crappy servos to see how it works and… to my suprise, it actually works, even though I used lousy 5% 1/8W resistors (recommended 0.1%) and having my 1,5 year old kid sitting in my lap while doing most of the modifications.
As always when it comes to adafruit, I highly recommend their tutorial http://learn.adafruit.com/modifying-servos-for-continuous-rotation/overview.
Server move update
Most of the server move was finished during the last few days and no major interruptions of services where endured as far as I can tell except due to some cock-up with the SSL certificates.
The new server should be able to cope with the rather small loads this site creates.