GrovePi+ 433MHz simple link


#1

Hi,

I want to use the 433MHz simple link and I need direct control to the TX pin to implement a custom line coding scheme used by some existing products. In order to do this I need relatively high speed access to the pin, since the bit length is about 500usec. It looks like the digital write used by the GrovePi library waits 10msec in the C# library – but not in the python library (?).

What’s the best way to go here: attempt to send i2c packets of digital writes and hope that I can turn the pin on and off quick enough, or add a custom i2c sensor that interprets an i2c packet and modulates it on the grovepi using digitalWrite there (Like the virtualwire lib but directly)? Unfortunately I can’t use the virtual wire support since that works on a slightly higher level and uses its own line coding and OTA packet format.


#2

Hi,

Have you considered connecting the tx module on the “RPi Serial” port? You could then directly access it from the raspberry pi, provided that you have no other use for this serial port…

Kr,

Frederic


#3

Does that let directly bit-bang the tx pin? The 433mhz transmitter is basically as simple as it gets, no UART chip or anything inside.

This is the custom protocol: http://webcache.googleusercontent.com/search?q=cache:http://hacks.esar.org.uk/?p=258

It uses a strange line encoding so VW won’t work :frowning:


#4

In this setup I have used successfully the 433Utils library (a port of an Arduino lib) with this grove component. So it is indeed possible to address the TX module that way. This said, the protocol I have been using is not the same, and I am not expert enough in this field to tell you if you would be able to get something useful out of the UART port.

If this fails, you still have the option of making a custom firmware based on the existing one to implement your specific version of the protocol, in place of the vw one…


#5

Are you using http://wiki.seeedstudio.com/wiki/Grove_-Serial_RF_Pro or http://wiki.seeedstudio.com/wiki/Grove-_433MHz_Simple_RF_Link_Kit ? Because the former makes sense over UART serial but the latter has no concept of serial, just a bit banging pin.

I’m using the latter and i don’t think serial uart would make a lot of sense over it. Guess I’m stuck making a custom firmware.


#6

I confirm that I am using the Simple RF Kit, not the Serial RF Pro.
You will note that the Seeedstudio wiki description points that it is possible to use a UART port.


#7

OK that makes sense if you’re sending UART frames over 433Mhz, and i need lower level control than that. Looks like http://www.dexterindustries.com/topic/grovepi-and-simple-433-mhz-rf-link-kit/ covers it–custom fw is required :confused:

Good to know UART would work in general, it’s just that this dumb proprietary protocol isn’t compatible


#8

You can customize the 1.2.6 firmware to substitute the VW integration with your custom code.
Let me know if you need a few pointers to setup a work environment or extend the firmware.


#9

That would be great actually, currently doing a multistep hack where i compile on PC and send the hex to the RPi via scp


#10

That’s actually the kind of setup I had in mind.
Cross-compilation on PC, scp to the RPi and ssh command to upload the firmware with AvrDude.
I found that directly developing on the RPi was an exercice in frustration.

My own work environment is based on Jetbrains’ CLion, a professional C++ IDE way more powerful than the Arduino IDE. I’ve got a nice CMake makefile to handle all the cross-compilation / transfer / upload stuff in one ‘build’ click.
The occasional debugging is achieved by good old Serial.print, with a cross-cable between the serial and RPi serial ports of the GrovePi and minicom monitoring.


#11

Oh that would be really cool to see

I’ve been trying to rig something up w/ sshfs and an inotify watcher, but its very delicate :confused: