A HAH shield for the arduino.cc board
Hello All
Just a thought, would anyone be interested in collaborating on a HAH shield, compatable with the existing arduino.cc spec, and supporting an enhanced 1wire RJ45 line driver, with 433 Mhz TX and possible 433 Mhz RX?
Regards
Harry
It should be possible to substitute an arduino for the HAH board and replace the xap-livebox reference in the startup from /dev/ttyS0 (the livebox serial output) to /dev/ttyUSB0 and hang off an arduino instead.
In fact I started on a rewrite of the AVR firmware last year as an Arduino sketch just so I could test this out but never got around finishing this project off. Its on my very long list of todo items.
I do however have a C++ class that encapsulates the Universal RF Tx subsystem that is present in the new 328 version. I prototyped this all on an ARM Cortex-M3 board and then rewrote once it was working to suit the existing HAH BASCOM code base. This C class is not published anywhere thou as opensource.
With regards to an RF Rx unit Derek has already put togther a nice turnkey solution that bolts onto the exist xap-serial daemon. Althought I've not seen it work a few other have field tested it sucessfully. As RF is much tricker to decode its not univeral RF as the protocol it encoded into the firmware.
Expanding the architecture using xap-serial is the right approach this program is the perfect companion for the job, along with a bit of LUA script. You might want to consider checking out the HAH arduino section, its a little scant due to my limited time resource. However I run an Arduino and a NuElectronics Ethershield which just monitors 1-wire temperature and reports directly onto the network and this is published.
Having said all that if you want to pick some of these theads and continue on I'd be more then happy to assist you (time permitting).
Brett
The current /dev/ttyUSB* pool has support for up to 8 serial/USB devices so with a USB HUB yes you can get to use all of these if you wish.
To make the xap-livebox use an external serial port you need to do this.
# cd /etc/init.d
# rm xap
# sed 's/ttyS0/ttyUSB0' < /etc_ro_fs/init.d/xap > xap
Adjust ttyUSB0 for where your serial port really is see /var/log/messages
to put the system back to its default configuration
# cd /etc/init.d
# rm xap
# ln -s /etc_ro_fs/init.d/xap
the intenal livebox serial port is TTL level signalling (3v) so you need a MAX3223 before this is visible using a standard serial port. Unless of course you connect your arduino also using TTL and a soft serial port.
We made up TTL(3v)/RS232(5v) adapters see "livebox-serial-console-adapter" in the shop that make this easier.
As Brett mentioned, the Livebox uses a 3.3V level on the serial port exposed via the MMJ socket. If you don't use the correct circuitry to adapt this to talk to an external device, you risk 'frying' the Livebox serial port.
The HAH PCB has components to sort this ... allowing the AVR on the PCB to run at 5V ... still with the lower serial port voltage.
My Arduino boards are running at 5V. Direct pin connection to the Livebox serial port NOT recommended. If your Arduino is 3.3V ... you might be OK, but I've not tried this.
I've personally tested upto four USB connected RS232 serial devices. Works just fine.
Derek.
Hi Harry,
The HAH is pretty flexible in that it is relatively easy to addon additional microcontrollers via USB to serial adaptor(s) and xap-serial e.g. the RF Rx unit that I described at http://www.dbzoo.com/livebox/xap_serial#a_short_tutorial
RJ45 is definately the way to go on the 1-wire front. I now use a little breakout board to connect the 3pin molex connector on the HAH PCB to RJ45 - results are much better than with the 3.5mm stereo jack affair.
As for 433MHz Tx, this shouldn't be too difficult. The transmitters do work best on 12V, so some way of getting this to the shield would perhaps be best.
Rx is 'harder'. To date, I've dedicated a small micro to being a Rx subsystem. I suppose that with some smarter code, it might be possible to do Rx as well as other functions.
Interestingly, Brett & I are currently testing an ATMEGA328 version of the HAH firmware ... the same chip as used in most Arduinos. We use the Arduino bootloader to ease firmware loading. Had hoped to release this by now, but time has been in short supply.
Reckon the skills needed are Embedded Unix/Busybox/C, Lua scripting, developing Arduino sketches, PCB design. Of course, there is also the need for a TARDIS to make time to do all of this!
Cheers,
Derek